[oe] GCC 4.3 fails to build glibc(-intermediate)

Khem Raj raj.khem at gmail.com
Wed Jun 4 23:22:06 UTC 2008


Koen Kooi wrote:
> Matthijs van de Water wrote:
>> Did anyone working with GCC 4.3 have any problems with the C++
>> compiler in the SDK?
>>
>> With the current setup, my include path search order is such that for
>> instance the<cstdlib>  header is trying to #include_next<stdlib.h>,
>> which fails because the normal include paths precede the C++ include
>> paths.
>> If I change the #include_next to #include the headers work fine, but
>> that is obviously no solution. It looks like this is broken for all
>> sysroot builds, because the compiler will put the sysroot include
>> before the C++ ones and get rid of any duplicates.
>>
>> Did anyone see this before?
> 
> I did see that before as well.

I was seeing this too while compiling libusb. However when I did not use --with-gxx-headers option
and did not move the headers manually to STAGING_DIR this worked even with c_global scope.


> 
>> Any suggestions? I think I can solve this
>> by changing back to --enable-cheaders=c_std instead of c_global (which
>> was the default previously and which is why pre-4.3 toolchains work
>> fine for me), but I'm not sure of the implications of that.
> 
> Maybe we try something like this:
> 
> --- packages/gcc/gcc-4.3.0.inc  7dac0d4ea94fbc3071cf13542d7afc9c97598920
> +++ packages/gcc/gcc-4.3.0.inc  d4ceae7672f475a16184235ac603437f86c3079e
> @@ -68,5 +68,5 @@ JAVA = ""
>  FORTRAN = ""
>  JAVA = ""
> 
> -EXTRA_OECONF_BASE = " --enable-libssp --disable-bootstrap
> --disable-libgomp --disable-libmudflap"
> +EXTRA_OECONF_BASE = "  --enable-cheaders=c_std --enable-libssp
> --disable-bootstrap --disable-libgomp --disable-libmudflap"
> 
> ============================================================
> --- packages/gcc/gcc-cross_4.3.0.bb
> 1ed2f60e65e1b09e4a5637ab29c85ad02338061f
> +++ packages/gcc/gcc-cross_4.3.0.bb
> cc76abacb299b51bb7da2b6bc0a6f7bec093ebeb
> @@ -7,6 +7,12 @@ SRC_URI_append_fail-fast = " file://zeck
> 
>  SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
> 
> -EXTRA_OECONF += "--disable-libunwind-exceptions
> --with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix}"
> +EXTRA_OECONF += "  --enable-cheaders=c_std
> --disable-libunwind-exceptions
> --with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix}"

Adding this option worked for me and I could build console-image.

> 
> 
> regards,
> 
> Koen
> 
> 
>>
>> Regards,
>>
>> Matthijs
>>
>> --enable-cheaders=OPTION
>>
>>      This allows the user to define the approach taken for C header
>> compatibility with C++. Options are c, c_std, and c_global. These
>> correspond to the source directory's include/c, include/c_std, and
>> include/c_global, and may also include include/c_compatibility. The
>> default is c_global.
> 
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
> 





More information about the Openembedded-devel mailing list