All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] Rework cross toolchain bootstrap
@ 2012-08-21  3:07 Khem Raj
  2012-08-21  3:07 ` [PATCH 1/9] eglibc-2.16: Remove build dependency on libgcc_s and libgcc_eh Khem Raj
                   ` (9 more replies)
  0 siblings, 10 replies; 21+ messages in thread
From: Khem Raj @ 2012-08-21  3:07 UTC (permalink / raw)
  To: openembedded-core

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

-- 
1.7.9.5




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 1/9] eglibc-2.16: Remove build dependency on libgcc_s and libgcc_eh
  2012-08-21  3:07 [PATCH 0/9] Rework cross toolchain bootstrap Khem Raj
@ 2012-08-21  3:07 ` Khem Raj
  2012-08-21  3:07 ` [PATCH 2/9] eglibc-2.16: Update to top of 2.16 branch Khem Raj
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 21+ messages in thread
From: Khem Raj @ 2012-08-21  3:07 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../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

diff --git a/meta/recipes-core/eglibc/eglibc-2.16/0001-Add-ARM-specific-static-stubs.c.patch b/meta/recipes-core/eglibc/eglibc-2.16/0001-Add-ARM-specific-static-stubs.c.patch
new file mode 100644
index 0000000..7186f89
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.16/0001-Add-ARM-specific-static-stubs.c.patch
@@ -0,0 +1,27 @@
+Upstream-Status: Backport
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+From c57a67e03368687fc0d2ae8354cd1b347a61ea44 Mon Sep 17 00:00:00 2001
+From: Joseph Myers <joseph@codesourcery.com>
+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>
diff --git a/meta/recipes-core/eglibc/eglibc-2.16/0001-Avoid-use-of-libgcc_s-and-libgcc_eh-when-building-gl.patch b/meta/recipes-core/eglibc/eglibc-2.16/0001-Avoid-use-of-libgcc_s-and-libgcc_eh-when-building-gl.patch
new file mode 100644
index 0000000..dc35b9b
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.16/0001-Avoid-use-of-libgcc_s-and-libgcc_eh-when-building-gl.patch
@@ -0,0 +1,343 @@
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+From 95f5a9a866695da4e038aa4e6ccbbfd5d9cf63b7 Mon Sep 17 00:00:00 2001
+From: Joseph Myers <joseph@codesourcery.com>
+Date: Tue, 3 Jul 2012 19:14:59 +0000
+Subject: [PATCH] Avoid use of libgcc_s and libgcc_eh when building glibc.
+
+---
+ ChangeLog                  |   47 ++++++++++++++++++++++++++++++
+ Makeconfig                 |   68 ++++++++++++++++++++++++++++++++++++++------
+ Rules                      |   45 ++++++++++++++++++++++-------
+ elf/Makefile               |    6 +++-
+ elf/static-stubs.c         |   46 ++++++++++++++++++++++++++++++
+ ports/ChangeLog.arm        |    7 +++++
+ ports/sysdeps/arm/Makefile |    8 ++++++
+ 7 files changed, 206 insertions(+), 21 deletions(-)
+ create mode 100644 elf/static-stubs.c
+
+Index: libc/Makeconfig
+===================================================================
+--- libc.orig/Makeconfig	2012-07-04 18:26:22.000000000 -0700
++++ libc/Makeconfig	2012-08-14 20:16:10.197093639 -0700
+@@ -415,9 +415,9 @@
+ LDFLAGS-rtld += $(hashstyle-LDFLAGS)
+ endif
+ 
+-# Command for linking programs with the C library.
++# Commands for linking programs with the C library.
+ ifndef +link
+-+link = $(CC) -nostdlib -nostartfiles -o $@ \
+++link-before-libc = $(CC) -nostdlib -nostartfiles -o $@ \
+ 	      $(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
+ 	      $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
+ 	      $(addprefix $(csu-objpfx),$(start-installed-name)) \
+@@ -426,7 +426,10 @@
+ 						     $(start-installed-name))\
+ 			   $(+preinit) $(link-extra-libs) \
+ 			   $(common-objpfx)libc% $(+postinit),$^) \
+-	      $(link-extra-libs) $(link-libc) $(+postctor) $(+postinit)
++	      $(link-extra-libs)
+++link-after-libc = $(+postctor) $(+postinit)
+++link = $(+link-before-libc) $(link-libc) $(+link-after-libc)
+++link-tests = $(+link-before-libc) $(link-libc-tests) $(+link-after-libc)
+ endif
+ # Command for linking PIE programs with the C library.
+ ifndef +link-pie
+@@ -443,7 +446,7 @@
+ endif
+ # Command for statically linking programs with the C library.
+ ifndef +link-static
+-+link-static = $(CC) -nostdlib -nostartfiles -static -o $@ \
+++link-static-before-libc = $(CC) -nostdlib -nostartfiles -static -o $@ \
+ 	      $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F))  \
+ 	      $(addprefix $(csu-objpfx),$(static-start-installed-name)) \
+ 	      $(+preinit) $(+prector) \
+@@ -451,7 +454,12 @@
+ 						     $(start-installed-name))\
+ 			   $(+preinit) $(link-extra-libs-static) \
+ 			   $(common-objpfx)libc% $(+postinit),$^) \
+-	      $(link-extra-libs-static) $(link-libc-static) $(+postctor) $(+postinit)
++	      $(link-extra-libs-static) $(link-libc-static)
+++link-static-after-libc = $(+postctor) $(+postinit)
+++link-static = $(+link-static-before-libc) $(link-libc-static) \
++	       $(+link-static-after-libc)
+++link-static-tests = $(+link-static-before-libc) $(link-libc-static-tests) \
++		     $(+link-static-after-libc)
+ endif
+ # Command for statically linking bounded-pointer programs with the C library.
+ ifndef +link-bounded
+@@ -475,10 +483,12 @@
+ # We need the versioned name of libc.so in the deps of $(others) et al
+ # so that the symlink to libc.so is created before anything tries to
+ # run the linked programs.
+-link-libc = -Wl,-rpath-link=$(rpath-link) \
++link-libc-before-gnulib = -Wl,-rpath-link=$(rpath-link) \
+ 	    $(common-objpfx)libc.so$(libc.so-version) \
+ 	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) \
+-	    $(as-needed) $(common-objpfx)elf/ld.so $(no-as-needed) $(gnulib)
++	    $(as-needed) $(common-objpfx)elf/ld.so $(no-as-needed)
++link-libc = $(link-libc-before-gnulib) $(gnulib)
++link-libc-tests = $(link-libc-before-gnulib) $(gnulib-tests)
+ # This is how to find at build-time things that will be installed there.
+ rpath-dirs = math elf dlfcn nss nis rt resolv crypt
+ rpath-link = \
+@@ -488,6 +498,7 @@
+ nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
+ resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
+ link-libc = $(common-objpfx)libc.a $(otherlibs) $(gnulib) $(common-objpfx)libc.a $(gnulib)
++link-libc-tests = $(common-objpfx)libc.a $(otherlibs) $(gnulib-tests) $(common-objpfx)libc.a $(gnulib-tests)
+ endif
+ endif
+ 
+@@ -513,8 +524,43 @@
+ 
+ # The static libraries.
+ link-libc-static = -Wl,--start-group $(common-objpfx)libc.a $(static-gnulib) -Wl,--end-group
++link-libc-static-tests = -Wl,--start-group $(common-objpfx)libc.a $(static-gnulib-tests) -Wl,--end-group
+ link-libc-bounded = $(common-objpfx)libc_b.a $(gnulib) $(common-objpfx)libc_b.a
+ 
++# How to link against libgcc.  Some libgcc functions, such as those
++# for "long long" arithmetic or software floating point, can always be
++# built without use of C library headers and do not have any global
++# state so can safely be linked statically into any executable or
++# shared library requiring them; these functions are in libgcc.a.
++# Other functions, relating to exception handling, may require C
++# library headers to build and it may not be safe to have more than
++# one copy of them in a process; these functions are only in
++# libgcc_s.so and libgcc_eh.a.
++#
++# To avoid circular dependencies when bootstrapping, it is desirable
++# to avoid use of libgcc_s and libgcc_eh in building glibc.  Where any
++# glibc functionality (in particular, thread cancellation) requires
++# exception handling, this is implemented through dlopen of libgcc_s
++# to avoid unnecessary dependencies on libgcc_s by programs not using
++# that functionality; executables built with glibc do not use
++# exception handling other than through thread cancellation.
++#
++# Undefined references to functions from libgcc_eh or libgcc_s may
++# arise for code built with -fexceptions.  In the case of statically
++# linked programs installed by glibc, unwinding will never actually
++# occur at runtime and the use of elf/static-stubs.c to resolve these
++# references is safe.  In the case of statically linked test programs
++# and test programs built with -fexceptions, unwinding may occur in
++# some cases and it is preferable to link with libgcc_eh or libgcc_s
++# so that the testing is as similar as possible to how programs will
++# be built with the installed glibc.
++#
++# Some architectures have architecture-specific systems for exception
++# handling that may involve undefined references to
++# architecture-specific functions.  On those architectures,
++# gnulib-arch and static-gnulib-arch may be defined in sysdeps
++# makefiles to use additional libraries for linking executables and
++# shared libraries built by glibc.
+ ifndef gnulib
+ ifneq ($(have-cc-with-libunwind),yes)
+   libunwind =
+@@ -522,8 +568,12 @@
+   libunwind = -lunwind
+ endif
+ libgcc_eh := -Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed
+-gnulib := -lgcc $(libgcc_eh)
+-static-gnulib := -lgcc -lgcc_eh $(libunwind)
++gnulib-arch =
++gnulib = -lgcc $(gnulib-arch)
++gnulib-tests := -lgcc $(libgcc_eh)
++static-gnulib-arch =
++static-gnulib = -lgcc $(static-gnulib-arch)
++static-gnulib-tests := -lgcc -lgcc_eh $(libunwind)
+ libc.so-gnulib := -lgcc
+ endif
+ +preinit = $(addprefix $(csu-objpfx),crti.o)
+Index: libc/Rules
+===================================================================
+--- libc.orig/Rules	2012-07-04 18:25:47.000000000 -0700
++++ libc/Rules	2012-08-14 20:16:10.197093639 -0700
+@@ -1,5 +1,4 @@
+-# Copyright (C) 1991-2000,2002,2003,2004,2005,2006,2011
+-#	Free Software Foundation, Inc.
++# Copyright (C) 1991-2012 Free Software Foundation, Inc.
+ # This file is part of the GNU C Library.
+ 
+ # The GNU C Library is free software; you can redistribute it and/or
+@@ -103,29 +102,46 @@
+ # eglibc: endif
+ 
+ ifeq ($(build-programs),yes)
+-binaries-all = $(others) $(sysdep-others) $(tests) $(xtests) $(test-srcs)
+-binaries-static = $(others-static) $(tests-static) $(xtests-static)
++binaries-all-notests = $(others) $(sysdep-others)
++binaries-all-tests = $(tests) $(xtests) $(test-srcs)
++binaries-all = $(binaries-all-notests) $(binaries-all-tests)
++binaries-static-notests = $(others-static)
++binaries-static-tests = $(tests-static) $(xtests-static)
++binaries-static = $(binaries-static-notests) $(binaries-static-tests)
+ ifeq (yesyes,$(have-fpie)$(build-shared))
+ binaries-pie = $(others-pie) $(tests-pie) $(xtests-pie)
+ else
+ binaries-pie =
+ endif
+ else
+-binaries-all = $(tests) $(xtests) $(test-srcs)
++binaries-all-notests =
++binaries-all-tests = $(tests) $(xtests) $(test-srcs)
++binaries-all = $(binaries-all-tests)
++binaries-static-notests =
++binaries-static-tests =
+ binaries-static =
+ binaries-pie =
+ endif
+ 
+-binaries-shared = $(filter-out $(binaries-pie) $(binaries-static), \
+-			       $(binaries-all))
++binaries-shared-tests = $(filter-out $(binaries-pie) $(binaries-static), \
++				     $(binaries-all-tests))
++binaries-shared-notests = $(filter-out $(binaries-pie) $(binaries-static), \
++				       $(binaries-all-notests))
+ 
+-ifneq "$(strip $(binaries-shared))" ""
+-$(addprefix $(objpfx),$(binaries-shared)): %: %.o \
++ifneq "$(strip $(binaries-shared-notests))" ""
++$(addprefix $(objpfx),$(binaries-shared-notests)): %: %.o \
+   $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
+   $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
+ 	$(+link)
+ endif
+ 
++ifneq "$(strip $(binaries-shared-tests))" ""
++$(addprefix $(objpfx),$(binaries-shared-tests)): %: %.o \
++  $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
++  $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
++	$(+link-tests)
++endif
++
+ ifneq "$(strip $(binaries-pie))" ""
+ $(addprefix $(objpfx),$(binaries-pie)): %: %.o \
+   $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
+@@ -133,13 +149,20 @@
+ 	$(+link-pie)
+ endif
+ 
+-ifneq "$(strip $(binaries-static))" ""
+-$(addprefix $(objpfx),$(binaries-static)): %: %.o \
++ifneq "$(strip $(binaries-static-notests))" ""
++$(addprefix $(objpfx),$(binaries-static-notests)): %: %.o \
+   $(sort $(filter $(common-objpfx)lib%,$(link-libc-static))) \
+   $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
+ 	$(+link-static)
+ endif
+ 
++ifneq "$(strip $(binaries-static-tests))" ""
++$(addprefix $(objpfx),$(binaries-static-tests)): %: %.o \
++  $(sort $(filter $(common-objpfx)lib%,$(link-libc-static-tests))) \
++  $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
++	$(+link-static-tests)
++endif
++
+ ifeq ($(build-bounded),yes)
+ binaries-bounded = $(addsuffix -bp,$(tests) $(xtests) $(test-srcs))
+ $(addprefix $(objpfx),$(binaries-bounded)): %-bp: %.ob \
+Index: libc/elf/Makefile
+===================================================================
+--- libc.orig/elf/Makefile	2012-07-04 18:26:34.000000000 -0700
++++ libc/elf/Makefile	2012-08-14 20:16:10.197093639 -0700
+@@ -71,6 +71,8 @@
+ install-bin	= sprof pldd
+ others-static   = sln
+ install-rootsbin = sln
++sln-modules	:= static-stubs
++extra-objs	+= $(sln-modules:=.o)
+ 
+ ifeq (yes,$(use-ldconfig))
+ ifeq (yes,$(build-shared))
+@@ -78,7 +80,7 @@
+ others		+= ldconfig
+ install-rootsbin += ldconfig
+ 
+-ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
++ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon static-stubs
+ extra-objs	+= $(ldconfig-modules:=.o)
+ endif
+ endif
+@@ -417,6 +419,8 @@
+ 
+ $(objpfx)sprof: $(libdl)
+ 
++$(objpfx)sln: $(sln-modules:%=$(objpfx)%.o)
++
+ $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
+ 
+ $(objpfx)pldd: $(pldd-modules:%=$(objpfx)%.o)
+Index: libc/elf/static-stubs.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ libc/elf/static-stubs.c	2012-08-14 20:16:10.197093639 -0700
+@@ -0,0 +1,46 @@
++/* Stub implementations of functions to link into statically linked
++   programs without needing libgcc_eh.
++   Copyright (C) 2012 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, see
++   <http://www.gnu.org/licenses/>.  */
++
++/* Avoid backtrace (and so _Unwind_Backtrace) dependencies from
++   sysdeps/unix/sysv/linux/libc_fatal.c.  */
++#include <sysdeps/posix/libc_fatal.c>
++
++#include <stdlib.h>
++#include <unwind.h>
++
++/* These programs do not use thread cancellation, so _Unwind_Resume
++   and the personality routine are never actually called.  */
++
++void
++_Unwind_Resume (struct _Unwind_Exception *exc __attribute__ ((unused)))
++{
++  abort ();
++}
++
++_Unwind_Reason_Code
++__gcc_personality_v0 (int version __attribute__ ((unused)),
++		      _Unwind_Action actions __attribute__ ((unused)),
++		      _Unwind_Exception_Class exception_class
++		      __attribute__ ((unused)),
++		      struct _Unwind_Exception *ue_header
++		      __attribute__ ((unused)),
++		      struct _Unwind_Context *context __attribute__ ((unused)))
++{
++  abort ();
++}
+Index: libc/ports/sysdeps/arm/Makefile
+===================================================================
+--- libc.orig/ports/sysdeps/arm/Makefile	2012-07-04 18:25:41.000000000 -0700
++++ libc/ports/sysdeps/arm/Makefile	2012-08-14 20:16:10.201093638 -0700
+@@ -1,8 +1,16 @@
++gnulib-arch = $(elfobjdir)/libgcc-stubs.a
++static-gnulib-arch = $(elfobjdir)/libgcc-stubs.a
++
+ ifeq ($(subdir),elf)
+ sysdep-dl-routines += tlsdesc dl-tlsdesc
+ sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx tlsdesc dl-tlsdesc
+ sysdep-rtld-routines += aeabi_unwind_cpp_pr1 tlsdesc dl-tlsdesc
+ shared-only-routines += aeabi_unwind_cpp_pr1
++
++$(objpfx)libgcc-stubs.a: $(objpfx)aeabi_unwind_cpp_pr1.os
++	$(build-extra-lib)
++
++lib-noranlib: $(objpfx)libgcc-stubs.a
+ endif
+ 
+ ifeq ($(subdir),csu)
diff --git a/meta/recipes-core/eglibc/eglibc_2.16.bb b/meta/recipes-core/eglibc/eglibc_2.16.bb
index b053a5b..3b48674 100644
--- a/meta/recipes-core/eglibc/eglibc_2.16.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.16.bb
@@ -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 \
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 2/9] eglibc-2.16: Update to top of 2.16 branch
  2012-08-21  3:07 [PATCH 0/9] Rework cross toolchain bootstrap Khem Raj
  2012-08-21  3:07 ` [PATCH 1/9] eglibc-2.16: Remove build dependency on libgcc_s and libgcc_eh Khem Raj
@ 2012-08-21  3:07 ` Khem Raj
  2012-08-21  3:07 ` [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage Khem Raj
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 21+ messages in thread
From: Khem Raj @ 2012-08-21  3:07 UTC (permalink / raw)
  To: openembedded-core

Some translations and tst-gettext fixes

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-core/eglibc/eglibc_2.16.bb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/eglibc/eglibc_2.16.bb b/meta/recipes-core/eglibc/eglibc_2.16.bb
index 3b48674..69803f7 100644
--- a/meta/recipes-core/eglibc/eglibc_2.16.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.16.bb
@@ -1,6 +1,6 @@
 require eglibc.inc
 
-SRCREV = "19383"
+SRCREV = "19922"
 
 DEPENDS += "gperf-native"
 PR = "r6"
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
  2012-08-21  3:07 [PATCH 0/9] Rework cross toolchain bootstrap Khem Raj
  2012-08-21  3:07 ` [PATCH 1/9] eglibc-2.16: Remove build dependency on libgcc_s and libgcc_eh Khem Raj
  2012-08-21  3:07 ` [PATCH 2/9] eglibc-2.16: Update to top of 2.16 branch Khem Raj
@ 2012-08-21  3:07 ` Khem Raj
  2012-08-24 21:08   ` Elvis Dowson
  2012-08-21  3:07 ` [PATCH 4/9] eglibc: Fix eglibc-initial and let eglibc depend on it Khem Raj
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 21+ messages in thread
From: Khem Raj @ 2012-08-21  3:07 UTC (permalink / raw)
  To: openembedded-core

