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>
This commit is contained in:
Stefan Reinauer
2015-06-09 14:59:58 -07:00
parent d9628ece50
commit 682a90c011
2 changed files with 84 additions and 5 deletions

View File

@ -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
}