From 1c91ed03fa74c5e847fc153157be2344189df066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sat, 18 Apr 2015 15:11:32 +0200 Subject: [PATCH] Build binutils with different extra targets depending on arch EFI support isn't much useful for ARM. Also add some targets to help debugging binutils on PPC. --- build/scripts/build_cross_tools_gcc4 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/build/scripts/build_cross_tools_gcc4 b/build/scripts/build_cross_tools_gcc4 index 0b20a83927..7fac834ae7 100755 --- a/build/scripts/build_cross_tools_gcc4 +++ b/build/scripts/build_cross_tools_gcc4 @@ -18,12 +18,19 @@ additionalMakeArgs=$* ccFlags="-O2" cxxFlags="-O2" +binutilsTargets="$haikuMachine" case $haikuMachine in +i586-*) + binutilsConfigureArgs="--disable-multilib" + gccConfigureArgs="--disable-multilib" + binutilsTargets="$binutilsTargets,i386-efi-pe,x86_64-efi-pe" + ;; x86_64-*) # GCC's default is to enable multilib, but there is a bug when # explicitly using --enable-multilib that causes a build # failure binutilsConfigureArgs="" + binutilsTargets="$binutilsTargets,i386-efi-pe,x86_64-efi-pe" ;; m68k-*) binutilsConfigureArgs="--enable-multilib" @@ -41,6 +48,11 @@ arm-*) binutilsConfigureArgs="$binutilsConfigureArgs --disable-tls" gccConfigureArgs="$gccConfigureArgs --disable-tls" ;; +powerpc-*) + binutilsConfigureArgs="--disable-multilib" + gccConfigureArgs="--disable-multilib" + binutilsTargets="$binutilsTargets,powerpc-apple-linux,powerpc-apple-freebsd,powerpc-apple-vxworks" + ;; *) binutilsConfigureArgs="--disable-multilib" gccConfigureArgs="--disable-multilib" @@ -147,7 +159,7 @@ export LC_ALL=POSIX cd "$binutilsObjDir" CFLAGS="$ccFlags" CXXFLAGS="$cxxFlags" "$binutilsSourceDir/configure" \ --prefix="$installDir" $buildHostSpec --target=$haikuMachine \ - --enable-targets=$haikuMachine,i386-efi-pe,x86_64-efi-pe \ + --enable-targets=$binutilsTargets \ --disable-nls --disable-shared --disable-werror \ --with-sysroot="$sysrootDir" \ $binutilsConfigureArgs \