Now 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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 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

diff --git a/meta/recipes-devtools/gcc/gcc-4.7.inc b/meta/recipes-devtools/gcc/gcc-4.7.inc
index 4ad4819..3f13385 100644
--- a/meta/recipes-devtools/gcc/gcc-4.7.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.7.inc
@@ -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 \
diff --git a/meta/recipes-devtools/gcc/gcc-4.7/arm-nolibfloat.patch b/meta/recipes-devtools/gcc/gcc-4.7/arm-nolibfloat.patch
deleted file mode 100644
index 901f014..0000000
--- a/meta/recipes-devtools/gcc/gcc-4.7/arm-nolibfloat.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Upstream-Status: Pending
-
-# Dimitry Andric <dimitry@andric.com>, 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.
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
index 543a94a..be47f85 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
@@ -19,12 +19,11 @@ EXTRA_OECONF = "--with-newlib \
                 ${OPTSPACE} \
 		--program-prefix=${TARGET_PREFIX} \
 		--with-sysroot=${STAGING_DIR_TARGET} \
-		--with-build-sysroot=${GCCCROSS_BUILDSYSROOT} \
+		--with-build-sysroot=${STAGING_DIR_TARGET} \
 		${EXTRA_OECONF_INITIAL} \
 		${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--with-ld=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}ld.bfd', '', d)} \
 		${EXTRA_OECONF_FPU}"
 
