summaryrefslogtreecommitdiff
path: root/util/crossgcc/buildgcc
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2015-06-09 14:59:58 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-06-17 21:15:07 +0200
commit682a90c011c3cfbf89ce7af06db92d999161056a (patch)
treeaaf281e2d6e8665c8c3684d3834bff17dd164995 /util/crossgcc/buildgcc
parentd9628ece50bdbee32b2db9f63bc8cbba10e5ff1a (diff)
buildgcc: enable biarch support for x86_64-elf
With this change, the x86_64-elf-gcc can compile i386-elf binaries by specifying -m32. The patch against GCC is needed to enable building the 32bit libraries when building x86_64-elf-gcc Change-Id: Ic86a009eccfdf3e33a398bcdcc13b15c8dfc0d31 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10497 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/crossgcc/buildgcc')
-rwxr-xr-xutil/crossgcc/buildgcc13
1 files changed, 8 insertions, 5 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index c27d62cd7f..0ab0a530e4 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -22,8 +22,8 @@
cd $(dirname $0)
-CROSSGCC_DATE="June 9th, 2015"
-CROSSGCC_VERSION="1.30"
+CROSSGCC_DATE="June 17th, 2015"
+CROSSGCC_VERSION="1.31"
# default settings
PACKAGE=GCC
@@ -380,10 +380,13 @@ build_LIBELF() {
}
build_BINUTILS() {
- # Now build binutils
+ if [ $TARGETARCH == "x86_64-elf" ]; then
+ ADDITIONALTARGET=",i386-elf"
+ fi
CC="$CC" ../binutils-${BINUTILS_VERSION}/configure --prefix=$TARGETDIR \
- --target=${TARGETARCH} --disable-werror --disable-nls \
- --enable-lto --enable-gold --enable-plugins CFLAGS="$HOSTCFLAGS" || touch .failed
+ --target=${TARGETARCH} --enable-targets=${TARGETARCH}${ADDITIONALTARGET} \
+ --disable-werror --disable-nls --enable-lto --enable-gold \
+ --enable-plugins --enable-multilibs CFLAGS="$HOSTCFLAGS" || touch .failed
$MAKE $JOBS || touch .failed
$MAKE install DESTDIR=$DESTDIR || touch .failed
}