aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-configure-common.inc
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-19 00:09:14 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-19 23:03:51 +0000
commited318c493af1acd5ecc7646d25af97ccc3710d53 (patch)
treecd11dc574ee7bc8520124d45bf40a9b039068150 /meta/recipes-devtools/gcc/gcc-configure-common.inc
parentf7afe6eba365be8b60dd696417f53426319354aa (diff)
downloadopenembedded-core-contrib-ed318c493af1acd5ecc7646d25af97ccc3710d53.tar.gz
gcc: Drop gcc-cross-initial and use gcc-cross instead
We need a libgcc to build glibc. Tranditionally we therefore build a non-threaded and non-shared compiler (gcc-cross-initial), then use that to build libgcc-initial which is used to build glibc which we can then build gcc-cross and libgcc against. Firstly, we can drop the glibc dependency from gcc-cross, *if* we make two changes: a) specify the minimum glibc version to support in a configure option b) create a dummy limits.h file so that later when glibc creates one, the headers structure has support for it. We can do this with a simple empty file Once gcc-cross is libc independent, we can use it to build both libgcc-initial and then later libgcc. libgcc-initial is tricky as we need to imitate the non-threaded and non-shared case. We can do that by hacking the threading mode back to "single" even if gcc reports "posix" and disable libc presence for the libgcc-intial build. We have to create the dummy limits.h to avoid compiler errors from a missing header. glibc will fail to link with libgcc-initial due to a missing "exception handler" capable libgcc (libgcc_eh.a). Since we know glibc doesn't need any exception handler, we can safely symlink to libgcc.a. With those changes, gcc-cross can be used in all places and we only need one build of gcc for each architecture. For some reason ifunc was being disabled on mips prior to these changes but afterwards became enabled but caused assertion failures. This is therefore disabled until we can debug that. The glibc version is a minimum and only used on ppc in the gcc code, it doesn't need to be rigerously kept exactly up to date. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-configure-common.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-common.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index e2ce234aa1..009ab11168 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -24,6 +24,8 @@ GCCTHREADS ?= "posix"
GCCPIE ??= ""
+# glibc version is a minimum and doesn't need to track glibc exactly
+# only governs ppc specific features in much older glibc versions
EXTRA_OECONF = "\
${@['--enable-clocale=generic', ''][d.getVar('USE_NLS') != 'no']} \
--with-gnu-ld \
@@ -38,6 +40,7 @@ EXTRA_OECONF = "\
--enable-libstdcxx-pch \
--program-prefix=${TARGET_PREFIX} \
--without-local-prefix \
+ --with-glibc-version=2.28 \
${EXTRA_OECONF_BASE} \
${EXTRA_OECONF_GCC_FLOAT} \
${EXTRA_OECONF_PATHS} \