-
 GCCCROSS_BUILDSYSROOT = "${B}/tmpsysroot"
 
 do_configure_prepend () {
@@ -39,13 +38,42 @@ do_configure_prepend () {
 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_append () {
-    cp gcc/include-fixed/limits.h ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed/limits.h
+do_install () {
+	oe_runmake 'DESTDIR=${D}' install-gcc install-target-libgcc
+
+	# 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
+	# 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
+	cp gcc/include-fixed/limits.h ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed/limits.h
+}
+#
+# 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
 }
+
+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}"
+
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 4/9] eglibc: Fix eglibc-initial and let eglibc depend on it
  2012-08-21  3:07 [PATCH 0/9] Rework cross toolchain bootstrap Khem Raj
                   ` (2 preceding siblings ...)
  2012-08-21  3:07 ` [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage Khem Raj
@ 2012-08-21  3:07 ` Khem Raj
  2012-08-21  3:07 ` [PATCH 5/9] uclibc.inc, uclibc-config.inc: Untabify python snippets Khem Raj
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 21+ messages in thread
From: Khem Raj @ 2012-08-21  3:07 UTC (permalink / raw)
  To: openembedded-core

eglibc-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.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 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(-)

diff --git a/meta/recipes-core/eglibc/eglibc-initial.inc b/meta/recipes-core/eglibc/eglibc-initial.inc
index 1020e40..3b99ac2 100644
--- a/meta/recipes-core/eglibc/eglibc-initial.inc
+++ b/meta/recipes-core/eglibc/eglibc-initial.inc
@@ -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() {
diff --git a/meta/recipes-core/eglibc/eglibc-testing.inc b/meta/recipes-core/eglibc/eglibc-testing.inc
index a5ce773..ab3ec15 100644
--- a/meta/recipes-core/eglibc/eglibc-testing.inc
+++ b/meta/recipes-core/eglibc/eglibc-testing.inc
@@ -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
diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
index 51061bc..02f3c7a 100644
--- a/meta/recipes-core/eglibc/eglibc.inc
+++ b/meta/recipes-core/eglibc/eglibc.inc
@@ -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"
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 5/9] uclibc.inc, uclibc-config.inc: Untabify python snippets
  2012-08-21  3:07 [PATCH 0/9] Rework cross toolchain bootstrap Khem Raj
                   ` (3 preceding siblings ...)
  2012-08-21  3:07 ` [PATCH 4/9] eglibc: Fix eglibc-initial and let eglibc depend on it Khem Raj
@ 2012-08-21  3:07 ` Khem Raj
  2012-08-21  3:07 ` [PATCH 6/9] uclibc: Use gcc-cross-initial as staging compiler Khem Raj
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 21+ messages in thread
From: Khem Raj @ 2012-08-21  3:07 UTC (permalink / raw)
  To: openembedded-core

To appease bitbake

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-core/uclibc/uclibc-config.inc |  128 +++++++++++++++-------------
 meta/recipes-core/uclibc/uclibc.inc        |   28 +++---
 2 files changed, 85 insertions(+), 71 deletions(-)

diff --git a/meta/recipes-core/uclibc/uclibc-config.inc b/meta/recipes-core/uclibc/uclibc-config.inc
index 265626c..fd36fa5 100644
--- a/meta/recipes-core/uclibc/uclibc-config.inc
+++ b/meta/recipes-core/uclibc/uclibc-config.inc
@@ -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
diff --git a/meta/recipes-core/uclibc/uclibc.inc b/meta/recipes-core/uclibc/uclibc.inc
index 863bf3a..6c98090 100644
--- a/meta/recipes-core/uclibc/uclibc.inc
+++ b/meta/recipes-core/uclibc/uclibc.inc
@@ -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() {
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 6/9] uclibc: Use gcc-cross-initial as staging compiler
  2012-08-21  3:07 [PATCH 0/9] Rework cross toolchain bootstrap Khem Raj
                   ` (4 preceding siblings ...)
  2012-08-21  3:07 ` [PATCH 5/9] uclibc.inc, uclibc-config.inc: Untabify python snippets Khem Raj
@ 2012-08-21  3:07 ` Khem Raj
  2012-08-21  3:07 ` [PATCH 7/9] gcc-crosssdk-initial_4.7.bb: Add --with-native-system-header-dir to EXTRA_OECONF Khem Raj
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 21+ messages in thread
From: Khem Raj @ 2012-08-21  3:07 UTC (permalink / raw)
  To: openembedded-core

Do 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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 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(-)

diff --git a/meta/recipes-core/uclibc/uclibc-initial_0.9.33.bb b/meta/recipes-core/uclibc/uclibc-initial_0.9.33.bb
index 51afab2..211d530 100644
--- a/meta/recipes-core/uclibc/uclibc-initial_0.9.33.bb
+++ b/meta/recipes-core/uclibc/uclibc-initial_0.9.33.bb
@@ -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() {
 	:
diff --git a/meta/recipes-core/uclibc/uclibc-initial_git.bb b/meta/recipes-core/uclibc/uclibc-initial_git.bb
index 2226d25..6fd7529 100644
--- a/meta/recipes-core/uclibc/uclibc-initial_git.bb
+++ b/meta/recipes-core/uclibc/uclibc-initial_git.bb
@@ -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() {
 	:
diff --git a/meta/recipes-core/uclibc/uclibc_0.9.33.bb b/meta/recipes-core/uclibc/uclibc_0.9.33.bb
index c863896..8deedd3 100644
--- a/meta/recipes-core/uclibc/uclibc_0.9.33.bb
+++ b/meta/recipes-core/uclibc/uclibc_0.9.33.bb
@@ -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"
diff --git a/meta/recipes-core/uclibc/uclibc_git.bb b/meta/recipes-core/uclibc/uclibc_git.bb
index 4e5b830..2a60947 100644
--- a/meta/recipes-core/uclibc/uclibc_git.bb
+++ b/meta/recipes-core/uclibc/uclibc_git.bb
@@ -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"
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 7/9] gcc-crosssdk-initial_4.7.bb: Add --with-native-system-header-dir to EXTRA_OECONF
  2012-08-21  3:07 [PATCH 0/9] Rework cross toolchain bootstrap Khem Raj
                   ` (5 preceding siblings ...)
  2012-08-21  3:07 ` [PATCH 6/9] uclibc: Use gcc-cross-initial as staging compiler Khem Raj
@ 2012-08-21  3:07 ` Khem Raj
  2012-08-21  3:07 ` [PATCH 8/9] gcc-cross-intermediate, gcc-crosssdk-intermediate: Remove Khem Raj
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 21+ messages in thread
From: Khem Raj @ 2012-08-21  3:07 UTC (permalink / raw)
  To: openembedded-core

gcc-crosssdk-intermediate will go away and -initial will
assume its responsibility therefore transfer the option

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../gcc/gcc-crosssdk-initial_4.7.bb                |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.7.bb b/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.7.bb
index a499883..39c90ca 100644
--- a/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.7.bb
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.7.bb
@@ -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} "
+
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 8/9] gcc-cross-intermediate, gcc-crosssdk-intermediate: Remove
  2012-08-21  3:07 [PATCH 0/9] Rework cross toolchain bootstrap Khem Raj
                   ` (6 preceding siblings ...)
  2012-08-21  3:07 ` [PATCH 7/9] gcc-crosssdk-initial_4.7.bb: Add --with-native-system-header-dir to EXTRA_OECONF Khem Raj
