Rework cross toolchain bootstrap
cover Rework cross toolchain bootstrap
This patchset drops one gcc bootstrap phase. It has been possible because of some work upstream glibc to drop build time dependency on libgcc_s and libgcc_eh
I have built all possible images in OE-Core for all qemu machines all of them built fine except *-rt and *-initramfs which failed due to unrelated issues. I have built from scratch as well as built from sstate. Seems to go ok.
The following changes since commit 04568d1f18250d531aad5d286157d2d559083520:
qemu: Fix broken accidental path move (2012-08-20 17:25:21 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib kraj/toolchain-rework
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/toolchain-rework
Khem Raj (9):
eglibc-2.16: Remove build dependency on libgcc_s and libgcc_eh eglibc-2.16: Update to top of 2.16 branch
gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
eglibc: Fix eglibc-initial and let eglibc depend on it uclibc.inc,uclibc-config.inc: Untabify python snippets
uclibc: Use gcc-cross-initial as staging compiler gcc-crosssdk-initial_4.7.bb: Add --with-native-system-header-dir to
EXTRA_OECONF
gcc-cross-intermediate, gcc-crosssdk-intermediate: Remove
gcc: Switch SRC_URI to use svn
.../0001-Add-ARM-specific-static-stubs.c.patch | 27 ++ ...f-libgcc_s-and-libgcc_eh-when-building-gl.patch | 343 ++++++++++++++++++++ meta/recipes-core/eglibc/eglibc-initial.inc | 16 +- meta/recipes-core/eglibc/eglibc-testing.inc | 2 +- meta/recipes-core/eglibc/eglibc.inc | 11 +- meta/recipes-core/eglibc/eglibc_2.16.bb | 6 +- meta/recipes-core/uclibc/uclibc-config.inc | 128 ++++---- meta/recipes-core/uclibc/uclibc-initial_0.9.33.bb | 10 +- meta/recipes-core/uclibc/uclibc-initial_git.bb | 10 +- meta/recipes-core/uclibc/uclibc.inc | 28 +- meta/recipes-core/uclibc/uclibc_0.9.33.bb | 7 +- meta/recipes-core/uclibc/uclibc_git.bb | 7 +- meta/recipes-devtools/gcc/gcc-4.7.inc | 11 +- .../gcc/gcc-4.7/arm-nolibfloat.patch | 40 --- meta/recipes-devtools/gcc/gcc-cross-initial.inc | 50 ++- .../gcc/gcc-cross-intermediate.inc | 68 ---- .../gcc/gcc-cross-intermediate_4.7.bb | 3 - .../gcc/gcc-crosssdk-initial_4.7.bb | 2 + .../gcc/gcc-crosssdk-intermediate.inc | 9 - .../gcc/gcc-crosssdk-intermediate_4.7.bb | 3 - 20 files changed, 534 insertions(+), 247 deletions(-) create mode 100644 meta/recipes-core/eglibc/eglibc-2.16/0001-Add-ARM-specific-static-stubs.c.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.16/0001-Avoid-use-of-libgcc_s-and-libgcc_eh-when-building-gl.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-4.7/arm-nolibfloat.patch delete mode 100644 meta/recipes-devtools/gcc/gcc-cross-intermediate.inc delete mode 100644 meta/recipes-devtools/gcc/gcc-cross-intermediate_4.7.bb delete mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk-intermediate.inc delete mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.7.bb
Signature · 1 line
1.7.9.5
PATCH 1/9 eglibc-2.16: Remove build dependency on libgcc_s and libgcc_eh
This patch backports two patches from glibc trunk essentially dropping the requirements to have libgcc_s and libgcc_eh this will simplify the toolchain bootstrap sequence.
--- .../0001-Add-ARM-specific-static-stubs.c.patch | 27 ++ ...f-libgcc_s-and-libgcc_eh-when-building-gl.patch | 343 ++++++++++++++++++++ meta/recipes-core/eglibc/eglibc_2.16.bb | 4 +- 3 files changed, 373 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-core/eglibc/eglibc-2.16/0001-Add-ARM-specific-static-stubs.c.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.16/0001-Avoid-use-of-libgcc_s-and-libgcc_eh-when-building-gl.patch
meta/recipes-core/eglibc/eglibc-2.16/0001-Add-ARM-specific-static-stubs.c.patch new file +27 -0
@@ -0,0 +1,27 @@ +Upstream-Status: Backport + +Signed-off-by: Khem Raj <[email protected]> + +From c57a67e03368687fc0d2ae8354cd1b347a61ea44 Mon Sep 17 00:00:00 2001 +From: Joseph Myers <[email protected]> +Date: Thu, 5 Jul 2012 22:16:03 +0000 +Subject: [PATCH] Add ARM-specific static-stubs.c. + +--- + ports/ChangeLog.arm | 4 ++++ + ports/sysdeps/arm/static-stubs.c | 7 +++++++ + 2 files changed, 11 insertions(+) + create mode 100644 ports/sysdeps/arm/static-stubs.c + +Index: libc/ports/sysdeps/arm/static-stubs.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libc/ports/sysdeps/arm/static-stubs.c 2012-08-15 15:04:59.687669241 -0700 +@@ -0,0 +1,7 @@ ++/* When building with GCC with static-only libgcc, the dummy ++ _Unwind_Resume from static-stubs.c needs to be used together with ++ the dummy __aeabi_unwind_cpp_pr* from aeabi_unwind_cpp_pr1.c ++ instead of the copies from libgcc. */ ++ ++#include <elf/static-stubs.c> ++#include <aeabi_unwind_cpp_pr1.c>
meta/recipes-core/eglibc/eglibc-2.16/0001-Avoid-use-of-libgcc_s-and-libgcc_eh-when-building-gl.patch new file +343 -0
343 lines not on this page · raw message
meta/recipes-core/eglibc/eglibc_2.16.bb +3 -1
@@ -3,7 +3,7 @@ require eglibc.inc SRCREV = "19383" DEPENDS += "gperf-native" -PR = "r5" +PR = "r6" PR_append = "+svnr${SRCPV}" EGLIBC_BRANCH="eglibc-2_16"
@@ -25,6 +25,8 @@ SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};protocol=h file://e500-math_private.patch \ file://fileops-without-wchar-io.patch \ file://add_resource_h_to_wait_h.patch \ + file://0001-Avoid-use-of-libgcc_s-and-libgcc_eh-when-building-gl.patch \ + file://0001-Add-ARM-specific-static-stubs.c.patch \ " LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \ file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
Signature · 1 line
1.7.9.5
PATCH 2/9 eglibc-2.16: Update to top of 2.16 branch
Some translations and tst-gettext fixes
--- meta/recipes-core/eglibc/eglibc_2.16.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/eglibc/eglibc_2.16.bb +1 -1
@@ -1,6 +1,6 @@ require eglibc.inc -SRCREV = "19383" +SRCREV = "19922" DEPENDS += "gperf-native" PR = "r6"
Signature · 1 line
1.7.9.5
PATCH 3/9 gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
In reply to Khem RajNow glibc can be compiled with gcc-cross-initial therefore prepare the stage to drop gcc-cross-intermediate
Also drop arm-nolibfloat.patch should not be needed anymore half of changes in this patch are meant for OABI which we dont use anymore
--- meta/recipes-devtools/gcc/gcc-4.7.inc | 1 - .../gcc/gcc-4.7/arm-nolibfloat.patch | 40 ---------------- meta/recipes-devtools/gcc/gcc-cross-initial.inc | 50 +++++++++++++++----- 3 files changed, 39 insertions(+), 52 deletions(-) delete mode 100644 meta/recipes-devtools/gcc/gcc-4.7/arm-nolibfloat.patch
meta/recipes-devtools/gcc/gcc-4.7.inc +0 -1
@@ -52,7 +52,6 @@ SRC_URI = "git://github.com/mirrors/gcc.git;branch=${BRANCH};protocol=git \ file://306-libstdc++-namespace.patch \ file://740-sh-pr24836.patch \ file://800-arm-bigendian.patch \ - file://arm-nolibfloat.patch \ file://gcc-poison-system-directories.patch \ file://gcc-poison-dir-extend.patch \ file://gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
meta/recipes-devtools/gcc/gcc-4.7/arm-nolibfloat.patch deleted +0 -40
@@ -1,40 +0,0 @@ -Upstream-Status: Pending - -# Dimitry Andric <[email protected]>, 2004-05-01 -# -# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed -# anymore. (The required functions are now in libgcc.) -# -# Fixes errors like -# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat -# collect2: ld returned 1 exit status -# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1 -# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat - -Index: trunk/gcc/config/arm/linux-elf.h -=================================================================== ---- trunk.orig/gcc/config/arm/linux-elf.h 2012-02-22 12:04:30.644385926 -0800 -+++ trunk/gcc/config/arm/linux-elf.h 2012-02-22 12:04:30.764385931 -0800 -@@ -57,7 +57,7 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -+#define LIBGCC_SPEC "-lgcc" - - #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" - -Index: trunk/libgcc/config/arm/t-linux -=================================================================== ---- trunk.orig/libgcc/config/arm/t-linux 2012-02-22 12:11:48.372407121 -0800 -+++ trunk/libgcc/config/arm/t-linux 2012-02-22 12:13:19.868411588 -0800 -@@ -1,6 +1,8 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _arm_addsubdf3 _arm_addsubsf3 -+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ -+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ -+ _fixsfsi _fixunssfsi _floatdidf _floatundidf _floatdisf _floatundisf - - # Just for these, we omit the frame pointer since it makes such a big - # difference.
meta/recipes-devtools/gcc/gcc-cross-initial.inc +39 -11
64 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
Hi Khem,
Quoted 2 lines · Khem Raj
Now glibc can be compiled with gcc-cross-initial therefore prepare the stage to drop gcc-cross-intermediate
I'm adapting my earlier gcc-4.5 recipes, to try and get them to build with the latest poky master.
I'm using eglibc-2.13, so it is possible for this version to drop the gcc-cross-intermediate stage, or is it only with newer eglibc versions?
At the moment, I've made the required changes to the gcc-4.5 recipes, to match that of the current gcc-4.7 templates, and deleted the gcc-4.5 intermediate recipes.
Right now I get a compile error with eglibc-2.13, as follows:
| powerpc-poky-linux-gcc -m32 -msoft-float -mcpu=440 --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5-tcbootstrap -nostdlib -nostartfiles -o /tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/iconv/iconv_prog -msoft-float -Wl,-dynamic-linker=/lib/ld.so.1 -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both /tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/csu/crt1.o /tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/csu/crti.o `powerpc-poky-linux-gcc -m32 -msoft-float -mcpu=440 --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5-tcbootstrap -msoft-float --print-file-name=crtbegin.o` /tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/iconv/iconv_prog.o /tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/iconv/iconv_charmap.o /tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/iconv/charmap.o /tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/iconv/charmap-dir.o /tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/iconv/linereader.o /tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/iconv/dummy-repertoire.o /tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/iconv/simple-hash.o /tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/iconv/xstrdup.o /tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/iconv/xmalloc.o -Wl,-rpath-link=/tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux:/tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/math:/tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/elf:/tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/dlfcn:/tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/nss:/tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/nis:/tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/rt:/tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/resolv:/tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/crypt:/tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/nptl /tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/libc.so.6 /tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/libc_nonshared.a /tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/elf/ld.so -lgcc -lgcc_eh `powerpc-poky-linux-gcc -m32 -msoft-float -mcpu=440 --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5-tcbootstrap -msoft-float --print-file-name=crtend.o` /tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/csu/crtn.o | /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/libexec/ppc440-poky-linux.gcc-cross-initial/gcc/powerpc-poky-linux/4.5.1/ld: cannot find -lgcc_eh | collect2: ld returned 1 exit status | make[2]: *** [/tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/iconv/iconvconfig] Error 1 | make[2]: *** Waiting for unfinished jobs.... | /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/libexec/ppc440-poky-linux.gcc-cross-initial/gcc/powerpc-poky-linux/4.5.1/ld: cannot find -lgcc_eh | collect2: ld returned 1 exit status | make[2]: *** [/tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/build-powerpc-poky-linux/iconv/iconv_prog] Error 1 | make[2]: Leaving directory `/tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/eglibc-2_13/libc/iconv' | make[1]: *** [iconv/others] Error 2 | make[1]: Leaving directory `/tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/eglibc-2_13/libc' | make: *** [all] Error 2 | ERROR: oe_runmake failed | ERROR: Function failed: do_compile (see /tool/yocto/poky/build/tmp/work/ppc440-poky-linux/eglibc-2.13-r28+svnr15508/temp/log.do_compile.55715 for further information)
ERROR: Task 32 (/tool/yocto/meta-openembedded/toolchain-layer/recipes-core/eglibc/eglibc_2.13.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1146 tasks of which 1145 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/tool/yocto/meta-openembedded/toolchain-layer/recipes-core/eglibc/eglibc_2.13.bb, do_compile
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Best regards,
Elvis Dowson
Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
Quoted 7 lines · Elvis Dowson
I'm adapting my earlier gcc-4.5 recipes, to try and get them to build with the latest poky master.
I'm using eglibc-2.13, so it is possible for this version to drop the gcc-cross-intermediate stage, or is it only with newer eglibc versions?
well it wont work with anything older than eglibc 2.16
Quoted 5 lines
At the moment, I've made the required changes to the gcc-4.5 recipes, to match that of the current gcc-4.7 templates, and deleted the gcc-4.5 intermediate recipes.
Right now I get a compile error with eglibc-2.13, as follows:
Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
Quoted 10 lines · Khem Raj
Quoted 7 lines · Elvis Dowson
I'm adapting my earlier gcc-4.5 recipes, to try and get them to build with the latest poky master.
I'm using eglibc-2.13, so it is possible for this version to drop the gcc-cross-intermediate stage, or is it only with newer eglibc versions?
well it wont work with anything older than eglibc 2.16
What should I do to get the gcc-4.5 recipes to continue to build, with eglib-2.13, against the poky master branch? Should I retain the gcc-intermediate recipes?
Best regards,
Elvis
Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
Quoted 4 lines · Elvis Dowson
Quoted 1 line · Khem Raj
On Fri, Aug 24, 2012 at 2:08 PM, Elvis Dowson <[email protected]>
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
I'm adapting my earlier gcc-4.5 recipes, to try and get them to build
with
Quoted 9 lines
Quoted 7 lines
Quoted 5 lines
the latest poky master.
I'm using eglibc-2.13, so it is possible for this version to drop the gcc-cross-intermediate stage, or is it only with newer eglibc versions?
well it wont work with anything older than eglibc 2.16
What should I do to get the gcc-4.5 recipes to continue to build, with
eglib-2.13,
Quoted 1 line
against the poky master branch? Should I retain the gcc-intermediate
recipes?
Back port some patches I did for eglibc 2.16 and drop intermediate recipes
Quoted 3 lines
Best regards,
Elvis
Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
Hi Khem,
Quoted 13 lines · Khem Raj
Quoted 12 lines · Elvis Dowson
Quoted 9 lines · Khem Raj
Quoted 7 lines · Elvis Dowson
I'm adapting my earlier gcc-4.5 recipes, to try and get them to build with the latest poky master.
I'm using eglibc-2.13, so it is possible for this version to drop the gcc-cross-intermediate stage, or is it only with newer eglibc versions?
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
well it wont work with anything older than eglibc 2.16
What should I do to get the gcc-4.5 recipes to continue to build, with eglib-2.13, against the poky master branch? Should I retain the gcc-intermediate recipes?
Back port some patches I did for eglibc 2.16 and drop intermediate recipes
I've back ported the patches you did for eglibc-2.16 for eglibc-2.13, to use with my gcc-4.5 recipe, for the PowerPC 440 target. With that patch applied, in a local copy of my meta-openembedded/toolchain-layer, containing both the eglibc-2.13 and gcc-4.5, recipe,
building against the poky/master commit id works:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b0faebd1f07e1616004bd19664395932e7c2c48f
gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
I am able to get to the shell prompt, and get no crashes upto this point. The root file system seems to be working fine, and I am able to ping the host machine.
It is with the application of the next patch, that I get a an init crash on the console, as I have been seeing earlier.
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=48df3fe947c4d900aa6b66d9d8352c0d9e59ebe4
eglibc: Fix eglibc-initial and let eglibc depend on it
I've narrowed down the init problem, to the application of the above patch, but I'm unable to figure out why it is failing. Any suggestions?
Best regards,
Elvis Dowson
Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
Quoted 4 lines · Elvis Dowson
I've narrowed down the init problem, to the application of the above patch, but I'm unable to figure out why it is failing. Any suggestions?
is it eglibc 2.13 ? or 2.16 one thing I see is that it is disabling ssp but otherwise it looks not to so much than changing eglibc to use gcc-initial
Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
Hi Khem,
Quoted 9 lines · Khem Raj
Quoted 4 lines · Elvis Dowson
I've narrowed down the init problem, to the application of the above patch, but I'm unable to figure out why it is failing. Any suggestions?
is it eglibc 2.13 ? or 2.16 one thing I see is that it is disabling ssp but otherwise it looks not to so much than changing eglibc to use gcc-initial
It's eglibc-2.13. I will try without disabling ssp.
I also cherry-picked this patch
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=800ce0f1d09f2d4fc489c98ecca04cf695d707fa
gcc-cross-initial: Reinstate limits.h generation fix
and I think I'll need to backport this patch to gcc-4.5.1,
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=42f0f96903ac312881ef841ae4380b4d1c72980f
gcc-4.7: Backport libgcc fixes to appease the new build sequence
FYI, I also briefly tested the latest poky master as of today, for the powerpc440 target, but no change from the previous sitatuation, with gcc-4.7.x and eglibc-2.16, which is init=/bin/sh gives no bash prompt. It just finishes loading the kernel and stops with no prompt. If I click on the enter key, the display scrolls up, but that's it.
With gcc-4.5.1, and specific commits, it varies with things working correctly and giving a bash prompt; to a kernel panic when attempting to run the bash prompt.
Best regards,
Elvis Dowson
Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
In reply to Khem RajHi Khem,
Quoted 3 lines · Khem Raj
Quoted 2 lines · Elvis Dowson
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=48df3fe947c4d900aa6b66d9d8352c0d9e59ebe4
eglibc: Fix eglibc-initial and let eglibc depend on it
Quoted 7 lines
Quoted 3 lines
I've narrowed down the init problem, to the application of the above patch, but I'm unable to figure out why it is failing. Any suggestions?
is it eglibc 2.13 ? or 2.16 one thing I see is that it is disabling ssp but otherwise it looks not to so much than changing eglibc to use gcc-initial
I was able to get past the error, with back porting the following patch:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=42f0f96903ac312881ef841ae4380b4d1c72980f
gcc-4.7: Backport libgcc fixes to appease the new build sequence
disabling ssp was not the problem, tested with both ssp enabled and disabled.
So, now I've got gcc-4.5.4 working with eglibc-2.13, upto the point where the kconfig infrastructure was added.
Next, to add the kconfig infrastructure to eglibc-2.13, and fast forward to the tip of the poky master branch, and see if things are still ok, with the PowerPC440.
Best regards,
Elvis Dowson
Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
Hi Khem,
Quoted 4 lines · Elvis Dowson
So, now I've got gcc-4.5.4 working with eglibc-2.13, upto the point where the kconfig infrastructure was added.
Next, to add the kconfig infrastructure to eglibc-2.13, and fast forward to the tip of the poky master branch, and see if things are still ok, with the PowerPC440.
Good news, I was able to get the backported patches for gcc-4.5.4 and eglibc-2.13 working with the latest poky and meta-openembedded master branch commits. This includes the gcc toolchain rework and the kconfig support to eglibc.
Let me now try to switch to gcc-4.7.2 and eglibc-2.16, and see if things work. I noticed that there was a recent patch to fix a core-image.bb class, that prevented root login if debug tweaks was enabled. Perhaps that is why I didn't see the boot prompt on the target console with the recent gcc versions?
Best regards,
Elvis Dowson
Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
Quoted 4 lines · Elvis Dowson
Hi Khem,
On Oct 9, 2012, at 5:48 PM, Elvis Dowson wrote:
Quoted 9 lines
Quoted 4 lines
So, now I've got gcc-4.5.4 working with eglibc-2.13, upto the point where the kconfig infrastructure was added.
Next, to add the kconfig infrastructure to eglibc-2.13, and fast forward to the tip of the poky master branch, and see if things are still ok, with the PowerPC440.
Good news, I was able to get the backported patches for gcc-4.5.4 and eglibc-2.13 working with the latest poky and meta-openembedded master branch commits. This includes the gcc toolchain rework and the kconfig support to eglibc.
Let me now try to switch to gcc-4.7.2 and eglibc-2.16, and see if things work. I noticed that there was a recent patch to fix a core-image.bb class, that prevented root login if debug tweaks was enabled. Perhaps that is why I didn't see the boot prompt on the target console with the recent gcc versions?
I don't think so. You should always see login prompt. It might not let you login if you don't have debug-tweaks in IMAGE_FEATURES
Quoted 3 lines
Best regards,
Elvis Dowson
PATCH 4/9 eglibc: Fix eglibc-initial and let eglibc depend on it
In reply to Khem Rajeglibc-initial does not need to install fake shared libs anymore so drop it.
eglibc now should depend on eglibc-initial so that bootstrap sysroot gets populated properly.
Drop references to gcc intermediate from glibc testing scripts.
--- meta/recipes-core/eglibc/eglibc-initial.inc | 16 +++++++--------- meta/recipes-core/eglibc/eglibc-testing.inc | 2 +- meta/recipes-core/eglibc/eglibc.inc | 11 +++++++---- 3 files changed, 15 insertions(+), 14 deletions(-)
meta/recipes-core/eglibc/eglibc-initial.inc +7 -9
@@ -32,6 +32,9 @@ do_install () { 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
@@ -42,15 +45,10 @@ do_install () { if [ -e ${B}/bits/stdio_lim.h ]; then cp ${B}/bits/stdio_lim.h ${D}${includedir}/bits/ fi - mkdir -p ${D}${libdir}/ - install -m 644 csu/crt[1in].o ${D}${libdir} - ${CC} -nostdlib -nostartfiles -shared -x c /dev/null \ - -o ${D}${libdir}/libc.so - - # add links to linux-libc-headers: gcc-{cross,crossdk}-intermediate need this. - for t in linux asm asm-generic; do - ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/ - done + # add links to linux-libc-headers: final eglibc build need this. + for t in linux asm asm-generic; do + ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/ + done } do_install_locale() {
meta/recipes-core/eglibc/eglibc-testing.inc +1 -1
@@ -37,7 +37,7 @@ do_compile_append () { sed -i -e "s/\-tcbootstrap//g" ${B}/${HOST_PREFIX}testeglibc # use the final cross-gcc to test since some tests need libstdc++ - sed -i -e "s/^PATH=.*\.gcc-cross-intermediate\:/PATH=/g" ${B}/${HOST_PREFIX}testeglibc + sed -i -e "s/^PATH=.*\.gcc-cross-initial\:/PATH=/g" ${B}/${HOST_PREFIX}testeglibc # append execution part script cat >> ${B}/${HOST_PREFIX}testeglibc << STOP
meta/recipes-core/eglibc/eglibc.inc +7 -4
@@ -2,8 +2,8 @@ require eglibc-common.inc require eglibc-ld.inc require eglibc-testing.inc -STAGINGCC = "gcc-cross-intermediate" -STAGINGCC_virtclass-nativesdk = "gcc-crosssdk-intermediate" +STAGINGCC = "gcc-cross-initial" +STAGINGCC_virtclass-nativesdk = "gcc-crosssdk-initial" PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:" TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
@@ -22,7 +22,7 @@ siteconfig_do_siteconfig_gencache_prepend = " \ " # nptl needs unwind support in gcc, which can't be built without glibc. -DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers" +DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers virtual/${TARGET_PREFIX}libc-initial" # nptl needs libgcc but dlopens it, so our shlibs code doesn't detect this #RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}" PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
@@ -33,7 +33,10 @@ require eglibc-options.inc LEAD_SONAME = "libc.so" CACHED_CONFIGUREVARS += "ac_cv_path_KSH=${base_bindir}/bash \ - ac_cv_path_BASH_SHELL=${base_bindir}/bash" + ac_cv_path_BASH_SHELL=${base_bindir}/bash \ + libc_cv_ssp=no \ + " + GLIBC_EXTRA_OECONF ?= "" GLIBC_EXTRA_OECONF_virtclass-nativesdk = "" INHIBIT_DEFAULT_DEPS = "1"
Signature · 1 line
1.7.9.5
PATCH 5/9 uclibc.inc, uclibc-config.inc: Untabify python snippets
In reply to Khem RajTo appease bitbake
--- meta/recipes-core/uclibc/uclibc-config.inc | 128 +++++++++++++++------------- meta/recipes-core/uclibc/uclibc.inc | 28 +++--- 2 files changed, 85 insertions(+), 71 deletions(-)
meta/recipes-core/uclibc/uclibc-config.inc +71 -57
@@ -32,84 +32,98 @@ x86_64 \ xtensa \ " def map_uclibc_arch(a, d): - """Return the uClibc architecture for the given TARGET_ARCH.""" - import re + """Return the uClibc architecture for the given TARGET_ARCH.""" + import re - valid_archs = d.getVar('valid_archs', True).split() + valid_archs = d.getVar('valid_archs', True).split() - if re.match('^(arm|sa110).*', a): return 'arm' - elif re.match('^(i.86|athlon)$', a): return 'i386' - elif re.match('^mips.*', a): return 'mips' - elif re.match('^parisc.*', a): return 'hppa' - elif re.match('^ppc.*', a): return 'powerpc' - elif re.match('^s390.*', a): return 's390' - elif re.match('^sh.*', a): return 'sh' - elif re.match('^(sun|sparc).*', a): return 'sparc' - elif re.match('^xtensa.*', a): return 'xtensa' - elif a in valid_archs: return a - else: - bb.error("cannot map '%s' to a uClibc architecture" % a) + if re.match('^(arm|sa110).*', a): + return 'arm' + elif re.match('^(i.86|athlon)$', a): + return 'i386' + elif re.match('^mips.*', a): + return 'mips' + elif re.match('^parisc.*', a): + return 'hppa' + elif re.match('^ppc.*', a): + return 'powerpc' + elif re.match('^s390.*', a): + return 's390' + elif re.match('^sh.*', a): + return 'sh' + elif re.match('^(sun|sparc).*', a): + return 'sparc' + elif re.match('^xtensa.*', a): + return 'xtensa' + elif a in valid_archs: + return a + else: + bb.error("cannot map '%s' to a uClibc architecture" % a) export UCLIBC_ARCH = "${@map_uclibc_arch(d.getVar('TARGET_ARCH', True), d)}" def map_uclibc_abi(o, d): - """Return the uClibc ABI for the given TARGET_OS.""" - import re + """Return the uClibc ABI for the given TARGET_OS.""" + import re - arch = d.getVar('TARGET_ARCH', True) - if map_uclibc_arch(d.getVar('TARGET_ARCH', True), d) == "arm": - if re.match('.*eabi$', o): return 'ARM_EABI' - else: return 'ARM_OABI' - # FIXME: This is inaccurate! Handle o32, n32, n64 - elif re.match('^mips.*64$', arch): return 'MIPS_N64_ABI' - elif re.match('^mips.*', arch): return 'MIPS_O32_ABI' - return "" + arch = d.getVar('TARGET_ARCH', True) + if map_uclibc_arch(d.getVar('TARGET_ARCH', True), d) == "arm": + if re.match('.*eabi$', o): + return 'ARM_EABI' + else: + return 'ARM_OABI' + # FIXME: This is inaccurate! Handle o32, n32, n64 + elif re.match('^mips.*64$', arch): + return 'MIPS_N64_ABI' + elif re.match('^mips.*', arch): + return 'MIPS_O32_ABI' + return "" export UCLIBC_ABI = "${@map_uclibc_abi(d.getVar('TARGET_OS', True), d)}" def map_uclibc_endian(a, d): - """Return the uClibc endianess for the given TARGET_ARCH.""" - import re + """Return the uClibc endianess for the given TARGET_ARCH.""" + import re - # Always BE - if re.match('^(avr32|e1|frv|(parisc|hppa)|m68k|microblaze|powerpc.*|(sparc|sun).*)$', a): - return 'BIG' - # Possibly BE - elif re.match('^(((arm|sa110).*eb)|h8300.*eb|(parisc|hppa).*eb|mips|mips64|sh.*eb|xtensa.*eb)$', a): - return 'BIG' - return 'LITTLE' + # Always BE + if re.match('^(avr32|e1|frv|(parisc|hppa)|m68k|microblaze|powerpc.*|(sparc|sun).*)$', a): + return 'BIG' + # Possibly BE + elif re.match('^(((arm|sa110).*eb)|h8300.*eb|(parisc|hppa).*eb|mips|mips64|sh.*eb|xtensa.*eb)$', a): + return 'BIG' + return 'LITTLE' export UCLIBC_ENDIAN = "${@map_uclibc_endian(d.getVar('TARGET_ARCH', True), d)}" # internal helper def uclibc_cfg(feature, features, tokens, cnf, rem): - if type(tokens) == type(""): - tokens = [tokens] - rem.extend(['/^[# ]*' + token + '[ =]/d' for token in tokens]) - if type(features) == type([]) and feature in features: - cnf.extend([token + '=y' for token in tokens]) - else: - cnf.extend(['# ' + token + ' is not set' for token in tokens]) + if type(tokens) == type(""): + tokens = [tokens] + rem.extend(['/^[# ]*' + token + '[ =]/d' for token in tokens]) + if type(features) == type([]) and feature in features: + cnf.extend([token + '=y' for token in tokens]) + else: + cnf.extend(['# ' + token + ' is not set' for token in tokens]) # Map distro features to config settings def features_to_uclibc_settings(d): - cnf, rem = ([], []) - distro_features = d.getVar('DISTRO_FEATURES', True).split() - uclibc_cfg('ipv4', distro_features, 'UCLIBC_HAS_IPV4', cnf, rem) - uclibc_cfg('ipv6', distro_features, 'UCLIBC_HAS_IPV6', cnf, rem) - uclibc_cfg('largefile', distro_features, 'UCLIBC_HAS_LFS', cnf, rem) - uclibc_cfg('nls', distro_features, 'UCLIBC_HAS_LOCALE', cnf, rem) - uclibc_cfg('thumb-interwork', distro_features,'USE_BX', cnf, rem) - uclibc_cfg('xattr', distro_features, 'UCLIBC_HAS_XATTR', cnf, rem) - uclibc_cfg('ssp', distro_features, 'UCLIBC_HAS_SSP', cnf, rem) - uclibc_cfg('argp', distro_features, 'UCLIBC_HAS_ARGP', cnf, rem) - uclibc_cfg('libc-posix-clang-wchar', distro_features,'UCLIBC_HAS_WCHAR', cnf, rem) - return "\n".join(cnf), "\n".join(rem) + cnf, rem = ([], []) + distro_features = d.getVar('DISTRO_FEATURES', True).split() + uclibc_cfg('ipv4', distro_features, 'UCLIBC_HAS_IPV4', cnf, rem) + uclibc_cfg('ipv6', distro_features, 'UCLIBC_HAS_IPV6', cnf, rem) + uclibc_cfg('largefile', distro_features, 'UCLIBC_HAS_LFS', cnf, rem) + uclibc_cfg('nls', distro_features, 'UCLIBC_HAS_LOCALE', cnf, rem) + uclibc_cfg('thumb-interwork', distro_features,'USE_BX', cnf, rem) + uclibc_cfg('xattr', distro_features, 'UCLIBC_HAS_XATTR', cnf, rem) + uclibc_cfg('ssp', distro_features, 'UCLIBC_HAS_SSP', cnf, rem) + uclibc_cfg('argp', distro_features, 'UCLIBC_HAS_ARGP', cnf, rem) + uclibc_cfg('libc-posix-clang-wchar', distro_features,'UCLIBC_HAS_WCHAR', cnf, rem) + return "\n".join(cnf), "\n".join(rem) # X, Y = ${@features_to_uclibc_settings(d)} # unfortunately doesn't seem to work with bitbake, workaround: def features_to_uclibc_conf(d): - cnf, rem = features_to_uclibc_settings(d) - return cnf + cnf, rem = features_to_uclibc_settings(d) + return cnf def features_to_uclibc_del(d): - cnf, rem = features_to_uclibc_settings(d) - return rem + cnf, rem = features_to_uclibc_settings(d) + return rem
meta/recipes-core/uclibc/uclibc.inc +14 -14
@@ -83,13 +83,13 @@ configmangle = '/^KERNEL_HEADERS/d; \ OE_FEATURES := "${@features_to_uclibc_conf(d)}" OE_DEL := "${@features_to_uclibc_del(d)}" python () { - if "${OE_DEL}": - d.setVar('configmangle_append', "${OE_DEL}" + "\n") - if "${OE_FEATURES}": - d.setVar('configmangle_append', + if "${OE_DEL}": + d.setVar('configmangle_append', "${OE_DEL}" + "\n") + if "${OE_FEATURES}": + d.setVar('configmangle_append', "/^### DISTRO FEATURES$/a\\\n%s\n\n" % ("\\n".join((d.expand("${OE_FEATURES}").split("\n"))))) - d.setVar('configmangle_append', + d.setVar('configmangle_append', "/^### CROSS$/a\\\n%s\n" % ("\\n".join(["CROSS_COMPILER_PREFIX=\"${TARGET_PREFIX}\"", "UCLIBC_EXTRA_CFLAGS=\"${UCLIBC_EXTRA_CFLAGS}\"",
@@ -99,23 +99,23 @@ python () { "SHARED_LIB_LOADER_PREFIX=\"/lib\"", ]) )) - d.setVar('configmangle_append', + d.setVar('configmangle_append', "/^### TGT$/a\\\nTARGET_ARCH=\"%s\"\\nTARGET_%s=y\n" % ("${UCLIBC_ARCH}", "${UCLIBC_ARCH}")) - d.setVar('configmangle_append', - "/^### FPU$/a\\\n%s\n\n" % (["UCLIBC_HAS_FPU=y","# UCLIBC_HAS_FPU is not set"][d.getVar('TARGET_FPU', True) in [ 'soft' ]])) - if "${UCLIBC_ENDIAN}": d.setVar('configmangle_append', + "/^### FPU$/a\\\n%s\n\n" % (["UCLIBC_HAS_FPU=y","# UCLIBC_HAS_FPU is not set"][d.getVar('TARGET_FPU', True) in [ 'soft' ]])) + if "${UCLIBC_ENDIAN}": + d.setVar('configmangle_append', "/^### ABI$/a\\\nARCH_WANTS_%s_ENDIAN=y\n\n" % ("${UCLIBC_ENDIAN}")) - if "${UCLIBC_ABI}": - d.setVar('configmangle_append', + if "${UCLIBC_ABI}": + d.setVar('configmangle_append', "/^### ABI$/a\\\nCONFIG_%s=y\n\n" % ("${UCLIBC_ABI}")) } python do_patch_append() { - import subprocess - subprocess.call("ln -sf ${STAGING_INCDIR}/linux ${S}/include/linux", shell=True) - subprocess.call("ln -sf ${STAGING_INCDIR}/asm ${S}/include/asm", shell=True) + import subprocess + subprocess.call("ln -sf ${STAGING_INCDIR}/linux ${S}/include/linux", shell=True) + subprocess.call("ln -sf ${STAGING_INCDIR}/asm ${S}/include/asm", shell=True) } do_configure() {
Signature · 1 line
1.7.9.5
PATCH 6/9 uclibc: Use gcc-cross-initial as staging compiler
In reply to Khem RajDo not build fake shared libraries during uclibc-initial phase
Let uclibc depend on gcc-cross-initial instead of gcc-cross-intermediate thereby set stage to remove gcc-cross-intermediate
Let uclibc depend on uclibc-initial so that boostrap sysroot gets populated properly
--- meta/recipes-core/uclibc/uclibc-initial_0.9.33.bb | 10 +++------- meta/recipes-core/uclibc/uclibc-initial_git.bb | 10 +++------- meta/recipes-core/uclibc/uclibc_0.9.33.bb | 7 ++++--- meta/recipes-core/uclibc/uclibc_git.bb | 7 ++++--- 4 files changed, 14 insertions(+), 20 deletions(-)
meta/recipes-core/uclibc/uclibc-initial_0.9.33.bb +3 -7
@@ -15,19 +15,15 @@ do_install() { # Install initial headers into the cross dir make PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ install_headers install_startfiles - ${CC} -nostdlib -nostartfiles -shared -x c /dev/null \ - -o lib/libc.so - ${CC} -nostdlib -nostartfiles -shared -x c /dev/null \ - -o lib/libm.so - install -d ${D}${libdir} - install -m 755 lib/lib[cm].so ${D}${libdir} - # add links to linux-libc-headers: gcc-{cross,crossdk}-intermediate need this. + + # add links to linux-libc-headers: final uclibc build need this. for t in linux asm asm-generic; do if [ -d ${D}${includedir}/$t ]; then rm -rf ${D}${includedir}/$t fi ln -sf ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/ done + } do_compile() { :
meta/recipes-core/uclibc/uclibc-initial_git.bb +3 -7
@@ -15,19 +15,15 @@ do_install() { # Install initial headers into the cross dir make PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \ install_headers install_startfiles - ${CC} -nostdlib -nostartfiles -shared -x c /dev/null \ - -o lib/libc.so - ${CC} -nostdlib -nostartfiles -shared -x c /dev/null \ - -o lib/libm.so - install -d ${D}${libdir} - install -m 755 lib/lib[cm].so ${D}${libdir} - # add links to linux-libc-headers: gcc-{cross,crossdk}-intermediate need this. + + # add links to linux-libc-headers: final uclibc build need this. for t in linux asm asm-generic; do if [ -d ${D}${includedir}/$t ]; then rm -rf ${D}${includedir}/$t fi ln -sf ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/ done + } do_compile() { :
meta/recipes-core/uclibc/uclibc_0.9.33.bb +4 -3
@@ -4,11 +4,12 @@ require uclibc.inc require uclibc-package.inc require uclibc-${PV}.inc -STAGINGCC = "gcc-cross-intermediate" -STAGINGCC_virtclass-nativesdk = "gcc-crosssdk-intermediate" +STAGINGCC = "gcc-cross-initial" +STAGINGCC_virtclass-nativesdk = "gcc-crosssdk-initial" DEPENDS = "virtual/${TARGET_PREFIX}binutils \ - virtual/${TARGET_PREFIX}gcc-intermediate \ + virtual/${TARGET_PREFIX}gcc-initial \ + virtual/${TARGET_PREFIX}libc-initial \ linux-libc-headers ncurses-native" PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
meta/recipes-core/uclibc/uclibc_git.bb +4 -3
@@ -4,13 +4,14 @@ require uclibc.inc require uclibc-package.inc require uclibc-git.inc -STAGINGCC = "gcc-cross-intermediate" -STAGINGCC_virtclass-nativesdk = "gcc-crosssdk-intermediate" +STAGINGCC = "gcc-cross-initial" +STAGINGCC_virtclass-nativesdk = "gcc-crosssdk-initial" PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc" DEPENDS = "virtual/${TARGET_PREFIX}binutils \ - virtual/${TARGET_PREFIX}gcc-intermediate \ + virtual/${TARGET_PREFIX}gcc-initial \ + virtual/${TARGET_PREFIX}libc-initial \ linux-libc-headers ncurses-native" RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
Signature · 1 line
1.7.9.5
PATCH 7/9 gcc-crosssdk-initial_4.7.bb: Add --with-native-system-header-dir to EXTRA_OECONF
In reply to Khem Rajgcc-crosssdk-intermediate will go away and -initial will assume its responsibility therefore transfer the option
--- .../gcc/gcc-crosssdk-initial_4.7.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.7.bb +2 -0
@@ -1,2 +1,4 @@ require recipes-devtools/gcc/gcc-cross-initial_${PV}.bb require gcc-crosssdk-initial.inc +EXTRA_OECONF += " --with-native-system-header-dir=${SYSTEMHEADERS} " +
Signature · 1 line
1.7.9.5
PATCH 8/9 gcc-cross-intermediate, gcc-crosssdk-intermediate: Remove
In reply to Khem RajThese recipes arent used anymore so delete them
--- .../gcc/gcc-cross-intermediate.inc | 68 -------------------- .../gcc/gcc-cross-intermediate_4.7.bb | 3 - .../gcc/gcc-crosssdk-intermediate.inc | 9 --- .../gcc/gcc-crosssdk-intermediate_4.7.bb | 3 - 4 files changed, 83 deletions(-) delete mode 100644 meta/recipes-devtools/gcc/gcc-cross-intermediate.inc delete mode 100644 meta/recipes-devtools/gcc/gcc-cross-intermediate_4.7.bb delete mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk-intermediate.inc delete mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.7.bb
meta/recipes-devtools/gcc/gcc-cross-intermediate.inc deleted +0 -68
@@ -1,68 +0,0 @@ -DEPENDS = "virtual/${TARGET_PREFIX}binutils ${NATIVEDEPS}" -DEPENDS += "virtual/${TARGET_PREFIX}libc-initial" -PROVIDES = "virtual/${TARGET_PREFIX}gcc-intermediate" -PACKAGES = "" - -INHIBIT_DEFAULT_DEPS = "1" -INHIBIT_AUTOTOOLS_DEPS = "1" - -CROSS_TARGET_SYS_DIR_append = ".${PN}" - -# This is intended to be a -very- basic config -# sysroot is needed in case we use libc-initial -# -# Glibc won't compile with gold, and building glibc is the whole point of -# this recipe. So we select ld.bfd explicitly here if gold is the distro's -# preferred linker. -EXTRA_OECONF = "--enable-shared \ - --disable-multilib \ - --disable-threads \ - --enable-languages=c \ - ${OPTSPACE} \ - --program-prefix=${TARGET_PREFIX} \ - --with-sysroot=${STAGING_DIR_TCBOOTSTRAP} \ - --with-build-sysroot=${STAGING_DIR_TCBOOTSTRAP} \ - ${EXTRA_OECONF_INTERMEDIATE} \ - ${EXTRA_OECONF_FPU} \ - ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--with-ld=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}ld.bfd', '', d)}" - -do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST} ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}" -do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST} ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}" - -do_compile () { - oe_runmake -} - -do_install () { - oe_runmake 'DESTDIR=${D}' install - install -d ${D}${target_base_libdir}/ - osdir=`${D}${STAGING_BINDIR_TOOLCHAIN}.${PN}/${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} -print-multi-os-directory` - mv ${D}${exec_prefix}/${TARGET_SYS}/lib/$osdir/* ${D}${target_base_libdir}/ - - # We don't really need this (here shares/ contains man/, info/, locale/). - rm -rf ${D}${datadir}/ - - # We use libiberty from binutils - find ${D}${exec_prefix}/lib -name libiberty.a | xargs rm -f - find ${D}${exec_prefix}/lib -name libiberty.h | xargs rm -f - - # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are - # found. These need to be relative paths so they work in different locations. - dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ - install -d $dest - for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do - ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t - done -} - -# -# Override the default sysroot staging copy since this won't look like a target system -# -sysroot_stage_all() { - sysroot_stage_dir ${D} ${SYSROOT_DESTDIR} - install -d ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_base_libdir}/ - install -d ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_libdir}/ - mv ${SYSROOT_DESTDIR}${target_base_libdir}/* ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_base_libdir}/ || true - mv ${SYSROOT_DESTDIR}${target_libdir}/* ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_libdir}/ || true -} -
meta/recipes-devtools/gcc/gcc-cross-intermediate_4.7.bb deleted +0 -3
@@ -1,3 +0,0 @@ -require recipes-devtools/gcc/gcc-cross_${PV}.bb -require gcc-cross-intermediate.inc -
meta/recipes-devtools/gcc/gcc-crosssdk-intermediate.inc deleted +0 -9
@@ -1,9 +0,0 @@ -inherit crosssdk - -SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include" -SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/" -SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/" - -DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk gettext-native" -DEPENDS += "virtual/${TARGET_PREFIX}libc-initial-nativesdk" -PROVIDES = "virtual/${TARGET_PREFIX}gcc-intermediate-crosssdk"
meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.7.bb deleted +0 -3
@@ -1,3 +0,0 @@ -require recipes-devtools/gcc/gcc-cross-intermediate_${PV}.bb -require gcc-crosssdk-intermediate.inc -EXTRA_OECONF += " --with-native-system-header-dir=${SYSTEMHEADERS} "
Signature · 1 line
1.7.9.5
PATCH 9/9 gcc: Switch SRC_URI to use svn
In reply to Khem Rajsvn tar balls are 96M as compared to 1.3G git tars its unnessary to suck in that much of data.
Fixes [YOCTO #2908]
--- meta/recipes-devtools/gcc/gcc-4.7.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
meta/recipes-devtools/gcc/gcc-4.7.inc +5 -5
@@ -1,6 +1,6 @@ require gcc-common.inc -PR = "r9" +PR = "r10" # Third digit in PV should be incremented after a minor release # happens from this branch on gcc e.g. currently its 4.7.1
@@ -11,7 +11,7 @@ PR = "r9" # using 4.7.1.0 for upgrade path when we move past 4.7.2 release # then we should drop the last 0 as well. -PV = "4.7.1.0+git${SRCPV}" +PV = "4.7.1.0+svn${SRCPV}" # BINV should be incremented after updating to a revision # after a minor gcc release (e.g. 4.7.1 or 4.7.2) has been made
@@ -21,7 +21,7 @@ PV = "4.7.1.0+git${SRCPV}" BINV = "4.7.2" -SRCREV = "d07e24f4ab59f264d68d21838795349faab5dede" +SRCREV = "190218" BRANCH = "gcc-4_7-branch" FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/gcc-4.7' ], d)}"
@@ -36,7 +36,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8" -SRC_URI = "git://github.com/mirrors/gcc.git;branch=${BRANCH};protocol=git \ +SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};protocol=http \ file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ file://100-uclibc-conf.patch \ file://gcc-uclibc-locale-ctype_touplow_t.patch \
@@ -76,7 +76,7 @@ SRC_URI = "git://github.com/mirrors/gcc.git;branch=${BRANCH};protocol=git \ file://disablesdt.patch \ " -S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git" +S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/${BRANCH}" B = "${WORKDIR}/${BRANCH}/build.${HOST_SYS}.${TARGET_SYS}" # Language Overrides
Signature · 1 line
1.7.9.5
Quoted 18 lines · Khem Raj
This patchset drops one gcc bootstrap phase. It has been possible because of some work upstream glibc to drop build time dependency on
libgcc_sandlibgcc_ehI have built all possible images in OE-Core for all qemu machines all of them built fine except *-rt and *-initramfs which failed due to unrelated issues. I have built from scratch as well as built from sstate. Seems to go ok.
The following changes since commit
04568d1f18250d531aad5d286157d2d559083520:qemu: Fix broken accidental path move (2012-08-20 17:25:21 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contribkraj/toolchain-rework
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/toolchain-rework
Quoted 10 lines
Khem Raj (9):
eglibc-2.16: Remove build dependency onlibgcc_sandlibgcc_eheglibc-2.16: Update to top of 2.16 branch
gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
eglibc: Fix eglibc-initial and let eglibc depend on it uclibc.inc,uclibc-config.inc: Untabify python snippets
uclibc: Use gcc-cross-initial as staging compiler gcc-crosssdk-initial_4.7.bb: Add --with-native-system-header-dir to
EXTRA_OECONF
gcc-cross-intermediate, gcc-crosssdk-intermediate: Remove
Merged the above set of 8 into OE-Core
Thanks
Sau!
Quoted 31 lines
gcc: Switch
SRC_URIto use svn.../0001-Add-ARM-specific-static-stubs.c.patch | 27 ++ ...f-libgcc_s-and-libgcc_eh-when-building-gl.patch | 343 ++++++++++++++++++++ meta/recipes-core/eglibc/eglibc-initial.inc | 16 +- meta/recipes-core/eglibc/eglibc-testing.inc | 2 +- meta/recipes-core/eglibc/eglibc.inc | 11 +- meta/recipes-core/eglibc/eglibc_2.16.bb | 6 +- meta/recipes-core/uclibc/uclibc-config.inc | 128 ++++---- meta/recipes-core/uclibc/uclibc-initial_0.9.33.bb | 10 +- meta/recipes-core/uclibc/uclibc-initial_git.bb | 10 +- meta/recipes-core/uclibc/uclibc.inc | 28 +- meta/recipes-core/uclibc/uclibc_0.9.33.bb | 7 +- meta/recipes-core/uclibc/uclibc_git.bb | 7 +- meta/recipes-devtools/gcc/gcc-4.7.inc | 11 +- .../gcc/gcc-4.7/arm-nolibfloat.patch | 40 --- meta/recipes-devtools/gcc/gcc-cross-initial.inc | 50 ++- .../gcc/gcc-cross-intermediate.inc | 68 ---- .../gcc/gcc-cross-intermediate_4.7.bb | 3 - .../gcc/gcc-crosssdk-initial_4.7.bb | 2 + .../gcc/gcc-crosssdk-intermediate.inc | 9 - .../gcc/gcc-crosssdk-intermediate_4.7.bb | 3 - 20 files changed, 534 insertions(+), 247 deletions(-)create mode 100644
meta/recipes-core/eglibc/eglibc-2.16/0001-Add-ARM-specific-static-stubs.c.patchcreate mode 100644meta/recipes-core/eglibc/eglibc-2.16/0001-Avoid-use-of-libgcc_s-and-libgcc_eh-when-building-gl.patchdelete mode 100644meta/recipes-devtools/gcc/gcc-4.7/arm-nolibfloat.patch
delete mode 100644 meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
delete mode 100644 meta/recipes-devtools/gcc/gcc-cross-intermediate_4.7.bb
delete mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk-intermediate.inc
delete mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.7.bb