Skip to contentSkip to conversation

glibc: Remove site_config and glibc-initial

PATCH In review Richard Purdie 6 participants 15 messages Dec 20, 2018 – Dec 21, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 glibc: Remove site_config and glibc-initial

The only reason we appear to need glibc-initial at this time is to support the site_config code. The site_config code compiles and therefore needs at least some level of working C library to link against.

This isn't a good reason to keep the complexity of glibc-initial around so remove it, and the site_config support which then breaks.

Performance benchmarks suggest the time spent just rerunning configure for site_config just about equals any performance benefit for OE-Core image builds excluding the time spent adding glibc-initial to the dependency chain.

I'm not opposed to readding some other form of site_config support but it needs to be rethought.

---
 meta/recipes-core/glibc/glibc-initial.inc     |  57 ---
 meta/recipes-core/glibc/glibc-initial_2.28.bb |   9 -
 meta/recipes-core/glibc/glibc.inc             |  16 +-
 meta/recipes-core/glibc/site_config/funcs     | 474 ------------------
 meta/recipes-core/glibc/site_config/headers   | 155 ------
 meta/recipes-core/glibc/site_config/types     |  21 -
 6 files changed, 1 insertion(+), 731 deletions(-)
 delete mode 100644 meta/recipes-core/glibc/glibc-initial.inc
 delete mode 100644 meta/recipes-core/glibc/glibc-initial_2.28.bb
 delete mode 100644 meta/recipes-core/glibc/site_config/funcs
 delete mode 100644 meta/recipes-core/glibc/site_config/headers
 delete mode 100644 meta/recipes-core/glibc/site_config/types
meta/recipes-core/glibc/glibc-initial.inc deleted +0 -57
deleted file mode 100644
index acd0d6b1dc5..00000000000
@@ -1,57 +0,0 @@
-DEPENDS = "linux-libc-headers virtual/${TARGET_PREFIX}gcc-initial libgcc-initial make-native bison-native"
-PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
-
-PACKAGES = ""
-PACKAGES_DYNAMIC = ""
-
-STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
-STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
-
-do_configure () {
-	(cd ${S} && gnu-configize) || die "failure in running gnu-configize"
-	find ${S} -name "configure" | xargs touch
-	cfgscript=`python3 -c "import os; print(os.path.relpath('${S}', '.'))"`/configure
-	$cfgscript --host=${TARGET_SYS} --build=${BUILD_SYS} \
-		--prefix=/usr \
-		--disable-sanity-checks \
-		--with-headers=${STAGING_DIR_TARGET}${includedir} \
-		--enable-hacker-mode
-}
-
-do_compile () {
-	:
-}
-
-do_install () {
-	oe_runmake cross-compiling=yes install_root=${D} \
-	includedir='${includedir}' prefix='${prefix}' \
-	install-bootstrap-headers=yes install-headers
-
-	oe_runmake csu/subdir_lib
-	mkdir -p ${D}${libdir}/
-	install -m 644 csu/crt[1in].o ${D}${libdir}
-
-	# Two headers -- stubs.h and features.h -- aren't installed by install-headers,
-	# so do them by hand.  We can tolerate an empty stubs.h for the moment.
-	# See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
-	mkdir -p ${D}${includedir}/gnu/
-	touch ${D}${includedir}/gnu/stubs.h
-	cp ${S}/include/features.h ${D}${includedir}/features.h
-
-	if [ -e ${B}/bits/stdio_lim.h ]; then
-		cp ${B}/bits/stdio_lim.h  ${D}${includedir}/bits/
-	fi
-}
-
-do_stash_locale() {
-	:
-}
-
-do_siteconfig () {
-	:
-}
-
-inherit nopackages
-
-# We really only want this built by things that need it, not any recrdeptask
-deltask do_build
meta/recipes-core/glibc/glibc-initial_2.28.bb deleted +0 -9
deleted file mode 100644
index e86770e12d4..00000000000
@@ -1,9 +0,0 @@
-require glibc_${PV}.bb
-require glibc-initial.inc
-
-# main glibc recipes muck with TARGET_CPPFLAGS to point into
-# final target sysroot but we
-# are not there when building glibc-initial
-# so reset it here
-
-TARGET_CPPFLAGS = ""
meta/recipes-core/glibc/glibc.inc +1 -15
index 99c92ce46e4..43e71337eef 100644
@@ -15,21 +15,7 @@ python () {
         bb.fatal("%s can't be built with %s, try -O1 instead" % (d.getVar('PN'), opt_effective))
 }
 
-# siteconfig.bbclass runs configure which needs a working compiler
-# For the compiler to work we need a working libc yet libc isn't
-# in the sysroots directory at this point. This means the libc.so
-# linker script won't work as the --sysroot setting isn't correct.
-# Here we create a hacked up libc linker script and pass in the right
-# flags to let configure work. Ugly.
-EXTRASITECONFIG = "CFLAGS='${CFLAGS} -Wl,-L${WORKDIR}/site_config_libc -L${WORKDIR}/site_config_libc -L${SYSROOT_DESTDIR}${libdir} -L${SYSROOT_DESTDIR}${base_libdir} -Wl,-L${SYSROOT_DESTDIR}${libdir} -Wl,-L${SYSROOT_DESTDIR}${base_libdir}'"
-siteconfig_do_siteconfig_gencache_prepend = " \
-	mkdir -p ${WORKDIR}/site_config_libc; \
-	cp ${SYSROOT_DESTDIR}${libdir}/libc.so ${WORKDIR}/site_config_libc; \
-	sed -i -e 's# ${base_libdir}# ${SYSROOT_DESTDIR}${base_libdir}#g' -e 's# ${libdir}# ${SYSROOT_DESTDIR}${libdir}#g' ${WORKDIR}/site_config_libc/libc.so; \
-"
-
-# nptl needs unwind support in gcc, which can't be built without glibc.
-DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers virtual/${TARGET_PREFIX}libc-initial"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers"
 
 PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
 PROVIDES += "virtual/libintl virtual/libiconv"
meta/recipes-core/glibc/site_config/funcs deleted +0 -474

474 lines not on this page · raw message

meta/recipes-core/glibc/site_config/headers deleted +0 -155

155 lines not on this page · raw message

meta/recipes-core/glibc/site_config/types deleted +0 -21
deleted file mode 100644
index 178bd85a00b..00000000000
@@ -1,21 +0,0 @@
-char
-char *
-double
-float
-int
-long
-long double
-long int
-long long
-long long int
-short
-short int
-signed char
-unsigned char
-unsigned int
-unsigned long
-unsigned long int
-unsigned long long int
-unsigned short
-unsigned short int
-void *
Signature · 1 line
2.19.1
#1 lore raw

PATCH 2/4 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.

---
 meta/recipes-core/glibc/glibc.inc             |  5 +-
 .../gcc/gcc-configure-common.inc              |  3 ++
 .../gcc/gcc-cross-canadian.inc                |  2 +-
 meta/recipes-devtools/gcc/gcc-cross.inc       |  8 ++-
 meta/recipes-devtools/gcc/libgcc-initial.inc  | 52 ++++++++++++++++---
 meta/recipes-devtools/gcc/libgcc.inc          |  2 +-
 6 files changed, 61 insertions(+), 11 deletions(-)
meta/recipes-core/glibc/glibc.inc +4 -1
index 43e71337eef..de692fbfd75 100644
@@ -15,7 +15,7 @@ python () {
         bb.fatal("%s can't be built with %s, try -O1 instead" % (d.getVar('PN'), opt_effective))
 }
 
-DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc libgcc-initial linux-libc-headers"
 
 PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
 PROVIDES += "virtual/libintl virtual/libiconv"