@ 2012-08-21  3:07 ` Khem Raj
  2012-08-21  3:07 ` [PATCH 9/9] gcc: Switch SRC_URI to use svn Khem Raj
  2012-08-21 15:51 ` [PATCH 0/9] Rework cross toolchain bootstrap Saul Wold
  9 siblings, 0 replies; 21+ messages in thread
From: Khem Raj @ 2012-08-21  3:07 UTC (permalink / raw)
  To: openembedded-core

These recipes arent used anymore so delete them

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../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

diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
deleted file mode 100644
index e06926d..0000000
--- a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
+++ /dev/null
@@ -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
-}
-
diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.7.bb b/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.7.bb
deleted file mode 100644
index 69ae7f7..0000000
--- a/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.7.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-cross_${PV}.bb
-require gcc-cross-intermediate.inc
-
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate.inc b/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate.inc
deleted file mode 100644
index ed5d5e8..0000000
--- a/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate.inc
+++ /dev/null
@@ -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"
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.7.bb b/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.7.bb
deleted file mode 100644
index eacbc9e..0000000
--- a/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.7.bb
+++ /dev/null
@@ -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} "
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 9/9] gcc: Switch SRC_URI to use svn
  2012-08-21  3:07 [PATCH 0/9] Rework cross toolchain bootstrap Khem Raj
                   ` (7 preceding siblings ...)
  2012-08-21  3:07 ` [PATCH 8/9] gcc-cross-intermediate, gcc-crosssdk-intermediate: Remove Khem Raj
@ 2012-08-21  3:07 ` Khem Raj
  2012-08-21 15:51 ` [PATCH 0/9] Rework cross toolchain bootstrap Saul Wold
  9 siblings, 0 replies; 21+ messages in thread
From: Khem Raj @ 2012-08-21  3:07 UTC (permalink / raw)
  To: openembedded-core

svn tar balls are 96M as compared to 1.3G git tars
its unnessary to suck in that much of data.

Fixes [YOCTO #2908]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/gcc/gcc-4.7.inc |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-4.7.inc b/meta/recipes-devtools/gcc/gcc-4.7.inc
index 3f13385..89e22cb 100644
--- a/meta/recipes-devtools/gcc/gcc-4.7.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.7.inc
@@ -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
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH 0/9] Rework cross toolchain bootstrap
  2012-08-21  3:07 [PATCH 0/9] Rework cross toolchain bootstrap Khem Raj
                   ` (8 preceding siblings ...)
  2012-08-21  3:07 ` [PATCH 9/9] gcc: Switch SRC_URI to use svn Khem Raj
@ 2012-08-21 15:51 ` Saul Wold
  9 siblings, 0 replies; 21+ messages in thread
