From c33a98eebcf5b9ca9612cce60ea5ff405376ee8d Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Wed, 14 Oct 2020 09:23:40 -0500 Subject: [PATCH] build/scripts/gcc2: Specify -fcommon as the default changed in gcc10 * gcc10 changed to -fno-common default * Resolves #16520 Change-Id: I9af2234532177f2153159eea94a05a106587ebbb Reviewed-on: https://review.haiku-os.org/c/haiku/+/3317 Reviewed-by: Adrien Destugues --- build/scripts/build_cross_tools | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/scripts/build_cross_tools b/build/scripts/build_cross_tools index 5926934a62..bbbb04605e 100755 --- a/build/scripts/build_cross_tools +++ b/build/scripts/build_cross_tools @@ -118,7 +118,7 @@ fi # build binutils cd $binutilsObjDir -CFLAGS="-O2" CXXFLAGS="-O2" $buildToolsDir/binutils/configure \ +CFLAGS="-O2 -fcommon" CXXFLAGS="-O2 -fcommon" $buildToolsDir/binutils/configure \ --prefix=$installDir $buildHostSpec --target=i586-pc-haiku \ --disable-nls --enable-shared=yes --disable-werror || exit 1 $MAKE $additionalMakeArgs || exit 1 @@ -159,7 +159,7 @@ copy_headers $haikuSourceDir/headers/posix $tmpIncludeDir/posix cd $gccObjDir # 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 \ +CFLAGS="-O2 -U_FORTIFY_SOURCE -fcommon" CXXFLAGS="-O2 -fcommon" $buildToolsDir/gcc/configure \ --prefix=$installDir $buildHostSpec --target=i586-pc-haiku \ --disable-nls --enable-shared=yes --enable-languages=c,c++ \ --with-headers=$tmpIncludeDir --with-libs=$tmpLibDir $gccConfigureArgs \