[oe] [RFC]: Toolchain build sequence alteration.

Koen Kooi k.kooi at student.utwente.nl
Sat Aug 2 12:03:08 UTC 2008


Khem Raj wrote:
  Currently we do
>
> cross-binutils ->  kernel-headers ->  uclibc-headers ->  cross-gcc
> (--disable-shared) ->  uclibc ->  cross-gcc
>
> I think this can be improved and I implemented the following steps.
>
> cross-binutils ->  cross-gcc (--disable-shared) ->  kernel-headers ->
> eglibc/glibc/uclibc headers + startup files + dummy libc.so ->  cross-gcc
> (--enable-shared) ->  glibc/eglibc/uclibc ->  cross-gcc

As we've noticed this breaks the iconv modules from glibc since they get 
a NEEDED entry for /lib/libc.so (which in in libc6-dev) instead of 
/lib/libc.so.6 (which in is libc6). You attempted to fix this with:

--- a/packages/gcc/gcc-cross-intermediate.inc
+++ b/packages/gcc/gcc-cross-intermediate.inc
@@ -16,6 +16,13 @@ EXTRA_OECONF = "--with-local-

+do_stage_prepend () {
+	# get rid of dummy libc.so
+	if [ -z "`file ${STAGING_DIR_TARGET}${layout_libdir}/libc.so | grep 
"ASCII C program text"`" ]; then
+		rm -rf ${STAGING_DIR_TARGET}${layout_libdir}/libc.so
+	fi
+}

That breaks building a toolchain from scratch with "cannot find -lc" 
during glibc-cross-intermediate staging. So I committed this:

--- a/packages/gcc/gcc-cross-intermediate.inc
+++ b/packages/gcc/gcc-cross-intermediate.inc
@@ -16,7 +16,7 @@ EXTRA_OECONF = "--with-local-

-do_stage_prepend () {
+do_stage_append () {
  	# get rid of dummy libc.so

This fixes builds from scratch for me (tried with armv5te and armv7a), 
but I haven't tested if it breaks iconv again since I value working 
builds over working iconv atm. I'm fairly sure it doesn't break iconv, 
because the bogus libc.so is gone before glibc gets built, but as I 
said, I haven't tested it.

regards,

Koen





More information about the Openembedded-devel mailing list