]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
gcc-configure-common.inc: drop --enable-target-optspace from configure
authorAndre McCurdy <armccurdy@gmail.com>
Mon, 1 Feb 2016 22:01:24 +0000 (14:01 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 2 Feb 2016 14:42:14 +0000 (14:42 +0000)
Configuring gcc with --enable-target-optspace (which causes gcc to
append "-g -Os" to the default CFLAGS_FOR_TARGET and so force libgcc
etc target libraries to always be optimised for size) dates back to
the very first commit in oe-core git in 2005 (for gcc 3.4.3).

Configuring gcc with --enable-target-optspace is not done widely
elsewhere (it's not used for Ubuntu or Fedora host gcc, the Linaro
binary toolchain or in Buildroot since early 2015). Sometime around
gcc 4.5.x it caused problems for powerpc and so was disabled for that
architecture:

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810

This patch removes --enable-target-optspace completely (ie powerpc is
no longer a special case) and allows optimisation of libgcc etc to be
controlled directly by the flags present in TARGET_CFLAGS.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-configure-common.inc
meta/recipes-devtools/gcc/gcc-cross-initial.inc

index 85e69db535c62d022b841e65833ce3d4de12d50c..f4f76bda53a371b71af7b7b174946b154a859fb3 100644 (file)
@@ -14,13 +14,6 @@ JAVA_sh3 ?= ""
 # gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran'
 FORTRAN ?= ",f77"
 LANGUAGES ?= "c,c++${FORTRAN}${JAVA}"
-# disable --enable-target-optspace for powerpc SPE
-# at -Os libgcc.so.1 creates references into
-# hidden symbols in libgcc.a which linker complains
-# when linking shared libraries further in the build like (gnutls)
-
-SPECIAL_ARCH_LIST = "powerpc"
-OPTSPACE = '${@bb.utils.contains("SPECIAL_ARCH_LIST", "${TARGET_ARCH}", "", "--enable-target-optspace",d)}'
 
 EXTRA_OECONF_BASE ?= ""
 EXTRA_OECONF_PATHS ?= ""
@@ -42,7 +35,6 @@ EXTRA_OECONF = "\
     --enable-libstdcxx-pch \
     --program-prefix=${TARGET_PREFIX} \
     --without-local-prefix \
-    ${OPTSPACE} \
     ${EXTRA_OECONF_BASE} \
     ${EXTRA_OECONF_GCC_FLOAT} \
     ${EXTRA_OECONF_PATHS} \
index 910f2ef4d5adb27050c65c527b1136378d96d6da..048b5302be2df8a041e41d9825e9391cd83a6b8a 100644 (file)
@@ -22,7 +22,6 @@ EXTRA_OECONF = "\
     --disable-multilib \
     --disable-__cxa_atexit \
     --enable-languages=c \
-    ${OPTSPACE} \
     --program-prefix=${TARGET_PREFIX} \
     --with-sysroot=/not/exist \
     --with-build-sysroot=${GCCCROSS_BUILDSYSROOT} \