From d34addaf3fdd0a9c64402d595a7e45c770143460 Mon Sep 17 00:00:00 2001 From: waddlesplash Date: Mon, 27 Aug 2018 22:06:33 -0400 Subject: [PATCH] build_cross_tools: Compile GCC2 as 32-bit everywhere. It is just straight up broken on most systems without this, as the same "cast specifies signature type" appears there too. Exactly why this fixes the problem does not appear to be any more known than it was when this was first instated in 2012. --- build/scripts/build_cross_tools | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/build/scripts/build_cross_tools b/build/scripts/build_cross_tools index 58776f1761..eed12fea24 100755 --- a/build/scripts/build_cross_tools +++ b/build/scripts/build_cross_tools @@ -151,12 +151,8 @@ copy_headers $haikuSourceDir/headers/posix $tmpIncludeDir/posix # configure gcc cd $gccObjDir -case `uname` in - Darwin) - # GCC 2 compiled for x86_64 OS X is broken, compile for i386. - export CC="gcc -arch i386" - ;; -esac +# GCC 2 compiled for x86_64 on most systems is broken, compile for 32-bit. +export CC="gcc -m32" CFLAGS="-O2 -U_FORTIFY_SOURCE" CXXFLAGS="-O2" $buildToolsDir/gcc/configure \ --prefix=$installDir $buildHostSpec --target=i586-pc-haiku \ --disable-nls --enable-shared=yes --enable-languages=c,c++ \