From: Saul Wold @ 2012-08-21 15:51 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

On 08/20/2012 08:07 PM, Khem Raj wrote:
> 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
Merged the above set of 8 into OE-Core

Thanks
	Sau!

>    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
>



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
  2012-08-21  3:07 ` [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage Khem Raj
@ 2012-08-24 21:08   ` Elvis Dowson
  2012-08-24 21:10     ` Khem Raj
  0 siblings, 1 reply; 21+ messages in thread
From: Elvis Dowson @ 2012-08-24 21:08 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 5900 bytes --]

Hi Khem,

On Aug 21, 2012, at 7:07 AM, Khem Raj wrote:

> 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

[-- Attachment #2: Type: text/html, Size: 7780 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
  2012-08-24 21:08   ` Elvis Dowson
@ 2012-08-24 21:10     ` Khem Raj
  2012-08-24 21:20       ` Elvis Dowson
  0 siblings, 1 reply; 21+ messages in thread
From: Khem Raj @ 2012-08-24 21:10 UTC (permalink / raw)
  To: Elvis Dowson; +Cc: openembedded-core

On Fri, Aug 24, 2012 at 2:08 PM, Elvis Dowson <elvis.dowson@gmail.com> wrote:
>
> 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

> 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:



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
  2012-08-24 21:10     ` Khem Raj
@ 2012-08-24 21:20       ` Elvis Dowson
  2012-08-24 21:59         ` Khem Raj
  0 siblings, 1 reply; 21+ messages in thread
From: Elvis Dowson @ 2012-08-24 21:20 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core


On Aug 25, 2012, at 1:10 AM, Khem Raj wrote:

> On Fri, Aug 24, 2012 at 2:08 PM, Elvis Dowson <elvis.dowson@gmail.com> wrote:
>> 
>> 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


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
  2012-08-24 21:20       ` Elvis Dowson
