summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2015-06-09 12:24:54 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-06-10 07:32:43 +0200
commit2f97ebc4c93530f8e394ad035773ad78521b08db (patch)
treef2bf83225246780e7fb1bc112ddfa8694af08cbc /util
parent85b07d68c1d8ff88f98dd9959749945ce276cb8d (diff)
downloadcoreboot-2f97ebc4c93530f8e394ad035773ad78521b08db.tar.xz
buildgcc: build with bfd and gold linker
Build with bfd and gold linker, but use bfd linker per default and make sure that lto is enabled in both binutils and gcc Change-Id: I0584396b4580674cfdca24fbed0d8eeb1ee38806 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10496 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
Diffstat (limited to 'util')
-rwxr-xr-xutil/crossgcc/buildgcc10
1 files changed, 3 insertions, 7 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 0d402c2a36..3bee6dc725 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -382,7 +382,7 @@ build_BINUTILS() {
# Now build binutils
CC="$CC" ../binutils-${BINUTILS_VERSION}/configure --prefix=$TARGETDIR \
--target=${TARGETARCH} --disable-werror --disable-nls \
- $USE_GOLD CFLAGS="$HOSTCFLAGS" || touch .failed
+ --enable-lto --enable-gold --enable-plugins CFLAGS="$HOSTCFLAGS" || touch .failed
$MAKE $JOBS || touch .failed
$MAKE install DESTDIR=$DESTDIR || touch .failed
}
@@ -398,9 +398,10 @@ build_GCC() {
CFLAGS_FOR_BUILD="$HOSTCFLAGS" ../gcc-${GCC_VERSION}/configure \
--prefix=$TARGETDIR --libexecdir=$TARGETDIR/lib \
--target=${TARGETARCH} --disable-werror --disable-shared \
+ --enable-lto --enable-plugins --enable-gold --enable-ld=default \
--disable-libssp --disable-bootstrap --disable-nls \
--disable-libquadmath --without-headers \
- $GCC_OPTIONS --enable-languages="c" $USE_GOLD \
+ ${GCC_OPTIONS} --enable-languages="c" \
--with-gmp=$DESTDIR$TARGETDIR --with-mpfr=$DESTDIR$TARGETDIR \
--with-mpc=$DESTDIR$TARGETDIR --with-libelf=$DESTDIR$TARGETDIR \
--with-pkgversion="coreboot toolchain v$CROSSGCC_VERSION $CROSSGCC_DATE" \
@@ -596,11 +597,6 @@ if [ "$USECCACHE" = 1 ]; then
CC="ccache $CC"
fi
-# coreboot does not like the GOLD linker
-# USE_GOLD="--enable-gold"
-USE_GOLD=""
-GCC_OPTIONS="--enable-lto"
-
# Prepare target directory for building GCC
# (dependencies must be in the PATH)
mkdir -p $DESTDIR$TARGETDIR/bin