@@ -33,6 +33,9 @@ CACHED_CONFIGUREVARS += " \
   libc_cv_ssp=no \
 "
 
+# ifunc doesn't appear to work on mips, casuses libbfd assertion failures
+CACHED_CONFIGUREVARS_append_mipsarch = " libc_cv_ld_gnu_indirect_function=no"
+
 GLIBC_EXTRA_OECONF ?= ""
 GLIBC_EXTRA_OECONF_class-nativesdk = ""
 INHIBIT_DEFAULT_DEPS = "1"
meta/recipes-devtools/gcc/gcc-configure-common.inc +3 -0
index e2ce234aa14..009ab111683 100644
@@ -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} \
meta/recipes-devtools/gcc/gcc-cross-canadian.inc +1 -1
index 2f32d3407fb..73f1e054463 100644
@@ -3,7 +3,7 @@ inherit cross-canadian
 SUMMARY = "GNU cc and gcc C compilers (cross-canadian for ${TARGET_ARCH} target)"
 PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 
-DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext flex-native"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext flex-native virtual/libc"
 
 GCCMULTILIB = "--enable-multilib"
 
meta/recipes-devtools/gcc/gcc-cross.inc +7 -1
index 89b19684bef..63a196e2e99 100644
@@ -2,7 +2,7 @@ inherit cross
 
 INHIBIT_DEFAULT_DEPS = "1"
 EXTRADEPENDS = ""
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc ${EXTRADEPENDS} ${NATIVEDEPS}"
+DEPENDS = "virtual/${TARGET_PREFIX}binutils ${EXTRADEPENDS} ${NATIVEDEPS}"
 PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
 python () {
     if d.getVar("TARGET_OS").startswith("linux"):
@@ -44,6 +44,12 @@ EXTRA_OECONF_PATHS = "\
 
 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}"
 
+
+do_configure_prepend () {
+	install -d ${RECIPE_SYSROOT}${target_includedir}
+	touch ${RECIPE_SYSROOT}${target_includedir}/limits.h
+}
+
 do_compile () {
 	export CC="${BUILD_CC}"
 	export AR_FOR_TARGET="${TARGET_SYS}-ar"
meta/recipes-devtools/gcc/libgcc-initial.inc +45 -7

65 lines not on this page · raw message

meta/recipes-devtools/gcc/libgcc.inc +1 -1
index 5f1dff609c0..e4e0c480076 100644
@@ -1,6 +1,6 @@
 require libgcc-common.inc
 
-DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ virtual/${MLPREFIX}libc"
 
 do_install_append_class-target () {
 	if [ "${TCLIBC}" != "glibc" ]; then
Signature · 1 line
2.19.1
#2 lore raw

Re: [PATCH 2/4] gcc: Drop gcc-cross-initial and use gcc-cross instead

Hi Richard

This is a very good change all in all. I have few comments I added.

Quoted 61 lines · Richard Purdie

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.

---
 meta/recipes-core/glibc/glibc.inc             |  5 +-
 .../gcc/gcc-configure-common.inc              |  3 ++
 .../gcc/gcc-cross-canadian.inc                |  2 +-
 meta/recipes-devtools/gcc/gcc-cross.inc       |  8 ++-
 meta/recipes-devtools/gcc/libgcc-initial.inc  | 52 ++++++++++++++++---
 meta/recipes-devtools/gcc/libgcc.inc          |  2 +-
 6 files changed, 61 insertions(+), 11 deletions(-)
meta/recipes-core/glibc/glibc.inc +1 -1
index 43e71337eef..de692fbfd75 100644
@@ -15,7 +15,7 @@ python () {
         bb.fatal("%s can't be built with %s, try -O1 instead" % (d.getVar('PN'), opt_effective))
 }
 
-DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc libgcc-initial linux-libc-headers"
 
 PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
 PROVIDES += "virtual/libintl virtual/libiconv"

meta/recipes-core/glibc/glibc.inc CACHED_CONFIGUREVARS += " \ · line 37

Quoted 5 lines
meta/recipes-core/glibc/glibc.inc +2 -0
@@ -33,6 +33,9 @@ CACHED_CONFIGUREVARS += " \
   libc_cv_ssp=no \
 "
 
+# ifunc doesn't appear to work on mips, casuses libbfd assertion failures
+CACHED_CONFIGUREVARS_append_mipsarch = " libc_cv_ld_gnu_indirect_function=no"

perhaps we should use --disable-gnu-indirect-function to make it more readable.

Quoted 9 lines
meta/recipes-core/glibc/glibc.inc +1 -0
+
 GLIBC_EXTRA_OECONF ?= ""
 GLIBC_EXTRA_OECONF_class-nativesdk = ""
 INHIBIT_DEFAULT_DEPS = "1"
meta/recipes-devtools/gcc/gcc-configure-common.inc +0 -0
index e2ce234aa14..009ab111683 100644

meta/recipes-devtools/gcc/gcc-configure-common.inc GCCTHREADS ?= "posix" · line 28

Quoted 5 lines
meta/recipes-devtools/gcc/gcc-configure-common.inc +2 -0
@@ -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

I hope there are no effects of this pinning to glibc 2.28 on non-glibc builds especially musl.

Quoted 38 lines
meta/recipes-devtools/gcc/gcc-configure-common.inc +1 -0
 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} \
meta/recipes-devtools/gcc/gcc-cross-canadian.inc +1 -1
index 2f32d3407fb..73f1e054463 100644
@@ -3,7 +3,7 @@ inherit cross-canadian
 SUMMARY = "GNU cc and gcc C compilers (cross-canadian for ${TARGET_ARCH} target)"
 PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 
-DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext flex-native"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext flex-native virtual/libc"
 
 GCCMULTILIB = "--enable-multilib"
 
meta/recipes-devtools/gcc/gcc-cross.inc +1 -1
index 89b19684bef..63a196e2e99 100644
@@ -2,7 +2,7 @@ inherit cross
 
 INHIBIT_DEFAULT_DEPS = "1"
 EXTRADEPENDS = ""
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc ${EXTRADEPENDS} ${NATIVEDEPS}"
+DEPENDS = "virtual/${TARGET_PREFIX}binutils ${EXTRADEPENDS} ${NATIVEDEPS}"
 PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
 python () {
     if d.getVar("TARGET_OS").startswith("linux"):

meta/recipes-devtools/gcc/gcc-cross.inc EXTRA_OECONF_PATHS = "\ · line 50

Quoted 7 lines
meta/recipes-devtools/gcc/gcc-cross.inc +4 -0
@@ -44,6 +44,12 @@ EXTRA_OECONF_PATHS = "\
 
 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}"
 
+
+do_configure_prepend () {
+       install -d ${RECIPE_SYSROOT}${target_includedir}
+       touch ${RECIPE_SYSROOT}${target_includedir}/limits.h

I wonder if we should use install 0644 so we dont have permission errors not sure what touch will do in that regard

Quoted 95 lines
meta/recipes-devtools/gcc/gcc-cross.inc +2 -0
+}
+
 do_compile () {
        export CC="${BUILD_CC}"
        export AR_FOR_TARGET="${TARGET_SYS}-ar"
meta/recipes-devtools/gcc/libgcc-initial.inc +45 -7
index 950ad861e7e..06bf224f734 100644
@@ -1,20 +1,58 @@
+#
+# Notes on the way the OE cross toolchain now works
+#
+# We need a libgcc to build glibc. Tranditionally we therefore built
+# 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.
+#
+# We were able to drop the glibc dependency from gcc-cross, with two tweaks:
+
+# 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.
+#
+
 require libgcc-common.inc
 
-DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc"
 
 LICENSE = "GPL-3.0-with-GCC-exception"
 
-STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
-STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
-PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
-
 PACKAGES = ""
 
 EXTRA_OECONF += "--disable-shared"
 
-COMPILERINITIAL = "-initial"
-
 inherit nopackages
 
 # We really only want this built by things that need it, not any recrdeptask
 deltask do_build
+
+do_configure_prepend () {
+       install -d ${STAGING_INCDIR}
+       touch ${STAGING_INCDIR}/limits.h
+       sed -i -e 's#INHIBIT_LIBC_CFLAGS =.*#INHIBIT_LIBC_CFLAGS = -Dinhibit_libc#' ${B}/gcc/libgcc.mvars
+       sed -i -e 's#inhibit_libc = false#inhibit_libc = true#' ${B}/gcc/Makefile
+}
+
+do_configure_append () {
+       sed -i -e 's#thread_header = .*#thread_header = gthr-single.h#' ${B}/${BPN}/Makefile
+}
+
+do_install_append () {
+       ln -s libgcc.a ${D}${libdir}/${TARGET_SYS}/${BINV}/libgcc_eh.a
+}
meta/recipes-devtools/gcc/libgcc.inc +1 -2
index 5f1dff609c0..e4e0c480076 100644
@@ -1,6 +1,6 @@
 require libgcc-common.inc
 
-DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ virtual/${MLPREFIX}libc"
 
 do_install_append_class-target () {
        if [ "${TCLIBC}" != "glibc" ]; then
--

2.19.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw

Re: [PATCH 2/4] gcc: Drop gcc-cross-initial and use gcc-cross instead

Quoted 9 lines · Khem Raj
Quoted 4 lines · Richard Purdie

+# ifunc doesn't appear to work on mips, casuses libbfd assertion failures
+CACHED_CONFIGUREVARS_append_mipsarch = " libc_cv_ld_gnu_indirect_function=no"

perhaps we should use --disable-gnu-indirect-function to make it more readable.

I did it this way to exactly emulate how it was "failing" prior to the changes.

Quoted 11 lines
Quoted 11 lines
meta/recipes-core/glibc/glibc.inc +1 -0
+
 GLIBC_EXTRA_OECONF ?= ""
 GLIBC_EXTRA_OECONF_class-nativesdk = ""
 INHIBIT_DEFAULT_DEPS = "1"
meta/recipes-devtools/gcc/gcc-configure-common.inc +0 -0
index e2ce234aa14..009ab111683 100644
@@ -24,6 +24,8 @@ GCCTHREADS ?= "posix"
 
Quoted 8 lines
Quoted 5 lines
meta/recipes-devtools/gcc/gcc-configure-common.inc +1 -0
 GCCPIE ??= ""
 
+# glibc version is a minimum and doesn't need to track glibc

exactly
+# only governs ppc specific features in much older glibc versions

I hope there are no effects of this pinning to glibc 2.28 on non- glibc builds especially musl.

I took a closer look at this. The only platforms that touch it are rs6000 and the spe port. For linux.h, that only changes one thing in gcc/config/rs6000/rs6000.c for glibc 2.19 or higher:

/* Support for TARGET_ATOMIC_ASSIGN_EXPAND_FENV without FPRs depends
on glibc 2.19 or greater. */
#define RS6000_GLIBC_ATOMIC_FENV 1

For the linux64.h part:

/* Split stack is only supported for 64 bit, and requires glibc >= 2.18. */
# define TARGET_CAN_SPLIT_STACK
# define TARGET_CAN_SPLIT_STACK_64BIT 1
# define TARGET_CAN_SPLIT_STACK_64BIT 0

Are those going to cause problems on musl?

Quoted 55 lines
Quoted 55 lines
 EXTRA_OECONF = "\
     ${@['--enable-clocale=generic', ''][d.getVar('USE_NLS') !=
'no']} \
     --with-gnu-ld \
meta/recipes-devtools/gcc/gcc-configure-common.inc +1 -0
@@ -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} \
meta/recipes-devtools/gcc/gcc-cross-canadian.inc +0 -0
index 2f32d3407fb..73f1e054463 100644
@@ -3,7 +3,7 @@ inherit cross-canadian
 SUMMARY = "GNU cc and gcc C compilers (cross-canadian for