@ 2012-08-24 21:59         ` Khem Raj
  2012-10-06  6:59           ` Elvis Dowson
  0 siblings, 1 reply; 21+ messages in thread
From: Khem Raj @ 2012-08-24 21:59 UTC (permalink / raw)
  To: Elvis Dowson; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 830 bytes --]

On Friday, August 24, 2012, Elvis Dowson <elvis.dowson@gmail.com> wrote:
>
> On Aug 25, 2012, at 1:10 AM, Khem Raj wrote:
>
>> On Fri, Aug 24, 2012 at 2:08 PM, Elvis Dowson <elvis.dowson@gmail.com>
wrote:
>>>
>>> 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?

Back port some patches I did for eglibc 2.16 and drop intermediate recipes
> Best regards,
>
> Elvis

[-- Attachment #2: Type: text/html, Size: 1098 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
  2012-08-24 21:59         ` Khem Raj
@ 2012-10-06  6:59           ` Elvis Dowson
  2012-10-06 15:41             ` Khem Raj
  0 siblings, 1 reply; 21+ messages in thread
From: Elvis Dowson @ 2012-10-06  6:59 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2014 bytes --]

Hi Khem,

On Aug 25, 2012, at 1:59 AM, Khem Raj wrote:

> On Friday, August 24, 2012, Elvis Dowson <elvis.dowson@gmail.com> wrote:
> >
> > On Aug 25, 2012, at 1:10 AM, Khem Raj wrote:
> >
> >> On Fri, Aug 24, 2012 at 2:08 PM, Elvis Dowson <elvis.dowson@gmail.com> wrote:
> >>>
> >>> 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?
> 
> 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



[-- Attachment #2: Type: text/html, Size: 2937 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
  2012-10-06  6:59           ` Elvis Dowson
@ 2012-10-06 15:41             ` Khem Raj
  2012-10-06 16:11               ` Elvis Dowson
  2012-10-09 13:48               ` Elvis Dowson
  0 siblings, 2 replies; 21+ messages in thread
From: Khem Raj @ 2012-10-06 15:41 UTC (permalink / raw)
  To: Elvis Dowson; +Cc: openembedded-core

On Fri, Oct 5, 2012 at 11:59 PM, Elvis Dowson <elvis.dowson@gmail.com> wrote:
>
> 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



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
  2012-10-06 15:41             ` Khem Raj
@ 2012-10-06 16:11               ` Elvis Dowson
  2012-10-09 13:48               ` Elvis Dowson
  1 sibling, 0 replies; 21+ messages in thread
From: Elvis Dowson @ 2012-10-06 16:11 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

Hi Khem,

On Oct 6, 2012, at 7:41 PM, Khem Raj wrote:

> On Fri, Oct 5, 2012 at 11:59 PM, Elvis Dowson <elvis.dowson@gmail.com> wrote:
>> 
>> 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


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
  2012-10-06 15:41             ` Khem Raj
  2012-10-06 16:11               ` Elvis Dowson
@ 2012-10-09 13:48               ` Elvis Dowson
  2012-10-09 17:37                 ` Elvis Dowson
  1 sibling, 1 reply; 21+ messages in thread
From: Elvis Dowson @ 2012-10-09 13:48 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1269 bytes --]

