toolchain bootstrap fixes and kernel.bbclass integration
cover toolchain bootstrap fixes and kernel.bbclass integration
This patchset fixes isssue with compiling toolchain's bootstrap elements added changes from kernel.bbclass from meta-oe
Fixes eglibc when certain options are disabled (seen on poky-tiny)
The following changes since commit 4148bc80c008d25c8a536c7c7dfdeac1669a6662:
libgcc: Add missing dependency on libc:do_package (2012-07-24 10:12:08 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib kraj/misc-updates
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=master
Denis Carikli (1):
kernel.bbclass: fix external module building
Khem Raj (3):
eglibc-initial: Fix build failure due to missing limits.h
gcc-cross-initial: Stage self sufficient fixed limits.h
eglibc: Fix build when OPTION_POSIX_WIDE_CHAR_DEVICE_IO is not set
Koen Kooi (1):
kernel bbclass: Recreate uImage only when KEEPUIMAGE != "yes"
meta/classes/kernel.bbclass | 5 +- meta/conf/distro/include/default-distrovars.inc | 1 + .../eglibc/eglibc-2.16/GLRO_dl_debug_mask.patch | 48 ++++++++++++++------ .../eglibc-2.16/fileops-without-wchar-io.patch | 22 +++++++++ meta/recipes-core/eglibc/eglibc-initial.inc | 1 + meta/recipes-core/eglibc/eglibc-initial_2.16.bb | 9 ++-- meta/recipes-core/eglibc/eglibc_2.16.bb | 3 +- meta/recipes-devtools/gcc/gcc-4.7.inc | 2 +- meta/recipes-devtools/gcc/gcc-cross-initial.inc | 10 ++++ 9 files changed, 82 insertions(+), 19 deletions(-) create mode 100644 meta/recipes-core/eglibc/eglibc-2.16/fileops-without-wchar-io.patch
Signature · 1 line
1.7.9.5
PATCH 1/5 kernel.bbclass: fix external module building
From: Denis Carikli <[email protected]>
Without that fix we have the following while compiling compat-wireless.
include/linux/mmzone.h:18:30: fatal error: generated/bounds.h: No such file or directory
Note that the compat-wireless recipe will be added in another commit.
make -C $kerneldir _mrproper_scripts deleted this file along with other things so we resurrect it with this patch.
--- meta/classes/kernel.bbclass | 3 +++ 1 file changed, 3 insertions(+)
meta/classes/kernel.bbclass +3 -0
@@ -187,6 +187,9 @@ kernel_do_install() { cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o fi + # Necessary for building modules like compat-wireless. + cp include/generated/bounds.h $kerneldir/include/generated/bounds.h + # Remove the following binaries which cause strip or arch QA errors # during do_package for cross-compiled platforms bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \
Signature · 1 line
1.7.9.5
PATCH 2/5 kernel bbclass: Recreate uImage only when KEEPUIMAGE != "yes"
From: Koen Kooi <[email protected]>
The intent of the uImage code in this class includes the following
1) be able to specify custom load addresses without needing to patch the kernel
2) add better information to the uImage description field
The current state is a NOP anyway, the kernel will always build a uImage when you tell it to 'make uImage'.
weakly Set KEEPUIMAGE to 'yes' in default-distrovars.inc which preserve the current OE-Core behavior. Machines which are being ported from oe.dev and need to regenerate uImage can set this to be empty
--- meta/classes/kernel.bbclass | 2 +- meta/conf/distro/include/default-distrovars.inc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
meta/classes/kernel.bbclass +1 -1
@@ -507,7 +507,7 @@ KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}" do_uboot_mkimage() { if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then - if test ! -e arch/${ARCH}/boot/uImage ; then + if test "x${KEEPUIMAGE}" != "xyes" ; then ENTRYPOINT=${UBOOT_ENTRYPOINT} if test -n "${UBOOT_ENTRYSYMBOL}"; then ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
meta/conf/distro/include/default-distrovars.inc +1 -0
@@ -2,6 +2,7 @@ QA_LOGFILE = "${TMPDIR}/qa.log" OEINCLUDELOGS ?= "yes" KERNEL_CONSOLE ?= "ttyS0" +KEEPUIMAGE ??= "yes" PCMCIA_MANAGER ?= "pcmciautils"
Signature · 1 line
1.7.9.5
PATCH 3/5 eglibc-initial: Fix build failure due to missing limits.h
In reply to Khem RajWe have had these things in place to overcome a limitation from our gcc-initial-cross not staging a self sufficient limits.h. Now thats fixed we do reset TOOLCHAIN_OPTIONS to point to sysroot where linux kernel headers are staged and not the bootstrap sysroot which will infact be popuated by eglibc-initial itself.
Secondly we dont need to set CPPFLAGS specially as we are doing that in eglibc.inc so we override that
--- meta/recipes-core/eglibc/eglibc-initial.inc | 1 + meta/recipes-core/eglibc/eglibc-initial_2.16.bb | 9 ++++++--- meta/recipes-core/eglibc/eglibc_2.16.bb | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-)
meta/recipes-core/eglibc/eglibc-initial.inc +1 -0
@@ -8,6 +8,7 @@ PACKAGES_DYNAMIC = "" STAGINGCC = "gcc-cross-initial" STAGINGCC_virtclass-nativesdk = "gcc-crosssdk-initial" +TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" do_configure () { sed -ie 's,{ (exit 1); exit 1; }; },{ (exit 0); }; },g' ${S}/configure
meta/recipes-core/eglibc/eglibc-initial_2.16.bb +6 -3
@@ -1,6 +1,9 @@ require eglibc_${PV}.bb require eglibc-initial.inc -do_configure_prepend () { - unset CFLAGS -} +# main eglibc recipes muck with TARGET_CPPFLAGS to point into +# final target sysroot but we +# are not there when building eglibc-initial +# so reset it here + +TARGET_CPPFLAGS = ""
meta/recipes-core/eglibc/eglibc_2.16.bb +1 -1
@@ -3,7 +3,7 @@ require eglibc.inc SRCREV = "19383" DEPENDS += "gperf-native" -PR = "r1" +PR = "r2" PR_append = "+svnr${SRCPV}" EGLIBC_BRANCH="eglibc-2_16"
Signature · 1 line
1.7.9.5
PATCH 4/5 gcc-cross-initial: Stage self sufficient fixed limits.h
In reply to Khem Rajcurrently gcc installs a limits.h which references to another limits.h which it expects from target sysroot and that header in target sysroot will come from eglibc. So we need to break this catch-22 and hence we install a self sufficient limits.h which is then happy when referenced and doesnt complain about missing limits.h from target sysroot.
This is mostly used when eglibc-initial configure is run
--- meta/recipes-devtools/gcc/gcc-4.7.inc | 2 +- meta/recipes-devtools/gcc/gcc-cross-initial.inc | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-4.7.inc +1 -1
@@ -1,6 +1,6 @@ require gcc-common.inc -PR = "r7" +PR = "r8" # Third digit in PV should be incremented after a minor release # happens from this branch on gcc e.g. currently its 4.7.1
meta/recipes-devtools/gcc/gcc-cross-initial.inc +10 -0
@@ -27,3 +27,13 @@ EXTRA_OECONF = "--with-newlib \ do_compile () { oe_runmake all-gcc all-target-libgcc } +# fixed limits.h infact includes the so called real limits.h +# which should come from libc but when we build libc-initial +# then bunch of configure tests include fixed limits.h which in turn +# includes real limits.h but this real limits.h is not staged yet +# so we overwirte the generated include-fixed/limits.h for gcc-cross-initial +# to get rid references to real limits.h + +do_install_append1() { + cp gcc/include-fixed/limits.h ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed/limits.h +}
Signature · 1 line
1.7.9.5
Re: [PATCH 4/5] gcc-cross-initial: Stage self sufficient fixed limits.h
Quoted 6 lines · Khem Raj
meta/recipes-devtools/gcc/gcc-cross-initial.inc +0
-0@@ -27,3 +27,13 @@ EXTRA_OECONF = "--with-newlib \ do_compile () { oe_runmake all-gcc all-target-libgcc }
meta/recipes-devtools/gcc/gcc-cross-initial.inc EXTRA_OECONF = "--with-newlib \ · line 39
Quoted 10 lines
meta/recipes-devtools/gcc/gcc-cross-initial.inc +10
-0+# fixed limits.h infact includes the so called real limits.h +# which should come from libc but when we build libc-initial +# then bunch of configure tests include fixed limits.h which in turn +# includes real limits.h but this real limits.h is not staged yet +# so we overwirte the generated include-fixed/limits.h for gcc-cross-initial +# to get rid references to real limits.h + +do_install_append1() { + cp gcc/include-fixed/limits.h ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed/limits.h +}
It'd be better to have the comment together with install_append1; not the compile method.
Signature · 3 lines
Otavio Salvador O.S. Systems E-mail: [email protected] http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
PATCH 5/5 eglibc: Fix build when OPTION_POSIX_WIDE_CHAR_DEVICE_IO is not set
In reply to Khem Rajpoky-tiny disables certain eglibc options which gives good excercise for eglibc's componentized builds. This patch essentially updates the GLRO patch to account for additions of GLRO(dl_debug_mask) and converts them to GLRO_dl_debug_mask
Secondly adds a new patch where it was creating a undefined alias because we were using INTUSE macro which got exposed when we disable OPTION_POSIX_WIDE_CHAR_DEVICE_IO
--- .../eglibc/eglibc-2.16/GLRO_dl_debug_mask.patch | 48 ++++++++++++++------ .../eglibc-2.16/fileops-without-wchar-io.patch | 22 +++++++++ meta/recipes-core/eglibc/eglibc_2.16.bb | 3 +- 3 files changed, 59 insertions(+), 14 deletions(-) create mode 100644 meta/recipes-core/eglibc/eglibc-2.16/fileops-without-wchar-io.patch
meta/recipes-core/eglibc/eglibc-2.16/GLRO_dl_debug_mask.patch +35 -13
@@ -6,9 +6,9 @@ Singed-off-by: Khem Raj <[email protected]> Upstream-Status: Pending Index: libc/elf/dl-open.c =================================================================== ---- libc.orig/elf/dl-open.c 2012-03-09 08:54:34.691443995 -0800 -+++ libc/elf/dl-open.c 2012-03-09 08:55:31.275446730 -0800 -@@ -154,7 +154,7 @@ +--- libc.orig/elf/dl-open.c 2012-07-04 18:26:34.000000000 -0700 ++++ libc/elf/dl-open.c 2012-07-23 22:55:10.700072511 -0700 +@@ -153,7 +153,7 @@ ns->_ns_main_searchlist->r_list[new_nlist++] = map; /* We modify the global scope. Report this. */
@@ -17,7 +17,7 @@ Index: libc/elf/dl-open.c _dl_debug_printf ("\nadd %s [%lu] to global scope\n", map->l_name, map->l_ns); } -@@ -294,7 +294,7 @@ +@@ -293,7 +293,7 @@ _dl_debug_state (); /* Print scope information. */
@@ -26,7 +26,7 @@ Index: libc/elf/dl-open.c _dl_show_scope (new, 0); /* Only do lazy relocation if `LD_BIND_NOW' is not set. */ -@@ -438,7 +438,7 @@ +@@ -501,7 +501,7 @@ } /* Print scope information. */
@@ -37,9 +37,9 @@ Index: libc/elf/dl-open.c Index: libc/ports/sysdeps/mips/dl-lookup.c =================================================================== ---- libc.orig/ports/sysdeps/mips/dl-lookup.c 2012-03-09 08:54:34.707443996 -0800 -+++ libc/ports/sysdeps/mips/dl-lookup.c 2012-03-09 09:02:36.903467324 -0800 -@@ -111,7 +111,7 @@ +--- libc.orig/ports/sysdeps/mips/dl-lookup.c 2012-07-04 18:25:46.000000000 -0700 ++++ libc/ports/sysdeps/mips/dl-lookup.c 2012-07-24 00:04:45.496274559 -0700 +@@ -110,7 +110,7 @@ continue; /* Print some debugging info if wanted. */
@@ -48,7 +48,7 @@ Index: libc/ports/sysdeps/mips/dl-lookup.c _dl_debug_printf ("symbol=%s; lookup in file=%s [%lu]\n", undef_name, map->l_name[0] ? map->l_name : rtld_progname, -@@ -432,7 +432,7 @@ +@@ -431,7 +431,7 @@ hash table. */ if (__builtin_expect (tab->size, 0)) {
@@ -57,7 +57,7 @@ Index: libc/ports/sysdeps/mips/dl-lookup.c __rtld_lock_unlock_recursive (tab->lock); goto success; } -@@ -681,7 +681,7 @@ +@@ -680,7 +680,7 @@ } /* Display information if we are debugging. */
@@ -66,6 +66,15 @@ Index: libc/ports/sysdeps/mips/dl-lookup.c _dl_debug_printf ("\ \nfile=%s [%lu]; needed by %s [%lu] (relocation dependency)\n\n", map->l_name[0] ? map->l_name : rtld_progname, +@@ -787,7 +787,7 @@ + { + if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK) + && skip_map == NULL +- && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)) ++ && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED)) + { + /* We could find no value for a strong reference. */ + const char *reference_name = undef_map ? undef_map->l_name : ""; @@ -860,7 +860,7 @@ if (__builtin_expect (current_value.m->l_used == 0, 0)) current_value.m->l_used = 1;
@@ -95,9 +104,9 @@ Index: libc/ports/sysdeps/mips/dl-lookup.c struct sym_val val = { NULL, NULL }; Index: libc/elf/rtld.c =================================================================== ---- libc.orig/elf/rtld.c 2012-03-09 09:01:35.159464344 -0800 -+++ libc/elf/rtld.c 2012-03-09 09:01:56.247465364 -0800 -@@ -2198,7 +2198,7 @@ +--- libc.orig/elf/rtld.c 2012-07-04 18:26:34.000000000 -0700 ++++ libc/elf/rtld.c 2012-07-23 22:55:10.700072511 -0700 +@@ -2214,7 +2214,7 @@ GLRO(dl_init_all_dirs) = GL(dl_all_dirs); /* Print scope information. */
@@ -106,3 +115,16 @@ Index: libc/elf/rtld.c { _dl_debug_printf ("\nInitial object scopes\n"); +Index: libc/elf/dl-lookup.c +=================================================================== +--- libc.orig/elf/dl-lookup.c 2012-07-04 18:26:35.000000000 -0700 ++++ libc/elf/dl-lookup.c 2012-07-24 00:04:14.680273070 -0700 +@@ -770,7 +770,7 @@ + { + if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK) + && skip_map == NULL +- && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)) ++ && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED)) + { + /* We could find no value for a strong reference. */ + const char *reference_name = undef_map ? undef_map->l_name : "";
meta/recipes-core/eglibc/eglibc-2.16/fileops-without-wchar-io.patch new file +22 -0
@@ -0,0 +1,22 @@ +Fix error like + +/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/work/mips64-oe-linux/eglibc-2.16-r2+svnr19383/build-mips64-oe-linux/libc_pic.os: In function `_IO_new_file_fopen': +/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/work/mips64-oe-linux/eglibc-2.16-r2+svnr19383/eglibc-2_16/libc/libio/fileops.c:431: undefined reference to `_IO_file_close_it_internal' +collect2: error: ld returned 1 exit status + + +Signed-off-by: Khem Raj <[email protected]> +Upstream-Status: Pending +Index: libc/libio/fileops.c +=================================================================== +--- libc.orig/libio/fileops.c 2012-07-04 18:25:47.000000000 -0700 ++++ libc/libio/fileops.c 2012-07-24 00:21:17.220322557 -0700 +@@ -428,7 +428,7 @@ + result->_mode = 1; + #else + /* Treat this as if we couldn't find the given character set. */ +- (void) INTUSE(_IO_file_close_it) (fp); ++ (void) _IO_file_close_it (fp); + __set_errno (EINVAL); + return NULL; + #endif
meta/recipes-core/eglibc/eglibc_2.16.bb +2 -1
@@ -3,7 +3,7 @@ require eglibc.inc SRCREV = "19383" DEPENDS += "gperf-native" -PR = "r2" +PR = "r3" PR_append = "+svnr${SRCPV}" EGLIBC_BRANCH="eglibc-2_16"
@@ -23,6 +23,7 @@ SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};protocol=h file://ppc_slow_ieee754_sqrt.patch \ file://rpc-bootstrap.patch \ file://e500-math_private.patch \ + file://fileops-without-wchar-io.patch \ " LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \ file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
Signature · 1 line
1.7.9.5
Quoted 8 lines · Khem Raj
This patchset fixes isssue with compiling toolchain's bootstrap elements added changes from kernel.bbclass from meta-oe
Fixes eglibc when certain options are disabled (seen on poky-tiny)The following changes since commit
4148bc80c008d25c8a536c7c7dfdeac1669a6662:libgcc: Add missing dependency on libc:do_package (2012-07-24 10:12:08 +0100)
Quoted 8 lines
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contribkraj/misc-updates
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=masterDenis Carikli (1):
kernel.bbclass: fix external module building
I held back this one as I think there is still some discussion on it.
Quoted 8 lines
Khem Raj (3):
eglibc-initial: Fix build failure due to missinglimits.h
gcc-cross-initial: Stage self sufficient fixedlimits.h
eglibc: Fix build whenOPTION_POSIX_WIDE_CHAR_DEVICE_IOis not setKoen Kooi (1):
kernel bbclass: Recreate uImage only when KEEPUIMAGE != "yes"
Merged the above 4 patches into OE-Core
Thanks
Sau!
Quoted 12 lines
meta/classes/kernel.bbclass | 5 +- meta/conf/distro/include/default-distrovars.inc | 1 + .../eglibc/eglibc-2.16/GLRO_dl_debug_mask.patch | 48 ++++++++++++++------ .../eglibc-2.16/fileops-without-wchar-io.patch | 22 +++++++++ meta/recipes-core/eglibc/eglibc-initial.inc | 1 + meta/recipes-core/eglibc/eglibc-initial_2.16.bb | 9 ++-- meta/recipes-core/eglibc/eglibc_2.16.bb | 3 +- meta/recipes-devtools/gcc/gcc-4.7.inc | 2 +- meta/recipes-devtools/gcc/gcc-cross-initial.inc | 10 ++++ 9 files changed, 82 insertions(+), 19 deletions(-)create mode 100644
meta/recipes-core/eglibc/eglibc-2.16/fileops-without-wchar-io.patch
Quoted 5 lines · Saul Wold
Quoted 4 lines
Denis Carikli (1):
kernel.bbclass: fix external module buildingI held back this one as I think there is still some discussion on it.
Discussion is not on review of this patch. Infact discussion was more about the recently
added feature that casued this issue to start with.