diff options
3 files changed, 145 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.7.inc b/meta/recipes-devtools/gcc/gcc-4.7.inc index ab07862b36..7a731db860 100644 --- a/meta/recipes-devtools/gcc/gcc-4.7.inc +++ b/meta/recipes-devtools/gcc/gcc-4.7.inc | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | require gcc-common.inc | 1 | require gcc-common.inc |
| 2 | 2 | ||
| 3 | PR = "r12" | 3 | PR = "r13" |
| 4 | 4 | ||
| 5 | # Third digit in PV should be incremented after a minor release | 5 | # Third digit in PV should be incremented after a minor release |
| 6 | # happens from this branch on gcc e.g. currently its 4.7.1 | 6 | # happens from this branch on gcc e.g. currently its 4.7.1 |
| @@ -77,6 +77,8 @@ SRC_URI = "git://github.com/mirrors/gcc.git;branch=${BRANCH};protocol=git \ | |||
| 77 | file://libtool.patch \ | 77 | file://libtool.patch \ |
| 78 | file://gcc-armv4-pass-fix-v4bx-to-ld.patch \ | 78 | file://gcc-armv4-pass-fix-v4bx-to-ld.patch \ |
| 79 | file://ppc_no_crtsavres.patch \ | 79 | file://ppc_no_crtsavres.patch \ |
| 80 | file://0001-crtstuff.c-USE_PT_GNU_EH_FRAME-Define-for-systems-us.patch \ | ||
| 81 | file://0001-Makefile.in-vis_hide-gen-hide-list-Do-not-make-defin.patch \ | ||
| 80 | " | 82 | " |
| 81 | 83 | ||
| 82 | S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git" | 84 | S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git" |
diff --git a/meta/recipes-devtools/gcc/gcc-4.7/0001-Makefile.in-vis_hide-gen-hide-list-Do-not-make-defin.patch b/meta/recipes-devtools/gcc/gcc-4.7/0001-Makefile.in-vis_hide-gen-hide-list-Do-not-make-defin.patch new file mode 100644 index 0000000000..b6f8f94378 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.7/0001-Makefile.in-vis_hide-gen-hide-list-Do-not-make-defin.patch | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | From b78f422ee83d279a83c62491b252cfec5b94e92a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
| 3 | Date: Wed, 22 Aug 2012 08:36:23 +0000 | ||
| 4 | Subject: [PATCH] * Makefile.in (vis_hide, gen-hide-list): Do not make | ||
| 5 | definitions depend on --enable-shared. | ||
| 6 | ($(lib1asmfuncs-o)): Use %.vis files independent of | ||
| 7 | --enable-shared. * static-object.mk | ||
| 8 | ($(base)$(objext), $(base).vis) | ||
| 9 | ($(base)_s$(objext)): Use same rules for visibility | ||
| 10 | handling as in shared-object.mk. | ||
| 11 | |||
| 12 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190588 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
| 13 | --- | ||
| 14 | libgcc/ChangeLog | 10 ++++++++++ | ||
| 15 | libgcc/Makefile.in | 16 ++++------------ | ||
| 16 | libgcc/static-object.mk | 10 ++++++++-- | ||
| 17 | 3 files changed, 22 insertions(+), 14 deletions(-) | ||
| 18 | |||
| 19 | Upstream-Status: Backport | ||
| 20 | |||
| 21 | -Khem | ||
| 22 | 05-Sep-2012 | ||
| 23 | |||
| 24 | Index: gcc-4_7-branch/libgcc/Makefile.in | ||
| 25 | =================================================================== | ||
| 26 | --- gcc-4_7-branch.orig/libgcc/Makefile.in 2012-08-21 22:33:20.000000000 -0700 | ||
| 27 | +++ gcc-4_7-branch/libgcc/Makefile.in 2012-09-05 17:30:28.572998745 -0700 | ||
| 28 | @@ -362,6 +362,7 @@ | ||
| 29 | ifneq ($(LIBUNWIND),) | ||
| 30 | install-libunwind = install-libunwind | ||
| 31 | endif | ||
| 32 | +endif | ||
| 33 | |||
| 34 | # For -fvisibility=hidden. We need both a -fvisibility=hidden on | ||
| 35 | # the command line, and a #define to prevent libgcc2.h etc from | ||
| 36 | @@ -385,11 +386,8 @@ | ||
| 37 | gen-hide-list = echo > $@ | ||
| 38 | endif | ||
| 39 | |||
| 40 | -else | ||
| 41 | -# Not enable_shared. | ||
| 42 | +ifneq ($(enable_shared),yes) | ||
| 43 | iterator = $(srcdir)/empty.mk $(patsubst %,$(srcdir)/static-object.mk,$(iter-items)) | ||
| 44 | -vis_hide = | ||
| 45 | -gen-hide-list = echo > \$@ | ||
| 46 | endif | ||
| 47 | |||
| 48 | LIB2ADD += enable-execute-stack.c | ||
| 49 | @@ -438,7 +436,6 @@ | ||
| 50 | $(LIB2_DIVMOD_FUNCS)) | ||
| 51 | |||
| 52 | # Build "libgcc1" (assembly) components. | ||
| 53 | -ifeq ($(enable_shared),yes) | ||
| 54 | |||
| 55 | lib1asmfuncs-o = $(patsubst %,%$(objext),$(LIB1ASMFUNCS)) | ||
| 56 | $(lib1asmfuncs-o): %$(objext): $(srcdir)/config/$(LIB1ASMSRC) %.vis | ||
| 57 | @@ -450,14 +447,9 @@ | ||
| 58 | lib1asmfuncs-s-o = $(patsubst %,%_s$(objext),$(LIB1ASMFUNCS)) | ||
| 59 | $(lib1asmfuncs-s-o): %_s$(objext): $(srcdir)/config/$(LIB1ASMSRC) | ||
| 60 | $(gcc_s_compile) -DL$* -xassembler-with-cpp -c $< | ||
| 61 | -libgcc-s-objects += $(lib1asmfuncs-s-o) | ||
| 62 | - | ||
| 63 | -else | ||
| 64 | +ifeq ($(enable_shared),yes) | ||
| 65 | |||
| 66 | -lib1asmfuncs-o = $(patsubst %,%$(objext),$(LIB1ASMFUNCS)) | ||
| 67 | -$(lib1asmfuncs-o): %$(objext): $(srcdir)/config/$(LIB1ASMSRC) | ||
| 68 | - $(gcc_compile) -DL$* -xassembler-with-cpp -c $< | ||
| 69 | -libgcc-objects += $(lib1asmfuncs-o) | ||
| 70 | +libgcc-s-objects += $(lib1asmfuncs-s-o) | ||
| 71 | |||
| 72 | endif | ||
| 73 | |||
| 74 | Index: gcc-4_7-branch/libgcc/static-object.mk | ||
| 75 | =================================================================== | ||
| 76 | --- gcc-4_7-branch.orig/libgcc/static-object.mk 2012-08-21 22:33:20.000000000 -0700 | ||
| 77 | +++ gcc-4_7-branch/libgcc/static-object.mk 2012-09-05 17:30:28.572998745 -0700 | ||
| 78 | @@ -24,7 +24,13 @@ | ||
| 79 | endif | ||
| 80 | endif | ||
| 81 | |||
| 82 | -$(base)$(objext): $o | ||
| 83 | - $(gcc_compile) -c -xassembler-with-cpp $< | ||
| 84 | +$(base)$(objext): $o $(base).vis | ||
| 85 | + $(gcc_compile) -c -xassembler-with-cpp -include $*.vis $< | ||
| 86 | + | ||
| 87 | +$(base).vis: $(base)_s$(objext) | ||
| 88 | + $(gen-hide-list) | ||
| 89 | + | ||
| 90 | +$(base)_s$(objext): $o | ||
| 91 | + $(gcc_s_compile) -c -xassembler-with-cpp $< | ||
| 92 | |||
| 93 | endif | ||
diff --git a/meta/recipes-devtools/gcc/gcc-4.7/0001-crtstuff.c-USE_PT_GNU_EH_FRAME-Define-for-systems-us.patch b/meta/recipes-devtools/gcc/gcc-4.7/0001-crtstuff.c-USE_PT_GNU_EH_FRAME-Define-for-systems-us.patch new file mode 100644 index 0000000000..15034f7da2 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.7/0001-crtstuff.c-USE_PT_GNU_EH_FRAME-Define-for-systems-us.patch | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | From 935475158f45b9c55a54647543c0402b4b3043ae Mon Sep 17 00:00:00 2001 | ||
| 2 | From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
| 3 | Date: Sun, 19 Aug 2012 15:11:40 +0000 | ||
| 4 | Subject: [PATCH] * crtstuff.c (USE_PT_GNU_EH_FRAME): Define for | ||
| 5 | systems using glibc even if inhibit_libc. | ||
| 6 | |||
| 7 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190517 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
| 8 | --- | ||
| 9 | libgcc/ChangeLog | 5 +++++ | ||
| 10 | libgcc/crtstuff.c | 16 +++++++++++++++- | ||
| 11 | 2 files changed, 20 insertions(+), 1 deletion(-) | ||
| 12 | |||
| 13 | Upstream-Status: Backport | ||
| 14 | |||
| 15 | -Khem 05-Sep-2012 | ||
| 16 | Index: gcc-4_7-branch/libgcc/crtstuff.c | ||
| 17 | =================================================================== | ||
| 18 | --- gcc-4_7-branch.orig/libgcc/crtstuff.c 2012-08-21 22:33:20.000000000 -0700 | ||
| 19 | +++ gcc-4_7-branch/libgcc/crtstuff.c 2012-09-05 17:28:49.248994968 -0700 | ||
| 20 | @@ -1,7 +1,7 @@ | ||
| 21 | /* Specialized bits of code needed to support construction and | ||
| 22 | destruction of file-scope objects in C++ code. | ||
| 23 | Copyright (C) 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 | ||
| 24 | - 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 | ||
| 25 | + 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012 | ||
| 26 | Free Software Foundation, Inc. | ||
| 27 | Contributed by Ron Guilmette (rfg@monkeys.com). | ||
| 28 | |||
| 29 | @@ -113,6 +113,20 @@ | ||
| 30 | # define USE_PT_GNU_EH_FRAME | ||
| 31 | # endif | ||
| 32 | #endif | ||
| 33 | + | ||
| 34 | +#if defined(OBJECT_FORMAT_ELF) \ | ||
| 35 | + && !defined(OBJECT_FORMAT_FLAT) \ | ||
| 36 | + && defined(HAVE_LD_EH_FRAME_HDR) \ | ||
| 37 | + && !defined(CRTSTUFFT_O) \ | ||
| 38 | + && defined(inhibit_libc) \ | ||
| 39 | + && (defined(__GLIBC__) || defined(__gnu_linux__) || defined(__GNU__)) | ||
| 40 | +/* On systems using glibc, an inhibit_libc build of libgcc is only | ||
| 41 | + part of a bootstrap process. Build the same crt*.o as would be | ||
| 42 | + built with headers present, so that it is not necessary to build | ||
| 43 | + glibc more than once for the bootstrap to converge. */ | ||
| 44 | +# define USE_PT_GNU_EH_FRAME | ||
| 45 | +#endif | ||
| 46 | + | ||
| 47 | #if defined(EH_FRAME_SECTION_NAME) && !defined(USE_PT_GNU_EH_FRAME) | ||
| 48 | # define USE_EH_FRAME_REGISTRY | ||
| 49 | #endif | ||