Hi Khem,

On Oct 6, 2012, at 7:41 PM, Khem Raj wrote:

> On Fri, Oct 5, 2012 at 11:59 PM, Elvis Dowson <elvis.dowson@gmail.com> wrote:
>> 
>> 

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?
>> 
> 
> 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

[-- Attachment #2: Type: text/html, Size: 2216 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
  2012-10-09 13:48               ` Elvis Dowson
@ 2012-10-09 17:37                 ` Elvis Dowson
  2012-10-09 18:12                   ` Khem Raj
  0 siblings, 1 reply; 21+ messages in thread
From: Elvis Dowson @ 2012-10-09 17:37 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

Hi Khem,

On Oct 9, 2012, at 5:48 PM, Elvis Dowson wrote:

> 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


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
  2012-10-09 17:37                 ` Elvis Dowson
@ 2012-10-09 18:12                   ` Khem Raj
  0 siblings, 0 replies; 21+ messages in thread
From: Khem Raj @ 2012-10-09 18:12 UTC (permalink / raw)
  To: Elvis Dowson; +Cc: openembedded-core


On Oct 9, 2012, at 10:37 AM, Elvis Dowson <elvis.dowson@gmail.com> wrote:

> Hi Khem,
> 
> On Oct 9, 2012, at 5:48 PM, Elvis Dowson wrote:
> 
>> 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

> Best regards,
> 
> Elvis Dowson




^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2012-10-09 18:25 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-21  3:07 [PATCH 0/9] Rework cross toolchain bootstrap Khem Raj
2012-08-21  3:07 ` [PATCH 1/9] eglibc-2.16: Remove build dependency on libgcc_s and libgcc_eh Khem Raj
2012-08-21  3:07 ` [PATCH 2/9] eglibc-2.16: Update to top of 2.16 branch Khem Raj
2012-08-21  3:07 ` [PATCH 3/9] gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage Khem Raj
2012-08-24 21:08   ` Elvis Dowson
2012-08-24 21:10     ` Khem Raj
2012-08-24 21:20       ` Elvis Dowson
2012-08-24 21:59         ` Khem Raj
2012-10-06  6:59           ` Elvis Dowson
2012-10-06 15:41             ` Khem Raj
2012-10-06 16:11               ` Elvis Dowson
2012-10-09 13:48               ` Elvis Dowson
2012-10-09 17:37                 ` Elvis Dowson
2012-10-09 18:12                   ` Khem Raj
2012-08-21  3:07 ` [PATCH 4/9] eglibc: Fix eglibc-initial and let eglibc depend on it Khem Raj
2012-08-21  3:07 ` [PATCH 5/9] uclibc.inc, uclibc-config.inc: Untabify python snippets Khem Raj
2012-08-21  3:07 ` [PATCH 6/9] uclibc: Use gcc-cross-initial as staging compiler Khem Raj
2012-08-21  3:07 ` [PATCH 7/9] gcc-crosssdk-initial_4.7.bb: Add --with-native-system-header-dir to EXTRA_OECONF Khem Raj
2012-08-21  3:07 ` [PATCH 8/9] gcc-cross-intermediate, gcc-crosssdk-intermediate: Remove Khem Raj
2012-08-21  3:07 ` [PATCH 9/9] gcc: Switch SRC_URI to use svn Khem Raj
2012-08-21 15:51 ` [PATCH 0/9] Rework cross toolchain bootstrap Saul Wold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.