${TARGET_ARCH} target)"
PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}"

-DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc- crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk- ${HOST_PREFIX}libc-for-gcc nativesdk-gettext flex-native" +DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc- crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk- ${HOST_PREFIX}libc-for-gcc nativesdk-gettext flex-native virtual/libc"

GCCMULTILIB = "--enable-multilib"

meta/recipes-devtools/gcc/gcc-cross.inc +0 -1
index 89b19684bef..63a196e2e99 100644
@@ -2,7 +2,7 @@ inherit cross
 
 INHIBIT_DEFAULT_DEPS = "1"
 EXTRADEPENDS = ""
-DEPENDS = "virtual/${TARGET_PREFIX}binutils

virtual/${TARGET_PREFIX}libc-for-gcc ${EXTRADEPENDS} ${NATIVEDEPS}" +DEPENDS = "virtual/${TARGET_PREFIX}binutils ${EXTRADEPENDS} ${NATIVEDEPS}"
PROVIDES = "virtual/${TARGET_PREFIX}gcc
virtual/${TARGET_PREFIX}g++"

 python () {
     if d.getVar("TARGET_OS").startswith("linux"):
meta/recipes-devtools/gcc/gcc-cross.inc +0 -0
@@ -44,6 +44,12 @@ EXTRA_OECONF_PATHS = "\
 
 ARCH_FLAGS_FOR_TARGET += "-

isystem${STAGING_DIR_TARGET}${target_includedir}"

Quoted 7 lines

meta/recipes-devtools/gcc/gcc-cross.inc EXTRA_OECONF_PATHS = "\ · line 50

Quoted 4 lines
meta/recipes-devtools/gcc/gcc-cross.inc +4 -0
+
+do_configure_prepend () {
+       install -d ${RECIPE_SYSROOT}${target_includedir}
+       touch ${RECIPE_SYSROOT}${target_includedir}/limits.h

I wonder if we should use install 0644 so we dont have permission errors not sure what touch will do in that regard

The file isn't packaged and we're not in pseudo context so it shouldn't matter here as we're just poking something into our own recipe sysroot...

Cheers,

Richard

#4 lore raw

PATCH 3/4 gcc: Drop the -initial versions of the compiler

In reply to Richard Purdie

Separated out from the previous commit for clarity, this simply drops all the -inital pieces of gcc which are no longer needed after the previous commit.

---
 meta/recipes-devtools/gcc/gcc-8.2.inc         | 14 ---
 meta/recipes-devtools/gcc/gcc-common.inc      |  7 +-
 .../gcc/gcc-configure-common.inc              |  1 -
 .../gcc/gcc-cross-initial.inc                 | 89 -------------------
 .../gcc/gcc-cross-initial_8.2.bb              |  2 -
 meta/recipes-devtools/gcc/gcc-cross.inc       |  4 +-
 .../gcc/gcc-crosssdk-initial.inc              | 10 ---
 .../gcc/gcc-crosssdk-initial_8.2.bb           |  3 -
 meta/recipes-devtools/gcc/gcc-crosssdk.inc    |  2 +-
 9 files changed, 6 insertions(+), 126 deletions(-)
 delete mode 100644 meta/recipes-devtools/gcc/gcc-cross-initial.inc
 delete mode 100644 meta/recipes-devtools/gcc/gcc-cross-initial_8.2.bb
 delete mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk-initial.inc
 delete mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk-initial_8.2.bb
meta/recipes-devtools/gcc/gcc-8.2.inc +0 -14
index 206e1571b29..b6568a046e9 100644
@@ -107,20 +107,6 @@ EXTRA_OECONF_BASE = "\
     --without-isl \
 "
 
-EXTRA_OECONF_INITIAL = "\
-    --disable-libmudflap \
-    --disable-libgomp \
-    --disable-libitm \
-    --disable-libquadmath \
-    --with-system-zlib \
-    --disable-lto \
-    --disable-plugin \
-    --enable-linker-build-id \
-    --enable-decimal-float=no \
-    --without-isl \
-    --disable-libssp \
-"
-
 EXTRA_OECONF_PATHS = "\
     --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
     --with-sysroot=/not/exist \
meta/recipes-devtools/gcc/gcc-common.inc +3 -4
index 06c90336b66..96334e54b4b 100644
@@ -10,12 +10,11 @@ CVE_PRODUCT = "gcc"
 inherit autotools gettext texinfo
 
 BPN = "gcc"
-COMPILERINITIAL = ""
-COMPILERDEP = "virtual/${MLPREFIX}${TARGET_PREFIX}gcc${COMPILERINITIAL}:do_gcc_stash_builddir"
-COMPILERDEP_class-nativesdk = "virtual/${TARGET_PREFIX}gcc${COMPILERINITIAL}-crosssdk:do_gcc_stash_builddir"
+COMPILERDEP = "virtual/${MLPREFIX}${TARGET_PREFIX}gcc:do_gcc_stash_builddir"
+COMPILERDEP_class-nativesdk = "virtual/${TARGET_PREFIX}gcc-crosssdk:do_gcc_stash_builddir"
 
 python extract_stashed_builddir () {
-    src = d.expand("${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir${COMPILERINITIAL}-${TARGET_SYS}")
+    src = d.expand("${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}")
     dest = d.getVar("B")
     oe.path.copyhardlinktree(src, dest)
     staging_processfixme([src + "/fixmepath"], dest, dest, dest, d)
meta/recipes-devtools/gcc/gcc-configure-common.inc +0 -1
index 009ab111683..70f7628bc98 100644
@@ -17,7 +17,6 @@ LANGUAGES ?= "c,c++${FORTRAN}${JAVA}"
 
 EXTRA_OECONF_BASE ?= ""
 EXTRA_OECONF_PATHS ?= ""
-EXTRA_OECONF_INITIAL ?= ""
 
 GCCMULTILIB ?= "--disable-multilib"
 GCCTHREADS ?= "posix"
meta/recipes-devtools/gcc/gcc-cross-initial.inc deleted +0 -89

89 lines not on this page · raw message

meta/recipes-devtools/gcc/gcc-cross-initial_8.2.bb deleted +0 -2
deleted file mode 100644
index 4c73e5ce613..00000000000
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-cross_${PV}.bb
-require gcc-cross-initial.inc
meta/recipes-devtools/gcc/gcc-cross.inc +2 -2
index 63a196e2e99..add6b43017d 100644
@@ -215,8 +215,8 @@ do_gcc_stash_builddir () {
 addtask do_gcc_stash_builddir after do_compile before do_install
 SSTATETASKS += "do_gcc_stash_builddir"
 do_gcc_stash_builddir[sstate-inputdirs] = "${BUILDDIRSTASH}"
-do_gcc_stash_builddir[sstate-outputdirs] = "${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir${COMPILERINITIAL}-${TARGET_SYS}"
-do_gcc_stash_builddir[sstate-fixmedir] = "${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir${COMPILERINITIAL}-${TARGET_SYS}"
+do_gcc_stash_builddir[sstate-outputdirs] = "${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}"
+do_gcc_stash_builddir[sstate-fixmedir] = "${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}"
 
 python do_gcc_stash_builddir_setscene () {
     sstate_setscene(d)
meta/recipes-devtools/gcc/gcc-crosssdk-initial.inc deleted +0 -10
deleted file mode 100644
index 08eda5d4c7c..00000000000
@@ -1,10 +0,0 @@
-inherit crosssdk
-
-PN = "gcc-crosssdk-initial-${SDK_SYS}"
-
-SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
-SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/"
-SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
-
-DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk gettext-native ${NATIVEDEPS}"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial-crosssdk"
meta/recipes-devtools/gcc/gcc-crosssdk-initial_8.2.bb deleted +0 -3
deleted file mode 100644
index fd90e1140f1..00000000000
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-cross-initial_${PV}.bb
-require gcc-crosssdk-initial.inc
-
meta/recipes-devtools/gcc/gcc-crosssdk.inc +1 -1
index cda29277944..bd2e71d63f1 100644
@@ -8,5 +8,5 @@ SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
 
 GCCMULTILIB = "--disable-multilib"
 
-DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk virtual/nativesdk-${TARGET_PREFIX}libc-for-gcc gettext-native ${NATIVEDEPS}"
+DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk gettext-native ${NATIVEDEPS}"
 PROVIDES = "virtual/${TARGET_PREFIX}gcc-crosssdk virtual/${TARGET_PREFIX}g++-crosssdk"
Signature · 1 line
2.19.1
#5 lore raw

PATCH 4/4 recipes: Drop virtual/libc-for-gcc

In reply to Richard Purdie

We no longer have special "libc" for gcc so we can rely on plain virtual/libc and reduce the complexity in the dependencies.

---
 meta/conf/distro/include/tcmode-default.inc      | 2 --
 meta/conf/layer.conf                             | 1 -
 meta/recipes-core/glibc/glibc.inc                | 2 +-
 meta/recipes-core/musl/musl_git.bb               | 2 +-
 meta/recipes-core/newlib/newlib_3.0.0.bb         | 2 +-
 meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 2 +-
 meta/recipes-devtools/gcc/gcc-cross.inc          | 1 -
 meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 2 +-
 meta/recipes-devtools/go/go-cross-canadian.inc   | 2 +-
 9 files changed, 6 insertions(+), 10 deletions(-)
meta/conf/distro/include/tcmode-default.inc +0 -2
index a586c63d4b9..c9fed48bce2 100644
@@ -16,8 +16,6 @@ PREFERRED_PROVIDER_virtual/${SDK_PREFIX}g++ = "gcc-crosssdk-${SDK_SYS}"
 PREFERRED_PROVIDER_virtual/${SDK_PREFIX}compilerlibs = "nativesdk-gcc-runtime"
 
 # Default libc config
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "${TCLIBC}"
-PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc ?= "nativesdk-glibc"
 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "${TCLIBC}-initial"
 PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial ?= "nativesdk-glibc-initial"
 PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
meta/conf/layer.conf +0 -1
index c67dec49ed2..7afccdf3351 100644
@@ -51,7 +51,6 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
   *->git-native \
   *->ccache-native \
   *->icecc-create-env-native \
-  gcc-cross-${TARGET_ARCH}->virtual/${TARGET_PREFIX}libc-for-gcc \
   gcc-cross-${TARGET_ARCH}->linux-libc-headers \
   ppp-dialin->ppp \
   resolvconf->bash \
meta/recipes-core/glibc/glibc.inc +1 -1
index de692fbfd75..6aee89bb53a 100644
@@ -17,7 +17,7 @@ python () {
 
 DEPENDS = "virtual/${TARGET_PREFIX}gcc libgcc-initial linux-libc-headers"
 
-PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
+PROVIDES = "virtual/libc"
 PROVIDES += "virtual/libintl virtual/libiconv"
 inherit autotools texinfo distro_features_check systemd
 
meta/recipes-core/musl/musl_git.bb +1 -1
index 9cc875c4a61..3dc56cef851 100644
@@ -17,7 +17,7 @@ SRC_URI = "git://git.musl-libc.org/musl \
 
 S = "${WORKDIR}/git"
 
-PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc virtual/libiconv virtual/libintl virtual/crypt"
+PROVIDES += "virtual/libc virtual/libiconv virtual/libintl virtual/crypt"
 
 DEPENDS = "virtual/${TARGET_PREFIX}binutils \
            virtual/${TARGET_PREFIX}gcc-initial \
meta/recipes-core/newlib/newlib_3.0.0.bb +1 -1
index 09238fe006b..db13724eb58 100644
@@ -1,6 +1,6 @@
 require newlib.inc
 
-PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc virtual/libiconv virtual/libintl"
+PROVIDES += "virtual/libc virtual/libiconv virtual/libintl"
 
 do_configure() {
 	${S}/configure ${EXTRA_OECONF}
meta/recipes-devtools/gcc/gcc-cross-canadian.inc +1 -1
index 73f1e054463..e7c08d3a618 100644
@@ -3,7 +3,7 @@ inherit cross-canadian
 SUMMARY = "GNU cc and gcc C compilers (cross-canadian for ${TARGET_ARCH} target)"
 PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 
-DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext flex-native virtual/libc"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-libc nativesdk-gettext flex-native virtual/libc"
 
 GCCMULTILIB = "--enable-multilib"
 
meta/recipes-devtools/gcc/gcc-cross.inc +0 -1
index add6b43017d..6222c2e8c91 100644
@@ -31,7 +31,6 @@ EXTRA_OECONF += "\
     --with-system-zlib \
 "
 
-DEPENDS_remove_libc-baremetal := "virtual/${TARGET_PREFIX}libc-for-gcc"
 EXTRA_OECONF_append_libc-baremetal = " --without-headers"
 EXTRA_OECONF_remove_libc-baremetal = "--enable-threads=posix"
 EXTRA_OECONF_remove_libc-newlib = "--enable-threads=posix"
meta/recipes-devtools/gdb/gdb-cross-canadian.inc +1 -1
index 4fc6747d9da..475e4f08ef0 100644
@@ -6,7 +6,7 @@ PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 BPN = "gdb"
 
 DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext \
-           virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc"
+           virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-libc"
 
 GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
 
meta/recipes-devtools/go/go-cross-canadian.inc +1 -1
index ea68b8875d9..0bc5dce8a14 100644
@@ -1,7 +1,7 @@
 inherit cross-canadian
 
 DEPENDS = "go-native virtual/${HOST_PREFIX}go-crosssdk virtual/nativesdk-${HOST_PREFIX}go-runtime \
-           virtual/${HOST_PREFIX}gcc-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc \
+           virtual/${HOST_PREFIX}gcc-crosssdk virtual/nativesdk-libc \
            virtual/nativesdk-${HOST_PREFIX}compilerlibs"
 PN = "go-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 
Signature · 1 line
2.19.1
#6 lore raw

✗ patchtest: failure for "glibc: Remove site_config and ..." and 3 more

In reply to Richard Purdie

== Series Details ==

Series: "glibc: Remove site_config and ..." and 3 more
Revision: 1
URL : https://patchwork.openembedded.org/series/15420/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 284596e947)

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---

Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
#7 lore raw
In reply to Richard Purdie

As the only users of siteconfig are now zlib and ncurses, should we just rip it out entirely leaving a gap for a fresh implementation?

Ross

Quoted 812 lines · Richard Purdie

The only reason we appear to need glibc-initial at this time is to support the site_config code. The site_config code compiles and therefore needs at least some level of working C library to link against.

This isn't a good reason to keep the complexity of glibc-initial around so remove it, and the site_config support which then breaks.

Performance benchmarks suggest the time spent just rerunning configure for site_config just about equals any performance benefit for OE-Core image builds excluding the time spent adding glibc-initial to the dependency chain.

I'm not opposed to readding some other form of site_config support but it needs to be rethought.

---
 meta/recipes-core/glibc/glibc-initial.inc     |  57 ---
 meta/recipes-core/glibc/glibc-initial_2.28.bb |   9 -
 meta/recipes-core/glibc/glibc.inc             |  16 +-
 meta/recipes-core/glibc/site_config/funcs     | 474 ------------------
 meta/recipes-core/glibc/site_config/headers   | 155 ------
 meta/recipes-core/glibc/site_config/types     |  21 -
 6 files changed, 1 insertion(+), 731 deletions(-)
 delete mode 100644 meta/recipes-core/glibc/glibc-initial.inc
 delete mode 100644 meta/recipes-core/glibc/glibc-initial_2.28.bb
 delete mode 100644 meta/recipes-core/glibc/site_config/funcs
 delete mode 100644 meta/recipes-core/glibc/site_config/headers
 delete mode 100644 meta/recipes-core/glibc/site_config/types
meta/recipes-core/glibc/glibc-initial.inc deleted +0 -57
deleted file mode 100644
index acd0d6b1dc5..00000000000
@@ -1,57 +0,0 @@
-DEPENDS = "linux-libc-headers virtual/${TARGET_PREFIX}gcc-initial libgcc-initial make-native bison-native"
-PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
-
-PACKAGES = ""
-PACKAGES_DYNAMIC = ""
-
-STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
-STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
-
-do_configure () {
-       (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
-       find ${S} -name "configure" | xargs touch
-       cfgscript=`python3 -c "import os; print(os.path.relpath('${S}', '.'))"`/configure
-       $cfgscript --host=${TARGET_SYS} --build=${BUILD_SYS} \
-               --prefix=/usr \
-               --disable-sanity-checks \
-               --with-headers=${STAGING_DIR_TARGET}${includedir} \
-               --enable-hacker-mode
-}
-
-do_compile () {
-       :
-}
-
-do_install () {
-       oe_runmake cross-compiling=yes install_root=${D} \
-       includedir='${includedir}' prefix='${prefix}' \
-       install-bootstrap-headers=yes install-headers
-
-       oe_runmake csu/subdir_lib
-       mkdir -p ${D}${libdir}/
-       install -m 644 csu/crt[1in].o ${D}${libdir}
-
-       # Two headers -- stubs.h and features.h -- aren't installed by install-headers,
-       # so do them by hand.  We can tolerate an empty stubs.h for the moment.
-       # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
-       mkdir -p ${D}${includedir}/gnu/
-       touch ${D}${includedir}/gnu/stubs.h
-       cp ${S}/include/features.h ${D}${includedir}/features.h
-
-       if [ -e ${B}/bits/stdio_lim.h ]; then
-               cp ${B}/bits/stdio_lim.h  ${D}${includedir}/bits/
-       fi
-}
-
-do_stash_locale() {
-       :
-}
-
-do_siteconfig () {
-       :
-}
-
-inherit nopackages
-
-# We really only want this built by things that need it, not any recrdeptask
-deltask do_build
meta/recipes-core/glibc/glibc-initial_2.28.bb deleted +0 -9
deleted file mode 100644
index e86770e12d4..00000000000
@@ -1,9 +0,0 @@
-require glibc_${PV}.bb
-require glibc-initial.inc
-
-# main glibc recipes muck with TARGET_CPPFLAGS to point into
-# final target sysroot but we
-# are not there when building glibc-initial
-# so reset it here
-
-TARGET_CPPFLAGS = ""
meta/recipes-core/glibc/glibc.inc +1 -15
index 99c92ce46e4..43e71337eef 100644
@@ -15,21 +15,7 @@ python () {
         bb.fatal("%s can't be built with %s, try -O1 instead" % (d.getVar('PN'), opt_effective))
 }
 
-# siteconfig.bbclass runs configure which needs a working compiler
-# For the compiler to work we need a working libc yet libc isn't
-# in the sysroots directory at this point. This means the libc.so
-# linker script won't work as the --sysroot setting isn't correct.
-# Here we create a hacked up libc linker script and pass in the right
-# flags to let configure work. Ugly.
-EXTRASITECONFIG = "CFLAGS='${CFLAGS} -Wl,-L${WORKDIR}/site_config_libc -L${WORKDIR}/site_config_libc -L${SYSROOT_DESTDIR}${libdir} -L${SYSROOT_DESTDIR}${base_libdir} -Wl,-L${SYSROOT_DESTDIR}${libdir} -Wl,-L${SYSROOT_DESTDIR}${base_libdir}'"
-siteconfig_do_siteconfig_gencache_prepend = " \
-       mkdir -p ${WORKDIR}/site_config_libc; \
-       cp ${SYSROOT_DESTDIR}${libdir}/libc.so ${WORKDIR}/site_config_libc; \
-       sed -i -e 's# ${base_libdir}# ${SYSROOT_DESTDIR}${base_libdir}#g' -e 's# ${libdir}# ${SYSROOT_DESTDIR}${libdir}#g' ${WORKDIR}/site_config_libc/libc.so; \
-"
-
-# nptl needs unwind support in gcc, which can't be built without glibc.
-DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers virtual/${TARGET_PREFIX}libc-initial"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers"
 
 PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
 PROVIDES += "virtual/libintl virtual/libiconv"
meta/recipes-core/glibc/site_config/funcs deleted +0 -474
deleted file mode 100644
index ccc85392d7f..00000000000
@@ -1,474 +0,0 @@
-a64l
-abs
-access
-__adjtimex
-alarm
-alphasort
-argz_append
-__argz_count
-argz_create_sep
-argz_insert
-__argz_next
-argz_next
-__argz_stringify
-argz_stringify
-asprintf
-atexit
-atof
-atoi
-bcmp
-bcopy
-bindresvport
-bind_textdomain_codeset
-btowc
-bzero
-calloc
-canonicalize_file_name
-catgets
-cfgetospeed
-cfsetispeed
-cfsetspeed
-chmod
-chown
-chroot
-clock
-close
-closedir
-closelog
-confstr
-connect
-daemon
-dcgettext
-difftime
-dirfd
-dirname
-dngettext
-dup2
-ecvt
-endgrent
-endmntent
-endpwent
-endutent
-endutxent
-epoll_ctl
-err
-ether_hostton
-ether_ntohost
-euidaccess
-execv
-fchdir
-fchmod
-fchmodat
-fchown
-fchownat
-fcntl
-fcvt
-fdatasync
-fdopendir
-feof_unlocked
-fgets_unlocked
-fgetxattr
-finite
-flistxattr
-flock
-flockfile
-fnmatch
-fork
-fpathconf
-__fpending
-fprintf
-free
-freeaddrinfo
-freeifaddrs
-fseeko
-__fsetlocking
-fsetxattr
-fstat64
-fstat
-fstatfs
-fsync
-ftello
-ftime
-ftruncate
-funlockfile
-futimes
-futimesat
-gai_strerror
-gcvt
-getaddrinfo
-getc_unlocked
-getcwd
-getdelim
-getdomainname
-getdtablesize
-getegid
-getenv
-geteuid
-getgid
-getgrent
-getgrent_r
-getgrgid_r
-getgrnam
-getgrnam_r
-getgrouplist
-getgroups
-gethostbyaddr_r
-gethostbyname2
-gethostbyname
-gethostbyname_r
-gethostent
-gethostid
-gethostname
-getifaddrs
-getline
-getloadavg
-getmntent
-getmsg
-getnameinfo
-getnetbyaddr_r
-getnetgrent_r
-getopt
-getopt_long
-getopt_long_only
-getpagesize
-getpass
-getpeername
-getpgrp
-getpid
-getppid
-getprotoent_r
-getpwent
-getpwent_r
-getpwnam
-getpwnam_r
-getpwuid
-getpwuid_r
-getresuid
-getrlimit
-getrusage
-getservbyname
-getservbyname_r
-getservbyport_r
-getservent
-getservent_r
-getspnam
-getspnam_r
-gettimeofday
-getttyent
-getttynam
-getuid
-getusershell
-getutent
-getutid
-getutline
-getutmp
-getutmpx
-getutxent
-getutxid
-getutxline
-getwd
-getxattr
-glob
-gmtime
-gmtime_r
-grantpt
-group_member
-herror
-hstrerror
-iconv
-iconv_open
-if_freenameindex
-if_indextoname
-if_nameindex
-if_nametoindex
-index
-inet_addr
-inet_aton
-inet_ntoa
-inet_ntop
-inet_pton
-initgroups
-innetgr
-iruserok
-isascii
-isatty
-isblank
-isgraph
-isinf
-isnan
-isprint
-isspace
-iswalnum
-iswcntrl
-iswctype
-iswprint
-iswspace
-iswupper
-isxdigit
-kill
-killpg
-lchown
-lckpwdf
-lgetxattr
-link
-listxattr
-llistxattr
-localtime
-localtime_r
-lockf
-lrand48
-lsearch
-lseek64
-lsetxattr
-lstat
-mallinfo
-malloc
-mblen
-mbrlen
-mbrtowc
-mbsinit
-mbsrtowcs
-mbtowc
-memalign
-memchr
-memcmp
-memcpy
-memmove
-mempcpy
-memrchr
-memset
-mkdir
-mkdirat
-mkdtemp
-mkfifo
-mknod
-mkstemp64
-mkstemp
-mktime
-mlock
-mmap
-mtrace
-munlock
-munmap
-nanosleep
-nice
-nl_langinfo
-ntp_adjtime
-ntp_gettime
-_obstack_free
-on_exit
-open64
-open
-openat
-opendir
-openlog
-pathconf
-pipe
-poll
-popen
-posix_memalign
-prctl
-pread
-printf
-__progname
-pselect
-pthread_mutex_lock
-ptsname
-putenv
-putgrent
-putpwent
-putspent
-pututline
-pututxline
-putwc
-pwrite
-qsort
-raise
-rand
-random
-rand_r
-read
-readdir
-readdir_r
-readlink
-realloc
-realpath
-re_comp
-recvmsg
-re_exec
-regcomp
-regexec
-remove
-rename
-re_search
-rmdir
-rpmatch
-rresvport_af
-ruserok
-ruserok_af
-sbrk
-scandir
-sched_setscheduler
-sched_yield
-__secure_getenv
-select
-semctl
-semget
-sendmsg
-setbuf
-setbuffer
-setegid
-setenv
-seteuid
-setgid
-setgroups
-sethostname
-setitimer
-_setjmp
-setjmp
-setlinebuf
-setlocale
-setmntent
-setpgid
-setpgrp
-setpriority
-setregid
-setresgid
-setresuid
-setreuid
-setrlimit
-setsid
-setsockopt
-settimeofday
-setuid
-setutent
-setutxent
-setvbuf
-setxattr
-sgetspent
-shmat
-shmctl
-shmdt
-shmget
-shutdown
-sigaction
-sigaddset
-sigaltstack
-sigblock
-sigemptyset
-sighold
-siginterrupt
-signal
-sigprocmask
-sigset
-sigsetmask
-sigstack
-sigsuspend
-sigvec
-snprintf
-socket
-socketpair
-sprintf
-srand48
-srand
-srandom
-sscanf
-stat
-statfs
-statvfs
-stime
-stpcpy
-strcasecmp
-strcasestr
-strchr
-strchrnul
-strcmp
-strcspn
-strdup
-strerror
-strerror_r
-strftime
-strlen
-strncasecmp
-strncmp
-strndup
-strnlen
-strpbrk
-strptime
-strrchr
-strsep
-strsignal
-strspn
-strstr
-strtod
-strtoimax
-strtok_r
-strtol
-strtoll
-strtoul
-strtoull
-strtoumax
-strverscmp
-strxfrm
-symlink
-sync
-sysconf
-sysctl
-sysinfo
-syslog
-_sys_siglist
-sys_siglist
-system
-tcgetattr
-tcgetpgrp
-tcsetattr
-tcsetpgrp
-time
-timegm
-times
-timezone
-tmpnam
-towlower
-towupper
-truncate
-tsearch
-ttyname
-tzset
-ulimit
-umask
-uname
-unlink
-unsetenv
-unshare
-updwtmp
-updwtmpx
-usleep
-ustat
-utime
-utimes
-utmpname
-utmpxname
-valloc
-vasprintf
-verrx
-vfork
-vfprintf
-vfscanf
-vhangup
-vprintf
-vsnprintf
-vsprintf
-wait3
-wait4
-waitpid
-wcrtomb
-wcscoll
-wcsdup
-wcslen
-wctob
-wctomb
-wctype
-wcwidth
-wmemchr
-wmemcpy
-wmempcpy
meta/recipes-core/glibc/site_config/headers deleted +0 -155
deleted file mode 100644
index 69fedea4e1a..00000000000
@@ -1,155 +0,0 @@
-aio.h
-alloca.h
-argz.h
-arpa/inet.h
-arpa/nameser.h
-asm/byteorder.h
-asm/ioctls.h
-asm/page.h
-asm/types.h
-assert.h
-byteswap.h
-ctype.h
-dirent.h
-dlfcn.h
-elf.h
-endian.h
-err.h
-errno.h
-execinfo.h
-fcntl.h
-features.h
-float.h
-fstab.h
-ftw.h
-getopt.h
-glob.h
-grp.h
-iconv.h
-ifaddrs.h
-inttypes.h
-langinfo.h
-lastlog.h
-libgen.h
-libintl.h
-limits.h
-linux/capability.h
-linux/fd.h
-linux/fs.h
-linux/hayesesp.h
-linux/hdreg.h
-linux/icmp.h
-linux/in6.h
-linux/joystick.h
-linux/ptrace.h
-linux/serial.h
-linux/sonypi.h
-linux/unistd.h
-linux/utsname.h
-linux/version.h
-locale.h
-malloc.h
-math.h
-mcheck.h
-memory.h
-mntent.h
-mqueue.h
-netdb.h
-net/if.h
-netinet/ether.h
-netinet/in.h
-netinet/ip6.h
-netinet/ip.h
-netinet/tcp.h
-netinet/udp.h
-netipx/ipx.h
-net/route.h
-paths.h
-poll.h
-pthread.h
-pty.h
-pwd.h
-regex.h
-resolv.h
-rpc/rpc.h
-rpc/types.h
-sched.h
-scsi/scsi.h
-search.h
-semaphore.h
-setjmp.h
-sgtty.h
-shadow.h
-signal.h
-stdarg.h
-stdbool.h
-stdc
-stddef.h
-stdint.h
-stdio.h
-stdlib.h
-string.h
-strings.h
-stropts.h
-sys/bitypes.h
-sys/cdefs.h
-sys/dir.h
-sys/epoll.h
-sysexits.h
-sys/fcntl.h
-sys/file.h
-sys/fsuid.h
-sys/ioctl.h
-sys/ipc.h
-syslog.h
-sys/mman.h
-sys/mount.h
-sys/mtio.h
-sys/param.h
-sys/poll.h
-sys/prctl.h
-sys/ptrace.h
-sys/queue.h
-sys/reg.h
-sys/resource.h
-sys/select.h
-sys/sem.h
-sys/shm.h
-sys/signal.h
-sys/socket.h
-sys/socketvar.h
-sys/soundcard.h
-sys/statfs.h
-sys/stat.h
-sys/statvfs.h
-sys/stropts.h
-sys/swap.h
-sys/sysctl.h
-sys/sysinfo.h
-sys/sysmacros.h
-sys/termios.h
-sys/timeb.h
-sys/time.h
-sys/times.h
-sys/timex.h
-sys/types.h
-sys/uio.h
-sys/un.h
-sys/unistd.h
-sys/user.h
-sys/utsname.h
-sys/vfs.h
-sys/wait.h
-termio.h
-termios.h
-time.h
-ttyent.h
-ulimit.h
-unistd.h
-ustat.h
-utime.h
-utmp.h
-utmpx.h
-values.h
-wchar.h
-wctype.h
meta/recipes-core/glibc/site_config/types deleted +0 -22
deleted file mode 100644
index 178bd85a00b..00000000000
@@ -1,21 +0,0 @@
-char
-char *
-double
-float
-int
-long
-long double
-long int
-long long
-long long int
-short
-short int
-signed char
-unsigned char
-unsigned int
-unsigned long
-unsigned long int
-unsigned long long int
-unsigned short
-unsigned short int
-void *
--

2.19.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#8 lore raw
Quoted 2 lines · Ross

As the only users of siteconfig are now zlib and ncurses, should we just rip it out entirely leaving a gap for a fresh implementation?

I'm cc'ing Mark who has a lot of the history on this.

I think we're at a point where we likely need to re-implement this in a different way...

Cheers,

Richard

Quoted 24 lines

Ross

Quoted 21 lines · Richard Purdie

The only reason we appear to need glibc-initial at this time is to support
the site_config code. The site_config code compiles and therefore needs
at least some level of working C library to link against.

This isn't a good reason to keep the complexity of glibc-initial around
so remove it, and the site_config support which then breaks.

Performance benchmarks suggest the time spent just rerunning configure
for site_config just about equals any performance benefit for OE- Core
image builds excluding the time spent adding glibc-initial to the dependency chain.

I'm not opposed to readding some other form of site_config support but it needs to be rethought.

#9 lore raw
Quoted 8 lines · On Thu, 20 Dec 2018 at 11:59, <[email protected]> wrote:
Quoted 2 lines · Ross

As the only users of siteconfig are now zlib and ncurses, should we just rip it out entirely leaving a gap for a fresh implementation?

I'm cc'ing Mark who has a lot of the history on this.

I think we're at a point where we likely need to re-implement this in a different way...

I did some poking at this a few weeks ago, basically turned off siteconfig by removing the 'inherit siteconfig' from autotools.bbclass.

Interestingly, at the time for core-image-minimal this actually resulted in the build being faster. Some recipes were a little slower to configure, specifically coreutils had the biggest slowdown as it appears to probe for every syscall in the world (via gnulib) but that only took seven seconds longer. However, as the siteconfig generation is done by writing a custom configure.ac and then doing the autoconf/configure dance, these slowdowns were balanced out by glibc taking an extra 30 seconds.

It appears that disabling siteconfig for glibc is an acceptable compromise if we can not build glibc and gcc twice.

Ross

#10 lore raw
Quoted 9 lines · Ross
Quoted 8 lines · On Thu, 20 Dec 2018 at 11:59, <[email protected]> wrote:
Quoted 2 lines · Ross

As the only users of siteconfig are now zlib and ncurses, should we just rip it out entirely leaving a gap for a fresh implementation?

I'm cc'ing Mark who has a lot of the history on this.

I think we're at a point where we likely need to re-implement this in a different way...

I do think it's still needed/desired. However, I absolutely agree we need to rethink/reimplement the generation aspect of the site-config part.

Quoted 13 lines

I did some poking at this a few weeks ago, basically turned off siteconfig by removing the 'inherit siteconfig' from autotools.bbclass.

Interestingly, at the time for core-image-minimal this actually resulted in the build being faster. Some recipes were a little slower to configure, specifically coreutils had the biggest slowdown as it appears to probe for every syscall in the world (via gnulib) but that only took seven seconds longer. However, as the siteconfig generation is done by writing a custom configure.ac and then doing the autoconf/configure dance, these slowdowns were balanced out by glibc taking an extra 30 seconds.

Quoted 2 lines

It appears that disabling siteconfig for glibc is an acceptable compromise if we can not build glibc and gcc twice.

glibc is something we've never been concerned with 'doing the wrong thing'. It's also very possible that we could use glibc's autoconf output as a basis for the site-config items.

Before the way the system worked is that it tried to determine the 'stupid defaults(*)' that autoconf is always looking for, as well as many of the syscalls/headers that are common.

As far as zlib/ncurses being the only things that augmented them, when this was originally implemented many years ago -- those items were the most commonly used by other configure scripts. So adding those defaults when zlib and/or ncurses was provided by the system offered a measurable difference in the performance of configure.

We expected over time additional things would be added (but obviously they never were). Stuff like gnome, glib, etc...

So my recommendation is that the siteconfig is something (new recipe) that either runs right after the system libc (and everything else depends on that uses autoconf) -- or runs at the end of the libc command.

The goal of this is to provide a core set of system wide definitions in a way we know will produce a consistent set for any autoconf user. (If other systems, like cmake could make use of this type of thing -- it's something to consider as well.)

We also still want a way that manual definitions can be setup on a global basis for a given architecture. (We do want these limited for the most part, since maintenance is overlooked -- but we've certainly seen cases in the past where configure works like this: Yes, No, Cross -- where cross defines 'No' and never
checks. This functions, but ends up in a significantly less optimized
situation, and these are incredibly difficult to identify. [Using QEMU isn't an option, as QEMU doesn't know -all- potential architectures...]

* stupid defaults - sizeof char, short, int, long, void, long long, etc...

Anyway, my 2 cents. I'd like to see how this goes with it stripped out for the next few weeks.. and I'll back back early January where we can evaluate my assumptions/experiences above and see how this tracks with current reality.

--Mark

Quoted 2 lines

Ross

#11 lore raw
Quoted 7 lines · Mark Hatle

We also still want a way that manual definitions can be setup on a global basis for a given architecture. (We do want these limited for the most part, since maintenance is overlooked -- but we've certainly seen cases in the past where configure works like this: Yes, No, Cross -- where cross defines 'No' and never
checks. This functions, but ends up in a significantly less optimized
situation, and these are incredibly difficult to identify. [Using QEMU isn't an option, as QEMU doesn't know -all- potential architectures...]

These are absolutely not going away, and I've even got a patch locally that can make autoconf throw a warning if it uses a hard-coded guess when its cross-compiling. The output is shocking...

eg this is why our Python wasn't actually capable of doing floating point math properly: it was using runtime tests to determine bit order, and fell back to "don't know", and floating emulation in software. I fixed this upstream to just look at bit order in a binary, so the test is faster and works in cross.

Since the early days of siteconfig though a lot has changed in autoconf. It can do sizeof() without running, for a start. It's a lot faster in general, so I really do think that the usefulness of siteconfig is really limited, especially considering how fragile it is if you actually use it.

Ross

#12 lore raw
In reply to Mark Hatle
Quoted 5 lines · Mark Hatle

As far as zlib/ncurses being the only things that augmented them, when this was originally implemented many years ago -- those items were the most commonly used by other configure scripts. So adding those defaults when zlib and/or ncurses was provided by the system offered a measurable difference in the performance of configure.

Do you know what the zlib and ncurses siteconfig files were doing? Just short-circuiting the AC_CHECK_HEADER call, which is basically stat(includedir + header.h). I'd call that the definition of premature optimisation. :)

Ross

#13 lore raw
Quoted 11 lines · Ross
Quoted 5 lines · Mark Hatle

As far as zlib/ncurses being the only things that augmented them, when this was originally implemented many years ago -- those items were the most commonly used by other configure scripts. So adding those defaults when zlib and/or ncurses was provided by the system offered a measurable difference in the performance of configure.

Do you know what the zlib and ncurses siteconfig files were doing? Just short-circuiting the AC_CHECK_HEADER call, which is basically stat(includedir + header.h). I'd call that the definition of premature optimisation. :)

In the original AC_CHECK_HEADER stuff, it was more then just a simple stat. The system would compile a small executable that included the header and then attempted to execute a pass/fail -- or in the cross compile case would do something with the output binary.

This very well may have changed from a compilation step to a simple stat in configure in the the last 4 or 5 years. It's that compilation/execution step (both that and the various sizeof) that were hideously slow in the original implementation and being avoided by the special contents.

The assumption we were making of course was that zlib, ncurses (or anything else) actually worked with those headers.. so we skipped the compilation and just did a stat based on the headers to fill things out.

The systems that did the sizeof and header identification in the site-config bbclass were written to do things in a dynamic way so that if the system behavior changed we wouldn't have incorrect defaults "until someone noticed".

The behavior of using the compiler to identify a sizeof and using tools to return the result is actually very efficient -- but does require a functioning compiler (and headers). If I remember correctly, we're not fully compiling, but putting out an intermediate object which we can then query for the values of the various pieces. (In one iteration at least, we processed all of the sizeof in a single pass making it even more efficient.)

--Mark

Quoted 2 lines

Ross

#14 lore raw

Hi Randy,

Sorry, I am OOO today, will do it next week.
BTW, I have looked into siteconfig and siteinfo recently, and have some crazy ideas on them, which seems can save a lot of configure time, I will try to send them out next week.

// Robert

Sent from mobile phone

Quoted 50 lines · 在 2018年12月21日,10:22,Mark Hatle <[email protected]> 写道:
Quoted 9 lines · Ross
Quoted 6 lines · Mark Hatle

As far as zlib/ncurses being the only things that augmented them, when this was originally implemented many years ago -- those items were the most commonly used by other configure scripts. So adding those defaults when zlib and/or ncurses was provided by the system offered a measurable difference in the performance of configure.

Quoted 4 lines

Do you know what the zlib and ncurses siteconfig files were doing? Just short-circuiting the AC_CHECK_HEADER call, which is basically stat(includedir + header.h). I'd call that the definition of premature optimisation. :)

In the original AC_CHECK_HEADER stuff, it was more then just a simple stat. The system would compile a small executable that included the header and then attempted to execute a pass/fail -- or in the cross compile case would do something with the output binary.

This very well may have changed from a compilation step to a simple stat in configure in the the last 4 or 5 years. It's that compilation/execution step (both that and the various sizeof) that were hideously slow in the original implementation and being avoided by the special contents.

The assumption we were making of course was that zlib, ncurses (or anything else) actually worked with those headers.. so we skipped the compilation and just did a stat based on the headers to fill things out.

The systems that did the sizeof and header identification in the site-config bbclass were written to do things in a dynamic way so that if the system behavior changed we wouldn't have incorrect defaults "until someone noticed".

The behavior of using the compiler to identify a sizeof and using tools to return the result is actually very efficient -- but does require a functioning compiler (and headers). If I remember correctly, we're not fully compiling, but putting out an intermediate object which we can then query for the values of the various pieces. (In one iteration at least, we processed all of the sizeof in a single pass making it even more efficient.)

--Mark

Quoted 2 lines

Ross

Signature · 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core