diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2012-10-17 18:38:02 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2012-12-05 16:50:48 +0100 |
commit | 31a1eec9d086be22a5f85fa8b5704701d2acd7d7 (patch) | |
tree | d201ff65b8dfbc2628cd239c9a4151d5b2972a20 /patches | |
parent | 51b7a5de6b5d88899e2defe090ba3924a1d78ea2 (diff) | |
download | OSELAS.Toolchain-31a1eec9d086be22a5f85fa8b5704701d2acd7d7.tar.gz OSELAS.Toolchain-31a1eec9d086be22a5f85fa8b5704701d2acd7d7.tar.xz |
gcc-4.7.2 patches
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/gcc-4.7.2/0100-no-host-includes.patch | 55 | ||||
-rw-r--r-- | patches/gcc-4.7.2/0101-fix-arith_adjacentmem-LDM-splitting-code.patch | 39 | ||||
-rw-r--r-- | patches/gcc-4.7.2/0200-also-match-uclibc-when-checking-host-os.patch | 49 | ||||
-rw-r--r-- | patches/gcc-4.7.2/0201-missing-execinfo.h.patch | 24 | ||||
-rw-r--r-- | patches/gcc-4.7.2/0202-c99-snprintf.patch | 24 | ||||
-rw-r--r-- | patches/gcc-4.7.2/0203-libmudflap-susv3-legacy.patch | 62 | ||||
-rw-r--r-- | patches/gcc-4.7.2/0300-gcc-trampolinewarn.patch | 46 | ||||
-rw-r--r-- | patches/gcc-4.7.2/0301-flatten-switch-stmt-into-if-else-chain-for-Os.patch | 83 | ||||
-rw-r--r-- | patches/gcc-4.7.2/0302-libiberty-pic.patch | 24 | ||||
-rw-r--r-- | patches/gcc-4.7.2/0303-libstdc-pic.patch | 58 | ||||
-rw-r--r-- | patches/gcc-4.7.2/0304-gcc-i386-use-pure64-CLFS-patch.patch | 45 | ||||
-rw-r--r-- | patches/gcc-4.7.2/series | 17 | ||||
l--------- | patches/gcc-linaro-4.7-2012.11 | 1 |
13 files changed, 527 insertions, 0 deletions
diff --git a/patches/gcc-4.7.2/0100-no-host-includes.patch b/patches/gcc-4.7.2/0100-no-host-includes.patch new file mode 100644 index 0000000..0d901a7 --- /dev/null +++ b/patches/gcc-4.7.2/0100-no-host-includes.patch @@ -0,0 +1,55 @@ +From: Marc Kleine-Budde <m.kleine-budde@pengutronix.de> +Date: Tue, 1 Nov 2011 18:25:06 +0100 +Subject: [PATCH] no host includes + +With this patch gcc bails out if you include a host include path into +the searchlist (-I). This patch is not intended for upstream and was +inspired by + +http://www.openembedded.org/repo/org.openembedded.dev/packages/gcc/gcc-4.1.1/zecke-no-host-includes.patch + +Signed-off-by: Marc Kleine-Budde <m.kleine-budde@pengutronix.de> +Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> +--- + gcc/incpath.c | 28 ++++++++++++++++++++++++++++ + 1 file changed, 28 insertions(+) + +diff --git a/gcc/incpath.c b/gcc/incpath.c +index 6693bf5..edddc73 100644 +--- a/gcc/incpath.c ++++ b/gcc/incpath.c +@@ -429,6 +429,34 @@ add_path (char *path, int chain, int cxx_aware, bool user_supplied_p) + p->construct = 0; + p->user_supplied_p = user_supplied_p; + ++#ifdef CROSS_COMPILE ++ /* A common error when cross compiling is including ++ host headers. This code below will try to fail fast ++ for cross compiling. Currently we consider /usr/include, ++ /opt/include and /sw/include as harmful. */ ++ { ++ unsigned int i; ++ const char *bad_path[] = { ++ "/usr/include", ++ "/usr/local/include", ++ "/sw/include", ++ "/opt/include", ++ }; ++ ++ for (i = 0; i < sizeof(bad_path)/sizeof(bad_path[0]); i++) { ++ if( strstr(p->name, bad_path[i]) == p->name ) { ++ fprintf(stderr,_("\n" ++ "CROSS COMPILE Badness: %s in INCLUDEPATH: %s\n" ++ "\n"), ++ ++ bad_path[i], p->name); ++ ++ exit (FATAL_EXIT_CODE); ++ } ++ } ++ } ++#endif ++ + add_cpp_dir_path (p, chain); + } + diff --git a/patches/gcc-4.7.2/0101-fix-arith_adjacentmem-LDM-splitting-code.patch b/patches/gcc-4.7.2/0101-fix-arith_adjacentmem-LDM-splitting-code.patch new file mode 100644 index 0000000..eae6d15 --- /dev/null +++ b/patches/gcc-4.7.2/0101-fix-arith_adjacentmem-LDM-splitting-code.patch @@ -0,0 +1,39 @@ +From: Robert Schwebel <r.schwebel@pengutronix.de> +Date: Tue, 1 Nov 2011 18:25:07 +0100 +Subject: [PATCH] fix arith_adjacentmem LDM splitting code + +This is http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39429 + +This is the patch fromt the gcc bugzilla. + +Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> +--- + gcc/config/arm/arm.md | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md +index b21d0d2..fa9f93d 100644 +--- a/gcc/config/arm/arm.md ++++ b/gcc/config/arm/arm.md +@@ -10471,6 +10471,21 @@ + else + { + /* Offset is out of range for a single add, so use two ldr. */ ++ ++ /* Swap the ldrs if the first ldr would clobber the shared base_reg. */ ++ if (REGNO (ldm[1]) == REGNO (base_reg)) ++ { ++ rtx tmp_reg; ++ HOST_WIDE_INT tmp_val; ++ ++ tmp_reg = ldm[1]; ++ ldm[1] = ldm[2]; ++ ldm[2] = tmp_reg; ++ tmp_val = val1; ++ val1 = val2; ++ val2 = tmp_val; ++ } ++ + ops[0] = ldm[1]; + ops[1] = base_reg; + ops[2] = GEN_INT (val1); diff --git a/patches/gcc-4.7.2/0200-also-match-uclibc-when-checking-host-os.patch b/patches/gcc-4.7.2/0200-also-match-uclibc-when-checking-host-os.patch new file mode 100644 index 0000000..df5e1cf --- /dev/null +++ b/patches/gcc-4.7.2/0200-also-match-uclibc-when-checking-host-os.patch @@ -0,0 +1,49 @@ +From: Robert Schwebel <r.schwebel@pengutronix.de> +Date: Tue, 1 Nov 2011 18:25:07 +0100 +Subject: [PATCH] also match uclibc when checking host os + +This patch was taken from uclibc. + +Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> +--- + contrib/regression/objs-gcc.sh | 4 ++++ + libjava/classpath/ltconfig | 4 ++-- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh +index 60b0497..6dc7ead 100755 +--- a/contrib/regression/objs-gcc.sh ++++ b/contrib/regression/objs-gcc.sh +@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ] + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 +diff --git a/libjava/classpath/ltconfig b/libjava/classpath/ltconfig +index 743d951..ae4ea60 100755 +--- a/libjava/classpath/ltconfig ++++ b/libjava/classpath/ltconfig +@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in +-linux-gnu*) ;; ++linux-gnu*|linux-uclibc*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac + +@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + version_type=linux + need_lib_prefix=no + need_version=no diff --git a/patches/gcc-4.7.2/0201-missing-execinfo.h.patch b/patches/gcc-4.7.2/0201-missing-execinfo.h.patch new file mode 100644 index 0000000..29c41f3 --- /dev/null +++ b/patches/gcc-4.7.2/0201-missing-execinfo.h.patch @@ -0,0 +1,24 @@ +From: Robert Schwebel <r.schwebel@pengutronix.de> +Date: Tue, 1 Nov 2011 18:25:07 +0100 +Subject: [PATCH] missing execinfo.h + +This patch was taken from uclibc. + +Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> +--- + boehm-gc/include/gc.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h +index c51e017..a7ba8dc 100644 +--- a/boehm-gc/include/gc.h ++++ b/boehm-gc/include/gc.h +@@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb)); + #if defined(__linux__) || defined(__GLIBC__) + # include <features.h> + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif diff --git a/patches/gcc-4.7.2/0202-c99-snprintf.patch b/patches/gcc-4.7.2/0202-c99-snprintf.patch new file mode 100644 index 0000000..2df3649 --- /dev/null +++ b/patches/gcc-4.7.2/0202-c99-snprintf.patch @@ -0,0 +1,24 @@ +From: Robert Schwebel <r.schwebel@pengutronix.de> +Date: Tue, 1 Nov 2011 18:25:07 +0100 +Subject: [PATCH] c99 snprintf + +This patch was taken from uclibc. + +Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> +--- + libstdc++-v3/include/c_global/cstdio | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libstdc++-v3/include/c_global/cstdio b/libstdc++-v3/include/c_global/cstdio +index e648475..a3b0ad1 100644 +--- a/libstdc++-v3/include/c_global/cstdio ++++ b/libstdc++-v3/include/c_global/cstdio +@@ -140,7 +140,7 @@ namespace std + using ::vsprintf; + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if _GLIBCXX_USE_C99 || defined __UCLIBC__ + + #undef snprintf + #undef vfscanf diff --git a/patches/gcc-4.7.2/0203-libmudflap-susv3-legacy.patch b/patches/gcc-4.7.2/0203-libmudflap-susv3-legacy.patch new file mode 100644 index 0000000..8171511 --- /dev/null +++ b/patches/gcc-4.7.2/0203-libmudflap-susv3-legacy.patch @@ -0,0 +1,62 @@ +From: Robert Schwebel <r.schwebel@pengutronix.de> +Date: Tue, 1 Nov 2011 18:25:07 +0100 +Subject: [PATCH] libmudflap susv3 legacy + +uclibc does not provide bzero, bcopy, index ... + +This patch was taken from uclibc. + +Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> +--- + libmudflap/mf-hooks2.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/libmudflap/mf-hooks2.c b/libmudflap/mf-hooks2.c +index c030e69..a5be804 100644 +--- a/libmudflap/mf-hooks2.c ++++ b/libmudflap/mf-hooks2.c +@@ -424,7 +424,7 @@ WRAPPER2(void, bzero, void *s, size_t n) + { + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region"); +- bzero (s, n); ++ memset (s, 0, n); + } + + +@@ -434,7 +434,7 @@ WRAPPER2(void, bcopy, const void *src, void *dest, size_t n) + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src"); + MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest"); +- bcopy (src, dest, n); ++ memmove (dest, src, n); + } + + +@@ -444,7 +444,7 @@ WRAPPER2(int, bcmp, const void *s1, const void *s2, size_t n) + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg"); + MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg"); +- return bcmp (s1, s2, n); ++ return n == 0 ? 0 : memcmp (s1, s2, n); + } + + +@@ -453,7 +453,7 @@ WRAPPER2(char *, index, const char *s, int c) + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region"); +- return index (s, c); ++ return strchr (s, c); + } + + +@@ -462,7 +462,7 @@ WRAPPER2(char *, rindex, const char *s, int c) + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region"); +- return rindex (s, c); ++ return strrchr (s, c); + } + + /* XXX: stpcpy, memccpy */ diff --git a/patches/gcc-4.7.2/0300-gcc-trampolinewarn.patch b/patches/gcc-4.7.2/0300-gcc-trampolinewarn.patch new file mode 100644 index 0000000..e141938 --- /dev/null +++ b/patches/gcc-4.7.2/0300-gcc-trampolinewarn.patch @@ -0,0 +1,46 @@ +From: "Kevin F. Quinn" <kevquinn@gentoo.org> +Date: Tue, 1 Nov 2011 18:25:08 +0100 +Subject: [PATCH] gcc trampolinewarn + +Taken from gentoo, original description: + +This trivial patch causes gcc to emit a warning whenever it generates a +trampoline. These are otherwise hard to locate. It is rigged to default +ON - to have it default to OFF remove the text 'Init(1)' from the +common.opt patch, leaving just 'Common Var(warn_trampolines)'. + +Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> +--- + gcc/builtins.c | 3 +++ + gcc/common.opt | 4 ++++ + 2 files changed, 7 insertions(+) + +diff --git a/gcc/builtins.c b/gcc/builtins.c +index 04980cc..fb3c837 100644 +--- a/gcc/builtins.c ++++ b/gcc/builtins.c +@@ -4535,6 +4535,9 @@ expand_builtin_va_copy (tree exp) + emit_block_move (dstb, srcb, size, BLOCK_OP_NORMAL); + } + ++ if (warn_trampolines) ++ warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)"); ++ + return const0_rtx; + } + +diff --git a/gcc/common.opt b/gcc/common.opt +index 033fbe0..2946022 100644 +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -646,6 +646,10 @@ Wtype-limits + Common Var(warn_type_limits) Init(-1) Warning + Warn if a comparison is always true or always false due to the limited range of the data type + ++Wtrampolines ++Common Var(warn_trampolines) Init(1) ++Warn whenever a trampoline is generated ++ + Wuninitialized + Common Var(warn_uninitialized) Init(-1) Warning + Warn about uninitialized automatic variables diff --git a/patches/gcc-4.7.2/0301-flatten-switch-stmt-into-if-else-chain-for-Os.patch b/patches/gcc-4.7.2/0301-flatten-switch-stmt-into-if-else-chain-for-Os.patch new file mode 100644 index 0000000..f496d86 --- /dev/null +++ b/patches/gcc-4.7.2/0301-flatten-switch-stmt-into-if-else-chain-for-Os.patch @@ -0,0 +1,83 @@ +From: Bernhard Reutner-Fischer <aldot@gcc.gnu.org> +Date: Tue, 1 Nov 2011 18:25:08 +0100 +Subject: [PATCH] flatten switch-stmt into if-else chain for -Os + +This is http://gcc.gnu.org/ml/gcc-patches/2007-04/msg00927.html + +Hi, + +The attached patch makes sure that we create smaller object code for +simple switch statements. We just make sure to flatten the switch +statement into an if-else chain, basically. + +This fixes a size-regression as compared to gcc-3.4, as can be seen +below. + +2007-04-15 Bernhard Fischer <..> + + * stmt.c (expand_case): Do not create a complex binary tree when + optimizing for size but rather use the simple ordered list. + (emit_case_nodes): do not emit jumps to the default_label when + optimizing for size. + +Not regtested so far. +Comments? + +Attached is the test switch.c mentioned below. + +$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do +gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done +$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do +gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done + +$ size switch-*.o + text data bss dec hex filename + 169 0 0 169 a9 switch-2.95.o + 115 0 0 115 73 switch-3.3.o + 103 0 0 103 67 switch-3.4.o + 124 0 0 124 7c switch-4.0.o + 124 0 0 124 7c switch-4.1.o + 124 0 0 124 7c switch-4.2.orig-HEAD.o + 95 0 0 95 5f switch-4.3-HEAD.o + 124 0 0 124 7c switch-4.3.orig-HEAD.o + 166 0 0 166 a6 switch-CHAIN-2.95.o + 111 0 0 111 6f switch-CHAIN-3.3.o + 95 0 0 95 5f switch-CHAIN-3.4.o + 95 0 0 95 5f switch-CHAIN-4.0.o + 95 0 0 95 5f switch-CHAIN-4.1.o + 95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o + 95 0 0 95 5f switch-CHAIN-4.3-HEAD.o + 95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o + +Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> +--- + gcc/stmt.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/gcc/stmt.c b/gcc/stmt.c +index 93d643a..7bf3c04 100644 +--- a/gcc/stmt.c ++++ b/gcc/stmt.c +@@ -2397,7 +2397,13 @@ expand_case (gimple stmt) + default code is emitted. */ + + use_cost_table = estimate_case_costs (case_list); +- balance_case_nodes (&case_list, NULL); ++ ++ /* When optimizing for size, we want a straight list to avoid ++ jumps as much as possible. This basically creates an if-else ++ chain. */ ++ ++ if (!optimize_size) ++ balance_case_nodes (&case_list, NULL); + emit_case_nodes (index, case_list, default_label, index_type); + if (default_label) + emit_jump (default_label); +@@ -2965,6 +2971,7 @@ emit_case_nodes (rtx index, case_node_ptr node, rtx default_label, + { + if (!node_has_low_bound (node, index_type)) + { ++ if (!optimize_size) /* don't jl to the .default_label. */ + emit_cmp_and_jump_insns (index, + convert_modes + (mode, imode, diff --git a/patches/gcc-4.7.2/0302-libiberty-pic.patch b/patches/gcc-4.7.2/0302-libiberty-pic.patch new file mode 100644 index 0000000..6ac495a --- /dev/null +++ b/patches/gcc-4.7.2/0302-libiberty-pic.patch @@ -0,0 +1,24 @@ +From: Marc Kleine-Budde <m.kleine-budde@pengutronix.de> +Date: Tue, 1 Nov 2011 18:25:08 +0100 +Subject: [PATCH] libiberty pic + +Taken from gentoo. + +Signed-off-by: Marc Kleine-Budde <m.kleine-budde@pengutronix.de> +Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> +--- + libiberty/Makefile.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in +index 5280bc1..d7b99dd 100644 +--- a/libiberty/Makefile.in ++++ b/libiberty/Makefile.in +@@ -248,6 +248,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) + $(AR) $(AR_FLAGS) $(TARGETLIB) \ + $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \ + $(RANLIB) $(TARGETLIB); \ ++ cp $(TARGETLIB) ../ ; \ + cd ..; \ + else true; fi + diff --git a/patches/gcc-4.7.2/0303-libstdc-pic.patch b/patches/gcc-4.7.2/0303-libstdc-pic.patch new file mode 100644 index 0000000..2166828 --- /dev/null +++ b/patches/gcc-4.7.2/0303-libstdc-pic.patch @@ -0,0 +1,58 @@ +From: Marc Kleine-Budde <m.kleine-budde@pengutronix.de> +Date: Tue, 1 Nov 2011 18:25:08 +0100 +Subject: [PATCH] libstdc++ pic + +Install libstdc++_pic.a if we have pic objs. Taken from gentoo. + +Signed-off-by: Marc Kleine-Budde <m.kleine-budde@pengutronix.de> +Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> +--- + libstdc++-v3/src/Makefile.am | 7 +++++++ + libstdc++-v3/src/Makefile.in | 9 ++++++++- + 2 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am +index a1eb04d..8fdb33e 100644 +--- a/libstdc++-v3/src/Makefile.am ++++ b/libstdc++-v3/src/Makefile.am +@@ -164,6 +164,13 @@ CXXLINK = \ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ + + ++install-exec-local: ++ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \ ++ if [ x"$$pic_objs" != x ]; then \ ++ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \ ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \ ++ fi ++ + # Symbol versioning for shared libraries. + if ENABLE_SYMVERS + libstdc++-symbols.ver: ${glibcxx_srcdir}/$(SYMVER_FILE) \ +diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in +index b10d853..871531d 100644 +--- a/libstdc++-v3/src/Makefile.in ++++ b/libstdc++-v3/src/Makefile.in +@@ -732,7 +732,7 @@ install-dvi: install-dvi-recursive + + install-dvi-am: + +-install-exec-am: install-toolexeclibLTLIBRARIES ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local + + install-html: install-html-recursive + +@@ -924,6 +924,13 @@ install-debug: build-debug + (cd ${debugdir} && $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' \ + toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) ; + ++install-exec-local: ++ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \ ++ if [ x"$$pic_objs" != x ]; then \ ++ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \ ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \ ++ fi ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/patches/gcc-4.7.2/0304-gcc-i386-use-pure64-CLFS-patch.patch b/patches/gcc-4.7.2/0304-gcc-i386-use-pure64-CLFS-patch.patch new file mode 100644 index 0000000..455593f --- /dev/null +++ b/patches/gcc-4.7.2/0304-gcc-i386-use-pure64-CLFS-patch.patch @@ -0,0 +1,45 @@ +From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= <andreas@biessmann.de> +Date: Thu, 9 Feb 2012 13:59:12 +0100 +Subject: [PATCH] gcc/i386: use pure64 CLFS patch +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This is a modified version of +http://trac.cross-lfs.org/browser/patches/gcc-4.6.0-pure64-1.patch to use /lib +instead of /lib64 for x86_64. +This will only work as generic patch, if we do _not_ build multilib x86 +toolchains. + +Signed-off-by: Andreas Bießmann <andreas@biessmann.de> +--- + gcc/config/i386/linux64.h | 4 ++-- + gcc/config/i386/t-linux64 | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h +index 5b0a212..e4d02cc 100644 +--- a/gcc/config/i386/linux64.h ++++ b/gcc/config/i386/linux64.h +@@ -28,6 +28,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define GNU_USER_LINK_EMULATION64 "elf_x86_64" + #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" + +-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" +-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" ++#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2" + #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" +diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64 +index b5d3985..03d8f32 100644 +--- a/gcc/config/i386/t-linux64 ++++ b/gcc/config/i386/t-linux64 +@@ -34,6 +34,6 @@ + comma=, + MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) + MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) +-MULTILIB_OSDIRNAMES = m64=../lib64 +-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) ++MULTILIB_OSDIRNAMES = m64=../lib ++MULTILIB_OSDIRNAMES+= m32=../lib32 + MULTILIB_OSDIRNAMES+= mx32=../libx32 diff --git a/patches/gcc-4.7.2/series b/patches/gcc-4.7.2/series new file mode 100644 index 0000000..949ab74 --- /dev/null +++ b/patches/gcc-4.7.2/series @@ -0,0 +1,17 @@ +# generated by git-ptx-patches +#tag:base +#tag:OSELAS.toolchain --start-number 100 +0100-no-host-includes.patch +0101-fix-arith_adjacentmem-LDM-splitting-code.patch +#tag:uclibc --start-number 200 +0200-also-match-uclibc-when-checking-host-os.patch +0201-missing-execinfo.h.patch +0202-c99-snprintf.patch +0203-libmudflap-susv3-legacy.patch +#tag:gentoo --start-number 300 +0300-gcc-trampolinewarn.patch +0301-flatten-switch-stmt-into-if-else-chain-for-Os.patch +0302-libiberty-pic.patch +0303-libstdc-pic.patch +0304-gcc-i386-use-pure64-CLFS-patch.patch +# bf752542478bf601b71e50608d1485e1 - git-ptx-patches magic diff --git a/patches/gcc-linaro-4.7-2012.11 b/patches/gcc-linaro-4.7-2012.11 new file mode 120000 index 0000000..ae89525 --- /dev/null +++ b/patches/gcc-linaro-4.7-2012.11 @@ -0,0 +1 @@ +gcc-4.7.2
\ No newline at end of file |