Native gcc is picky about the CC and LD variables. Set them unconditionally, whether building static or not.
/trunk/scripts/build/debug/300-gdb.sh | 5 3 2 0 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
3 VERSION=$(cat .version)
6 PREFIX_DEFAULT=/usr/local
21 echo "${1}" |cut -d '=' -f 2-
33 PREFIX=$(get_optval "$1" "$2")
39 BINDIR=$(get_optval "$1" "$2")
45 LIBDIR=$(get_optval "$1" "$2")
51 DOCDIR=$(get_optval "$1" "$2")
57 MANDIR=$(get_optval "$1" "$2")
62 opt_val=$(get_optval "$1" "$2")
66 CONTRIB_list=$(LC_ALL=C ls -1 contrib/*.patch.lzma |sed -r -e 's|.*/||; s|\.patch\.lzma||;')
70 echo "Available contributions:"
71 LC_ALL=C ls -1 contrib/*.patch.lzma |sed -r -e 's|.*/||; s|\.patch\.lzma||; s|^| |;'
73 *) CONTRIB_list="${CONTRIB_list},${opt_val}";;
80 \`configure' configures crosstool-NG ${VERSION} to adapt to many kind of systems.
82 USAGE: ./configure [OPTION]...
84 Defaults for the options are specified in brackets.
87 -h, --help display this help and exit
89 Installation directories:
90 --prefix=PREFIX install files in PREFIX [${PREFIX_DEFAULT}]
91 --local don't install, and use current directory
93 By default, \`make install' will install all the files in
94 \`${PREFIX_DEFAULT}/bin', \`${PREFIX_DEFAULT}/lib' etc. You can specify
95 an installation prefix other than \`${PREFIX_DEFAULT}' using \`--prefix',
96 for instance \`--prefix=\${HOME}'.
98 For better control, use the options below.
100 Fine tuning of the installation directories:
101 --bindir=DIR user executables [PREFIX/bin]
102 --libdir=DIR object code libraries [PREFIX/lib]
103 --docdir=DIR info documentation [PREFIX/share/doc]
104 --mandir=DIR man documentation [PREFIX/share/man]
107 --with-contrib=XXX Include externally contributed features found in the
108 contrib/ sub-directory. Set to a comma-separated list
109 of features. Use 'all' to use all contributions, and
110 'list' to see which are available.
119 #---------------------------------------------------------------------
122 while [ $# -ne 0 ]; do
124 --prefix*) set_prefix "$1" "$2" && shift || shift 2;;
125 --bindir*) set_bindir "$1" "$2" && shift || shift 2;;
126 --libdir*) set_libdir "$1" "$2" && shift || shift 2;;
127 --docdir*) set_docdir "$1" "$2" && shift || shift 2;;
128 --mandir*) set_mandir "$1" "$2" && shift || shift 2;;
129 --local) LOCAL_set=1; shift;;
131 set_contrib "$1" "$2" && shift || shift 2
132 [ "${do_quit}" = "1" ] && exit 0
134 --help|-h) do_help; exit 0;;
139 [ -z "${PREFIX}" ] && set_prefix "" "${PREFIX_DEFAULT}"
140 if [ "${LOCAL_set}" = "1" ]; then
144 set_docdir "" $(pwd)/docs
145 set_mandir "" $(pwd)/docs
148 #---------------------------------------------------------------------
149 # Some sanity checks, now
151 # If this version is a svn snapshot, try to get the revision number
152 # If we can't get the revision number, use date
153 echo -n "Computing version string... "
156 REVISION=$(LC_ALL=C svnversion)
157 case "${REVISION}" in
159 VERSION="${VERSION}unknown@$(date +%Y%m%d.%H%M%S)";;
161 URL=$(LC_ALL=C svn info 2>/dev/null |egrep 'URL: ' |cut -d ' ' -f 2-)
162 ROOT=$(LC_ALL=C svn info 2>/dev/null |egrep 'Repository Root: ' |cut -d ' ' -f 3-)
163 VERSION="${VERSION}${URL#${ROOT}}@${REVISION}"
166 VERSION="${VERSION/\//_}"
171 # Now we have the version string, we can build up the paths
172 [ -z "${BINDIR_set}" ] && BINDIR="${PREFIX}/bin"
173 [ -z "${LIBDIR_set}" ] && LIBDIR="${PREFIX}/lib/ct-ng-${VERSION}"
174 [ -z "${DOCDIR_set}" ] && DOCDIR="${PREFIX}/share/doc/ct-ng-${VERSION}"
175 [ -z "${MANDIR_set}" ] && MANDIR="${PREFIX}/share/man/man1"
177 # Check bash is present, and at least version 3.0
178 echo -n "Checking bash is at least bash-3.0... "
179 [ -x /bin/bash ] || do_error "bash 3.0 or above was not found in /bin/bash"
180 bash_version=$(/bin/bash -c 'echo ${BASH_VERSION}')
181 bash_major=$(/bin/bash -c 'echo ${BASH_VERSINFO[0]}')
182 [ ${bash_major} -ge 3 ] || do_error "bash 3.0 or above is needed (/bin/bash is ${bash_version})"
183 echo "ok (${bash_version})"
185 echo -n "Applying contributed code: "
186 for c in ${CONTRIB_list//,/ }; do
188 if [ ! -f "contrib/${c}.patch.lzma" ]; then
189 do_error "Contribution '${c}' does not exist"
191 lzcat "contrib/${c}.patch.lzma" |patch -p1 >/dev/null 2>&1
195 echo -n "Building up Makefile... "
196 sed -r -e "s,@@BINDIR@@,${BINDIR},g;" \
197 -e "s,@@LIBDIR@@,${LIBDIR},g;" \
198 -e "s,@@DOCDIR@@,${DOCDIR},g;" \
199 -e "s,@@MANDIR@@,${MANDIR},g;" \
200 -e "s,@@VERSION@@,${VERSION},g;" \
201 -e "s,@@DATE@@,${DATE},g;" \
202 -e "s,@@LOCAL@@,${LOCAL_set},g;" \
203 Makefile.in >Makefile
207 crosstool-NG configured as follows:
213 CONTRIB='${CONTRIB_list//