util/crossgcc: Update gdb to 7.3.1
[coreboot.git] / util / crossgcc / buildgcc
1 #!/bin/sh
2 #
3 # Copyright (C) 2008-2010 by coresystems GmbH
4 # written by Patrick Georgi <patrick.georgi@coresystems.de> and
5 #            Stefan Reinauer <stefan.reinauer@coresystems.de>
6 #
7 # Copyright (C) 2011 by Sage Electronic Engineering
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; version 2 of the License.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
21 #
22
23 CROSSGCC_DATE="August 8th, 2011"
24 CROSSGCC_VERSION="1.04"
25
26 # default settings
27 TARGETDIR=`pwd`/xgcc
28 TARGETARCH=i386-elf
29 DESTDIR=
30
31 # version numbers
32 GMP_VERSION=5.0.1
33 MPFR_VERSION=3.0.0
34 MPC_VERSION=0.8.2
35 LIBELF_VERSION=0.8.13
36 GCC_VERSION=4.5.2
37 BINUTILS_VERSION=2.20.1
38 GDB_VERSION=7.3.1
39 W32API_VERSION=3.17-2
40 W32API_VERSION_SHORT=3.17
41 MINGWRT_VERSION=3.18
42 IASL_VERSION=20110623
43
44 # archive locations
45 GMP_ARCHIVE="ftp://ftp.gmplib.org/pub/gmp-${GMP_VERSION}/gmp-${GMP_VERSION}.tar.bz2"
46 MPFR_ARCHIVE="http://www.mpfr.org/mpfr-${MPFR_VERSION}/mpfr-${MPFR_VERSION}.tar.bz2"
47 MPC_ARCHIVE="http://www.multiprecision.org/mpc/download/mpc-${MPC_VERSION}.tar.gz"
48 LIBELF_ARCHIVE="http://www.mr511.de/software/libelf-${LIBELF_VERSION}.tar.gz"
49 GCC_ARCHIVE="ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-${GCC_VERSION}/gcc-core-${GCC_VERSION}.tar.bz2"
50 BINUTILS_ARCHIVE="http://ftp.gnu.org/gnu/binutils/binutils-${BINUTILS_VERSION}.tar.bz2"
51 GDB_ARCHIVE="http://ftp.gnu.org/gnu/gdb/gdb-${GDB_VERSION}.tar.bz2"
52 W32API_ARCHIVE="http://downloads.sourceforge.net/project/mingw/MinGW/BaseSystem/RuntimeLibrary/Win32-API/w32api-${W32API_VERSION_SHORT}/w32api-${W32API_VERSION}-mingw32-src.tar.lzma"
53 MINGWRT_ARCHIVE="http://downloads.sourceforge.net/project/mingw/MinGW/BaseSystem/RuntimeLibrary/MinGW-RT/mingwrt-${MINGWRT_VERSION}/mingwrt-${MINGWRT_VERSION}-mingw32-src.tar.gz"
54 IASL_ARCHIVE="http://www.acpica.org/download/acpica-unix-${IASL_VERSION}.tar.gz"
55
56 GMP_DIR="gmp-${GMP_VERSION}"
57 MPFR_DIR="mpfr-${MPFR_VERSION}"
58 MPC_DIR="mpc-${MPC_VERSION}"
59 LIBELF_DIR="libelf-${LIBELF_VERSION}"
60 GCC_DIR="gcc-${GCC_VERSION}"
61 BINUTILS_DIR="binutils-${BINUTILS_VERSION}"
62 GDB_DIR="gdb-${GDB_VERSION}"
63 W32API_DIR="w32api-${W32API_VERSION}-mingw32"
64 MINGWRT_DIR="mingwrt-${MINGWRT_VERSION}-mingw32"
65 IASL_DIR="acpica-unix-${IASL_VERSION}"
66
67 SAVETEMPS=0
68 SKIPGDB=0
69
70 red='\e[0;31m'
71 RED='\e[1;31m'
72 green='\e[0;32m'
73 GREEN='\e[1;32m'
74 blue='\e[0;34m'
75 BLUE='\e[1;34m'
76 cyan='\e[0;36m'
77 CYAN='\e[1;36m'
78 NC='\e[0m' # No Color
79
80 searchgnu()
81 {
82         # $1 short name
83         # result: GNU version of that tool on stdout
84         #         or no output if no GNU version was found
85         for i in "$1" "g$1" "gnu$1"; do
86                 if test -x "`which $i 2>/dev/null`"; then
87                         if test `$i --version 2>/dev/null |grep -c GNU` -gt 0; then
88                                 echo $i
89                                 return
90                         fi
91                 fi
92         done
93         printf "${RED}ERROR:${red} Missing toolchain: $1${NC}\n" >&2
94         exit 1
95 }
96
97 TAR=`searchgnu tar` || exit $?
98 PATCH=`searchgnu patch` || exit $?
99 MAKE=`searchgnu make` || exit $?
100
101 cleanup()
102 {
103         printf "Cleaning up temporary files... "
104         rm -rf build-* combined gcc-* gmp-* mpfr-* mpc-* libelf-* binutils-* gdb-* w32api-* mingwrt-* acpica-*
105         printf "${green}ok${NC}\n"
106 }
107
108 myhelp()
109 {
110         printf "Usage: $0 [-V] [-c] [-p <platform>] [-d <target directory>] [-D <dest dir>] [-G]\n"
111         printf "       $0 [-V|--version]\n"
112         printf "       $0 [-h|--help]\n\n"
113
114         printf "Options:\n"
115         printf "    [-V|--version]                print version number and exit\n"
116         printf "    [-h|--help]                   print this help and exit\n"
117         printf "    [-c|--clean]                  remove temporary files before build\n"
118         printf "    [-t|--savetemps]              don't remove temporary files after build\n"
119         printf "    [-j|--jobs <num>]             run <num> jobs in parallel in make\n"
120         printf "    [-p|--platform <platform>]    target platform to build cross compiler for\n"
121         printf "                                  (defaults to $TARGETARCH)\n"
122         printf "    [-d|--directory <target dir>] target directory to install cross compiler to\n"
123         printf "                                  (defaults to $TARGETDIR)\n\n"
124         printf "    [-D|--destdir <dest dir>]     destination directory to install cross compiler to\n"
125         printf "                                  (for RPM builds, default unset)\n\n"
126         printf "    [-G|--skip-gdb]               don't build GNU debugger\n"
127 }
128
129 myversion()
130 {
131         # version tag is always printed, so just print the license here
132
133         cat << EOF
134 Copyright (C) 2008-2010 by coresystems GmbH
135 Copyright (C) 2011 by Sage Electronic Engineering
136
137 This program is free software; you can redistribute it and/or modify
138 it under the terms of the GNU General Public License as published by
139 the Free Software Foundation; version 2 of the License.
140
141 This program is distributed in the hope that it will be useful,
142 but WITHOUT ANY WARRANTY; without even the implied warranty of
143 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
144 GNU General Public License for more details.
145
146 EOF
147 }
148
149 printf "${blue}Welcome to the ${red}coresystems${blue} cross toolchain builder v$CROSSGCC_VERSION ($CROSSGCC_DATE)${NC}\n\n"
150
151 # Look if we have getopt. If not, build it.
152 export PATH=$PATH:.
153 getopt - > /dev/null 2>/dev/null || gcc -o getopt getopt.c
154
155 # parse parameters.. try to find out whether we're running GNU getopt
156 getoptbrand="`getopt -V | sed -e '1!d' -e 's,^\(......\).*,\1,'`"
157 if [ "${getoptbrand}" = "getopt" ]; then
158         # Detected GNU getopt that supports long options.
159         args=`getopt -l version,help,clean,directory:,platform:,jobs:,destdir:,savetemps,skip-gdb Vhcd:p:j:D:tG -- "$@"`
160         eval set "$args"
161 else
162         # Detected non-GNU getopt
163         args=`getopt Vhcd:p:j:D:tG $*`
164         set -- $args
165 fi
166
167 if [ $? != 0 ]; then
168         myhelp
169         exit 1
170 fi
171
172 while true ; do
173         case "$1" in
174                 -V|--version)   shift; myversion; exit 0;;
175                 -h|--help)      shift; myhelp; exit 0;;
176                 -c|--clean)     shift; cleanup;;
177                 -t|--savetemps) shift; SAVETEMPS=1;;
178                 -d|--directory) shift; TARGETDIR="$1"; shift;;
179                 -p|--platform)  shift; TARGETARCH="$1"; shift;;
180                 -D|--destdir)   shift; DESTDIR="$1"; shift;;
181                 -j|--jobs)      shift; JOBS="-j $1"; shift;;
182                 -G|--skip-gdb)  shift; SKIPGDB=1;;
183                 --)             shift; break;;
184                 -*)             printf "Invalid option\n\n"; myhelp; exit 1;;
185                 *)              break;;
186         esac
187 done
188
189 GDB_PACKAGE="GDB"
190 if [ $SKIPGDB -eq 1 ]; then
191         printf "Will skip GDB ... ${green}ok${NC}\n"
192         GDB_ARCHIVE=""
193         GDB_PACKAGE=""
194 fi
195
196 MINGW_ARCHIVES=""
197 if [ "$TARGETARCH" = "i386-mingw32" ]; then
198         MINGW_ARCHIVES="$W32API_ARCHIVE $MINGWRT_ARCHIVE"
199 fi
200
201 if [ ${GCC_VERSION} = "4.5.0" -o ${GCC_VERSION} = "4.6.0" ]; then
202   # coreboot does not like the GOLD linker
203   # USE_GOLD="--enable-gold"
204   USE_GOLD=""
205   GCC_OPTIONS="--enable-lto"
206 fi
207
208 if [ ${GCC_VERSION} = "4.6.0" ]; then
209   if [ ! -r tarballs/gcc-core-${GCC_VERSION}.tar.bz2 ]; then
210     printf "Pre-Release GCC ${GCC_VERSION}, checking out subversion trunk\n"
211     mkdir -p tarballs/.tmp
212     cd tarballs/.tmp
213     rm -rf gcc-${GCC_VERSION}
214     svn export -q svn://gcc.gnu.org/svn/gcc/trunk gcc-${GCC_VERSION}
215     printf "done. Now creating tar ball...\n"
216     tar cjf ../gcc-core-${GCC_VERSION}.tar.bz2 gcc-${GCC_VERSION}
217     printf "done. Now cleaning up...\n"
218     cd ..
219     rm -rf .tmp
220     cd ..
221     printf "done.\n"
222   fi
223 fi
224
225 printf "Downloading tar balls ... \n"
226 mkdir -p tarballs
227 for ARCHIVE in $GMP_ARCHIVE $MPFR_ARCHIVE $MPC_ARCHIVE $LIBELF_ARCHIVE $GCC_ARCHIVE $BINUTILS_ARCHIVE $GDB_ARCHIVE $MINGW_ARCHIVES $IASL_ARCHIVE; do
228         FILE=`basename $ARCHIVE`
229         printf " * $FILE "
230         test -f tarballs/$FILE && printf "(cached)" || (
231                 printf "(downloading)"
232                 cd tarballs
233                 wget -q $ARCHIVE
234         )
235         test -f tarballs/$FILE || printf "\n${RED}Failed to download $FILE.${red}\n"
236         test -f tarballs/$FILE || exit 1
237         printf "\n"
238 done
239 printf "Downloaded tar balls ... "
240 printf "${green}ok${NC}\n"
241
242 MINGW_PACKAGES=""
243 if [ "$TARGETARCH" = "i386-mingw32" ]; then
244         MINGW_PACKAGES="W32API MINGWRT"
245 fi
246
247 printf "Unpacking and patching ... \n"
248 for PACKAGE in GMP MPFR MPC LIBELF GCC BINUTILS $GDB_PACKAGE $MINGW_PACKAGES IASL; do
249         archive=$PACKAGE"_ARCHIVE"
250         archive="`eval echo '$'$archive`"
251         dir=$PACKAGE"_DIR"
252         dir="`eval echo '$'${dir}`"
253         test -d ${dir} || (
254                 printf " * `basename $archive`\n"
255                 FLAGS=zxf
256                 suffix=`echo $archive | sed 's,.*\.,,'`
257                 test "$suffix" = "gz" && FLAGS=zxf
258                 test "$suffix" = "bz2" && FLAGS=jxf
259                 test "$suffix" = "lzma" && FLAGS="--lzma -xf"
260                 $TAR $FLAGS tarballs/`basename $archive`
261                 for patch in patches/${dir}_*.patch; do
262                         test -r $patch || continue
263                         printf "   o `basename $patch`\n"
264                         $PATCH -s -N -p0 < `echo $patch`
265                 done
266         )
267 done
268 printf "Unpacked and patched ... "
269 printf "${green}ok${NC}\n"
270
271 if [ "$TARGETARCH" = "i386-mingw32" ]; then
272         mkdir -p $TARGETDIR/i386-mingw32/sys-include
273         mv $MINGWRT_DIR/include/* $W32API_DIR/include/* $TARGETDIR/i386-mingw32/sys-include
274 fi
275
276 if [ `uname` = "Darwin" ]; then
277         #GCC_OPTIONS="$GCC_OPTIONS --enable-threads=posix"
278
279         # generally the OS X compiler can create x64 binaries.
280         # Per default it generated i386 binaries in 10.5 and x64
281         # binaries in 10.6 (even if the kernel is 32bit)
282         # For some weird reason, 10.5 autodetects an ABI=64 though
283         # so we're setting the ABI explicitly here.
284         if [ `sysctl -n hw.optional.x86_64` -eq 1 ]; then
285                 OPTIONS="ABI=64"
286         else
287                 OPTIONS="ABI=32"
288         fi
289         # old check:
290         #OPTIONS="ABI=32"
291         #touch .architecture_check.c
292         #gcc .architecture_check.c -c -o .architecture_check.o
293         #ARCH=`file .architecture_check.o |cut -f5 -d\ `
294         #test  "$ARCH" = "x86_64" && OPTIONS="ABI=64"
295         #rm .architecture_check.c .architecture_check.o
296 fi
297
298 mkdir -p build-gmp build-mpfr build-mpc build-libelf build-binutils build-gcc
299 if [ $SKIPGDB -eq 0 ]; then
300         mkdir -p build-gdb
301 fi
302 if [ -f build-gmp/.success ]; then
303         printf "Skipping GMP as it is already built\n"
304 else
305 printf "Building GMP ${GMP_VERSION} ... "
306 (
307         cd build-gmp
308         rm -f .failed
309         ../${GMP_DIR}/configure --disable-shared --prefix=$TARGETDIR $OPTIONS \
310                 || touch .failed
311         $MAKE $JOBS || touch .failed
312         $MAKE install DESTDIR=$DESTDIR || touch .failed
313         if [ ! -f .failed ]; then touch .success; fi
314 ) > build-gmp/crossgcc-build.log 2>&1
315 test -r build-gmp/.failed && printf "${RED}failed${NC}\n" || printf "${green}ok${NC}\n"
316 test -r build-gmp/.failed && exit 1
317 fi
318
319 #if [ "$DESTDIR" != "" -a ! -x $TARGETDIR ]; then
320 #       # create compat link
321 #       ln -s $DESTDIR$TARGETDIR $TARGETDIR
322 #fi
323
324 # Now set CFLAGS to match GMP CFLAGS.
325 HOSTCFLAGS=`grep __GMP_CFLAGS $DESTDIR$TARGETDIR/include/gmp.h |cut -d\" -f2`
326
327 if [ -f build-mpfr/.success ]; then
328         printf "Skipping MPFR as it is already built\n"
329 else
330 printf "Building MPFR ${MPFR_VERSION} ... "
331 (
332         test `uname` = "Darwin" && CFLAGS="$CFLAGS -force_cpusubtype_ALL"
333         cd build-mpfr
334         rm -f .failed
335         ../${MPFR_DIR}/configure --disable-shared --prefix=$TARGETDIR \
336                 --infodir=$TARGETDIR/info \
337                 --with-gmp=$DESTDIR$TARGETDIR CFLAGS="$HOSTCFLAGS" || touch .failed
338         $MAKE $JOBS || touch .failed
339         $MAKE install DESTDIR=$DESTDIR || touch .failed
340
341         # work around build problem of libgmp.la
342         if [ "$DESTDIR" != "" ]; then
343             perl -pi -e "s,$DESTDIR,," $DESTDIR$TARGETDIR/libgmp.la
344         fi
345
346         if [ ! -f .failed ]; then touch .success; fi
347 ) > build-mpfr/crossgcc-build.log 2>&1
348 test -r build-mpfr/.failed && printf "${RED}failed${NC}\n" || printf "${green}ok${NC}\n"
349 test -r build-mpfr/.failed && exit 1
350 fi
351
352 if [ -f build-mpc/.success ]; then
353         printf "Skipping MPC as it is already built\n"
354 else
355 printf "Building MPC ${MPC_VERSION} ... "
356 (
357         #test `uname` = "Darwin" && CFLAGS="$CFLAGS -force_cpusubtype_ALL"
358         cd build-mpc
359         rm -f .failed
360         ../${MPC_DIR}/configure --disable-shared --prefix=$TARGETDIR \
361                 --infodir=$TARGETDIR/info --with-mpfr=$DESTDIR$TARGETDIR \
362                 --with-gmp=$DESTDIR$TARGETDIR CFLAGS="$HOSTCFLAGS" || touch .failed
363         $MAKE $JOBS || touch .failed
364         $MAKE install DESTDIR=$DESTDIR || touch .failed
365
366         if [ ! -f .failed ]; then touch .success; fi
367 ) > build-mpc/crossgcc-build.log 2>&1
368 test -r build-mpc/.failed && printf "${RED}failed${NC}\n" || printf "${green}ok${NC}\n"
369 test -r build-mpc/.failed && exit 1
370 fi
371
372 if [ -f build-libelf/.success ]; then
373         printf "Skipping libelf as it is already built\n"
374 else
375 printf "Building libelf ${LIBELF_VERSION} ... "
376 (
377         cd build-libelf
378         rm -f .failed
379         echo "$HOSTCFLAGS"
380         CFLAGS="$HOSTCFLAGS" libelf_cv_elf_h_works=no ../${LIBELF_DIR}/configure --disable-shared --prefix=$TARGETDIR \
381                 --infodir=$TARGETDIR/info CFLAGS="$HOSTCFLAGS" || touch .failed
382         $MAKE $JOBS || touch .failed
383         $MAKE install DESTDIR=$DESTDIR || touch .failed
384
385         if [ ! -f .failed ]; then touch .success; fi
386 ) > build-libelf/crossgcc-build.log 2>&1
387 test -r build-libelf/.failed && printf "${RED}failed${NC}\n" || printf "${green}ok${NC}\n"
388 test -r build-libelf/.failed && exit 1
389 fi
390
391 if [ -f build-binutils/.success ]; then
392         printf "Skipping binutils as it is already built\n"
393 else
394 printf "Building binutils ${BINUTILS_VERSION} ... "
395 (
396         cd build-binutils
397         rm -f .failed
398         ../binutils-${BINUTILS_VERSION}/configure --prefix=$TARGETDIR --target=${TARGETARCH} \
399                 --disable-werror --disable-nls $USE_GOLD \
400                 CFLAGS="$HOSTCFLAGS" || touch .failed
401         $MAKE $JOBS || touch .failed
402         $MAKE install DESTDIR=$DESTDIR || touch .failed
403         if [ ! -f .failed ]; then touch .success; fi
404 ) > build-binutils/crossgcc-build.log 2>&1
405 test -r build-binutils/.failed && printf "${RED}failed${NC}\n" || printf "${green}ok${NC}\n"
406 test -r build-binutils/.failed && exit 1
407 fi
408
409 if [ -f build-gcc/.success ]; then
410         printf "Skipping GCC as it is already built\n"
411 else
412 printf "Building GCC ${GCC_VERSION} ... "
413 (
414         cd build-gcc
415         export PATH=$PATH:$DESTDIR$TARGETDIR/bin
416         rm -f .failed
417         # GCC does not honour HOSTCFLAGS at all. CFLAGS are used for
418         # both target and host object files. This is pretty misdesigned.
419         # There's a work-around called CFLAGS_FOR_BUILD and CFLAGS_FOR_TARGET
420         # but it does not seem to work properly. At least the host library
421         # libiberty is not compiled with CFLAGS_FOR_BUILD.
422         CFLAGS_FOR_TARGET="-O2" CFLAGS="$HOSTCFLAGS" CFLAGS_FOR_BUILD="$HOSTCFLAGS" `readlink -f ../gcc-${GCC_VERSION}/configure` \
423                 --prefix=$TARGETDIR --libexecdir=$TARGETDIR/lib \
424                 --target=${TARGETARCH} --disable-werror --disable-shared \
425                 --disable-libssp --disable-bootstrap --disable-nls \
426                 $GCC_OPTIONS --enable-languages="c" $USE_GOLD \
427                 --with-gmp=$DESTDIR$TARGETDIR --with-mpfr=$DESTDIR$TARGETDIR \
428                 --with-mpc=$DESTDIR$TARGETDIR --with-libelf=$DESTDIR$TARGETDIR \
429                 --with-pkgversion="coreboot toolchain v$CROSSGCC_VERSION $CROSSGCC_DATE" \
430                 || touch .failed
431         $MAKE $JOBS CFLAGS_FOR_BUILD="$HOSTCFLAGS" || touch .failed
432         $MAKE install DESTDIR=$DESTDIR || touch .failed
433         if [ ! -f .failed ]; then touch .success; fi
434 ) > build-gcc/crossgcc-build.log 2>&1
435 test -r build-gcc/.failed && printf "${RED}failed${NC}\n" || printf "${green}ok${NC}\n"
436 test -r build-gcc/.failed && exit 1
437 fi
438
439 if [ -f build-gdb/.success ]; then
440         printf "Skipping GDB as it is already built\n"
441 elif [ $SKIPGDB -eq 1 ]; then
442         printf "Skipping GDB as requested by command line\n"
443 else
444 printf "Building GDB ${GDB_VERSION} ... "
445 (
446         cd build-gdb
447         export PATH=$PATH:$DESTDIR$TARGETDIR/bin
448         rm -f .failed
449         CFLAGS="$HOSTCFLAGS" ../gdb-${GDB_VERSION}/configure --prefix=$TARGETDIR --target=${TARGETARCH} \
450                 --without-python --disable-werror --disable-nls
451         $MAKE $JOBS || touch .failed
452         $MAKE install DESTDIR=$DESTDIR || touch .failed
453         if [ ! -f .failed ]; then touch .success; fi
454 ) > build-gdb/crossgcc-build.log 2>&1
455 test -r build-gdb/.failed && printf "${RED}failed${NC}\n" || printf "${green}ok${NC}\n"
456 test -r build-gdb/.failed && exit 1
457 fi
458
459 if [ -f $IASL_DIR/compiler/.success ]; then
460         printf "Skipping IASL as it is already built\n"
461 else
462 printf "Building IASL ${IASL_VERSION} ... "
463 (
464         cd $IASL_DIR/compiler
465         export PATH=$PATH:$DESTDIR$TARGETDIR/bin
466         rm -f .failed
467         CFLAGS="$HOSTCFLAGS"
468         $MAKE || touch .failed
469         rm -f $DESTDIR$TARGETDIR/bin/iasl || touch .failed
470         cp iasl $DESTDIR$TARGETDIR/bin || touch .failed
471         if [ ! -f .failed ]; then touch .success; fi
472 ) > $IASL_DIR/compiler/crossgcc-build.log 2>&1
473 test -r $IASL_DIR/compiler/.failed && printf "${RED}failed${NC}\n" || printf "${green}ok${NC}\n"
474 test -r $IASL_DIR/compiler/.failed && exit 1
475 fi
476
477 if [ $SAVETEMPS -eq 0 ]; then
478         printf "Cleaning up... "
479         rm -rf ${GMP_DIR} build-gmp
480         rm -rf ${MPFR_DIR} build-mpfr
481         rm -rf ${MPC_DIR} build-mpc
482         rm -rf ${LIBELF_DIR} build-libelf
483         rm -rf ${BINUTILS_DIR} build-binutils
484         rm -rf ${GCC_DIR} build-gcc
485         rm -rf ${GDB_DIR} build-gdb
486         rm -rf ${IASL_DIR}
487         printf "${green}ok${NC}\n"
488 else
489         printf "Leaving temporary files around... ${green}ok${NC}\n"
490 fi
491
492 printf "\n${green}You can now run your $TARGETARCH cross toolchain from $TARGETDIR.${NC}\n"
493
494