From 6092f6b5c5d73db38258e4d2b14c83df3a62d264 Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Wed, 10 Sep 2014 10:31:14 +0200 Subject: cross-gcc: update patches 4.8.2 -> 4.9.2 Signed-off-by: Michael Olbrich --- .../0100-Backport-fix-for-PR-target-58854.patch | 31 ----------- patches/gcc-4.8.2/0200-no-host-includes.patch | 55 ------------------- .../0201-gcc-i386-use-pure64-CLFS-patch.patch | 45 ---------------- ...libgcc-reorder-tmake_file-for-arm-uclinux.patch | 30 ----------- ...0-also-match-uclibc-when-checking-host-os.patch | 49 ----------------- patches/gcc-4.8.2/0301-missing-execinfo.h.patch | 24 --------- patches/gcc-4.8.2/0302-c99-snprintf.patch | 24 --------- .../gcc-4.8.2/0303-libmudflap-susv3-legacy.patch | 62 ---------------------- patches/gcc-4.8.2/0400-libiberty-pic.patch | 24 --------- patches/gcc-4.8.2/0401-libstdc-pic.patch | 58 -------------------- .../0500-Fix-Argument-list-too-long-error.patch | 37 ------------- patches/gcc-4.8.2/series | 19 ------- patches/gcc-4.9.2/0200-no-host-includes.patch | 55 +++++++++++++++++++ .../0201-gcc-i386-use-pure64-CLFS-patch.patch | 45 ++++++++++++++++ ...0-also-match-uclibc-when-checking-host-os.patch | 49 +++++++++++++++++ patches/gcc-4.9.2/0301-missing-execinfo.h.patch | 24 +++++++++ patches/gcc-4.9.2/0302-c99-snprintf.patch | 24 +++++++++ patches/gcc-4.9.2/0400-libiberty-pic.patch | 24 +++++++++ patches/gcc-4.9.2/0401-libstdc-pic.patch | 58 ++++++++++++++++++++ .../0500-Fix-Argument-list-too-long-error.patch | 37 +++++++++++++ patches/gcc-4.9.2/series | 16 ++++++ patches/gcc-linaro-4.8-2013.11 | 1 - 22 files changed, 332 insertions(+), 459 deletions(-) delete mode 100644 patches/gcc-4.8.2/0100-Backport-fix-for-PR-target-58854.patch delete mode 100644 patches/gcc-4.8.2/0200-no-host-includes.patch delete mode 100644 patches/gcc-4.8.2/0201-gcc-i386-use-pure64-CLFS-patch.patch delete mode 100644 patches/gcc-4.8.2/0202-libgcc-reorder-tmake_file-for-arm-uclinux.patch delete mode 100644 patches/gcc-4.8.2/0300-also-match-uclibc-when-checking-host-os.patch delete mode 100644 patches/gcc-4.8.2/0301-missing-execinfo.h.patch delete mode 100644 patches/gcc-4.8.2/0302-c99-snprintf.patch delete mode 100644 patches/gcc-4.8.2/0303-libmudflap-susv3-legacy.patch delete mode 100644 patches/gcc-4.8.2/0400-libiberty-pic.patch delete mode 100644 patches/gcc-4.8.2/0401-libstdc-pic.patch delete mode 100644 patches/gcc-4.8.2/0500-Fix-Argument-list-too-long-error.patch delete mode 100644 patches/gcc-4.8.2/series create mode 100644 patches/gcc-4.9.2/0200-no-host-includes.patch create mode 100644 patches/gcc-4.9.2/0201-gcc-i386-use-pure64-CLFS-patch.patch create mode 100644 patches/gcc-4.9.2/0300-also-match-uclibc-when-checking-host-os.patch create mode 100644 patches/gcc-4.9.2/0301-missing-execinfo.h.patch create mode 100644 patches/gcc-4.9.2/0302-c99-snprintf.patch create mode 100644 patches/gcc-4.9.2/0400-libiberty-pic.patch create mode 100644 patches/gcc-4.9.2/0401-libstdc-pic.patch create mode 100644 patches/gcc-4.9.2/0500-Fix-Argument-list-too-long-error.patch create mode 100644 patches/gcc-4.9.2/series delete mode 120000 patches/gcc-linaro-4.8-2013.11 diff --git a/patches/gcc-4.8.2/0100-Backport-fix-for-PR-target-58854.patch b/patches/gcc-4.8.2/0100-Backport-fix-for-PR-target-58854.patch deleted file mode 100644 index 2fa986c..0000000 --- a/patches/gcc-4.8.2/0100-Backport-fix-for-PR-target-58854.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: ramana -Date: Mon, 11 Nov 2013 09:38:14 +0000 -Subject: [PATCH] Backport fix for PR target/58854 - -2013-11-11 Ramana Radhakrishnan - - Backported from mainline - 2013-10-30 Ramana Radhakrishnan - - PR target/58854 - * config/arm/arm.c (arm_expand_epilogue_apcs_frame): Emit blockage - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch@204665 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - gcc/config/arm/arm.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c -index d787a6e..52871f1 100644 ---- a/gcc/config/arm/arm.c -+++ b/gcc/config/arm/arm.c -@@ -23555,6 +23555,7 @@ arm_expand_epilogue_apcs_frame (bool really_return) - num_regs = bit_count (saved_regs_mask); - if ((offsets->outgoing_args != (1 + num_regs)) || cfun->calls_alloca) - { -+ emit_insn (gen_blockage ()); - /* Unwind the stack to just below the saved registers. */ - emit_insn (gen_addsi3 (stack_pointer_rtx, - hard_frame_pointer_rtx, diff --git a/patches/gcc-4.8.2/0200-no-host-includes.patch b/patches/gcc-4.8.2/0200-no-host-includes.patch deleted file mode 100644 index 7764414..0000000 --- a/patches/gcc-4.8.2/0200-no-host-includes.patch +++ /dev/null @@ -1,55 +0,0 @@ -From: Marc Kleine-Budde -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 -Signed-off-by: Robert Schwebel ---- - gcc/incpath.c | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - -diff --git a/gcc/incpath.c b/gcc/incpath.c -index 018da98..d0442bd 100644 ---- a/gcc/incpath.c -+++ b/gcc/incpath.c -@@ -450,6 +450,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.8.2/0201-gcc-i386-use-pure64-CLFS-patch.patch b/patches/gcc-4.8.2/0201-gcc-i386-use-pure64-CLFS-patch.patch deleted file mode 100644 index a6cec86..0000000 --- a/patches/gcc-4.8.2/0201-gcc-i386-use-pure64-CLFS-patch.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= -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 ---- - 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 b793e08..da88da9 100644 ---- a/gcc/config/i386/linux64.h -+++ b/gcc/config/i386/linux64.h -@@ -27,6 +27,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 bcea0c6..3fbec37 100644 ---- a/gcc/config/i386/t-linux64 -+++ b/gcc/config/i386/t-linux64 -@@ -33,6 +33,6 @@ - comma=, - MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) - MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) --MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) --MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) -+MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu) -+MULTILIB_OSDIRNAMES+= m32=../lib32$(call if_multiarch,:i386-linux-gnu) - MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) diff --git a/patches/gcc-4.8.2/0202-libgcc-reorder-tmake_file-for-arm-uclinux.patch b/patches/gcc-4.8.2/0202-libgcc-reorder-tmake_file-for-arm-uclinux.patch deleted file mode 100644 index 98da02c..0000000 --- a/patches/gcc-4.8.2/0202-libgcc-reorder-tmake_file-for-arm-uclinux.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Michael Olbrich -Date: Wed, 5 Dec 2012 17:17:52 +0100 -Subject: [PATCH] libgcc: reorder $tmake_file for arm*-*-uclinux* - -arm/t-arm must be first in the list. It overwrites variables instead of -appending, so anything set before is lost. - -Signed-off-by: Michael Olbrich ---- - libgcc/config.host | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libgcc/config.host b/libgcc/config.host -index 259c9a7..8ce8396 100644 ---- a/libgcc/config.host -+++ b/libgcc/config.host -@@ -330,11 +330,11 @@ arm*-*-linux*) # ARM GNU/Linux with ELF - tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" - ;; - arm*-*-uclinux*) # ARM ucLinux -- tmake_file="${tmake_file} t-fixedpoint-gnu-prefix" -+ tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix" - tmake_file="${tmake_file} arm/t-bpabi" - tm_file="$tm_file arm/bpabi-lib.h" - unwind_header=config/arm/unwind-arm.h -- tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" -+ tmake_file="$tmake_file arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" - extra_parts="$extra_parts crti.o crtn.o" - ;; - arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*) diff --git a/patches/gcc-4.8.2/0300-also-match-uclibc-when-checking-host-os.patch b/patches/gcc-4.8.2/0300-also-match-uclibc-when-checking-host-os.patch deleted file mode 100644 index 0ec4d1d..0000000 --- a/patches/gcc-4.8.2/0300-also-match-uclibc-when-checking-host-os.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Robert Schwebel -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 ---- - 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.8.2/0301-missing-execinfo.h.patch b/patches/gcc-4.8.2/0301-missing-execinfo.h.patch deleted file mode 100644 index 1af399c..0000000 --- a/patches/gcc-4.8.2/0301-missing-execinfo.h.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Robert Schwebel -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 ---- - 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 - # 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.8.2/0302-c99-snprintf.patch b/patches/gcc-4.8.2/0302-c99-snprintf.patch deleted file mode 100644 index 891a394..0000000 --- a/patches/gcc-4.8.2/0302-c99-snprintf.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Robert Schwebel -Date: Tue, 1 Nov 2011 18:25:07 +0100 -Subject: [PATCH] c99 snprintf - -This patch was taken from uclibc. - -Signed-off-by: Robert Schwebel ---- - 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 fcbec0c..adb2bfb 100644 ---- a/libstdc++-v3/include/c_global/cstdio -+++ b/libstdc++-v3/include/c_global/cstdio -@@ -138,7 +138,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.8.2/0303-libmudflap-susv3-legacy.patch b/patches/gcc-4.8.2/0303-libmudflap-susv3-legacy.patch deleted file mode 100644 index 3b44263..0000000 --- a/patches/gcc-4.8.2/0303-libmudflap-susv3-legacy.patch +++ /dev/null @@ -1,62 +0,0 @@ -From: Robert Schwebel -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 ---- - 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 4af17df..a3c6b2f 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.8.2/0400-libiberty-pic.patch b/patches/gcc-4.8.2/0400-libiberty-pic.patch deleted file mode 100644 index 4f7a900..0000000 --- a/patches/gcc-4.8.2/0400-libiberty-pic.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Marc Kleine-Budde -Date: Tue, 1 Nov 2011 18:25:08 +0100 -Subject: [PATCH] libiberty pic - -Taken from gentoo. - -Signed-off-by: Marc Kleine-Budde -Signed-off-by: Robert Schwebel ---- - libiberty/Makefile.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in -index f6a3ebd..01ae1a7 100644 ---- a/libiberty/Makefile.in -+++ b/libiberty/Makefile.in -@@ -250,6 +250,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.8.2/0401-libstdc-pic.patch b/patches/gcc-4.8.2/0401-libstdc-pic.patch deleted file mode 100644 index 4b2a2fe..0000000 --- a/patches/gcc-4.8.2/0401-libstdc-pic.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: Marc Kleine-Budde -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 -Signed-off-by: Robert Schwebel ---- - 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 092fd1b..ff5988f 100644 ---- a/libstdc++-v3/src/Makefile.am -+++ b/libstdc++-v3/src/Makefile.am -@@ -182,6 +182,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 a7b3404..d8d93b9 100644 ---- a/libstdc++-v3/src/Makefile.in -+++ b/libstdc++-v3/src/Makefile.in -@@ -761,7 +761,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 - -@@ -950,6 +950,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.8.2/0500-Fix-Argument-list-too-long-error.patch b/patches/gcc-4.8.2/0500-Fix-Argument-list-too-long-error.patch deleted file mode 100644 index a534fde..0000000 --- a/patches/gcc-4.8.2/0500-Fix-Argument-list-too-long-error.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Robert Yang -Date: Wed, 5 Dec 2012 17:20:37 +0100 -Subject: [PATCH] Fix "Argument list too long" error - -There would be an "Argument list too long" error when the -build directory is longer than 200, this is caused by: - -headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u` - -The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle -it, use the $(sort list) of GNU make which can handle the too long list -would fix the problem, the header would be short enough after sorted. -The "tr ' ' '\012'" was used for translating the space to "\n", the -$(sort list) doesn't need this. - -Signed-off-by: Robert Yang - -This was taken from OE. - -Signed-off-by: Michael Olbrich ---- - gcc/Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gcc/Makefile.in b/gcc/Makefile.in -index aad927c..63aee76 100644 ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -4627,7 +4627,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype - # We keep the directory structure for files in config or c-family and .def - # files. All other files are flattened to a single directory. - $(mkinstalldirs) $(DESTDIR)$(plugin_includedir) -- headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`; \ -+ headers="$(sort $(PLUGIN_HEADERS))"; \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \ - for file in $$headers; do \ - if [ -f $$file ] ; then \ diff --git a/patches/gcc-4.8.2/series b/patches/gcc-4.8.2/series deleted file mode 100644 index e4f1274..0000000 --- a/patches/gcc-4.8.2/series +++ /dev/null @@ -1,19 +0,0 @@ -# generated by git-ptx-patches -#tag:base -#tag:Upstream --start-number 100 -0100-Backport-fix-for-PR-target-58854.patch -#tag:OSELAS.toolchain --start-number 200 -0200-no-host-includes.patch -0201-gcc-i386-use-pure64-CLFS-patch.patch -0202-libgcc-reorder-tmake_file-for-arm-uclinux.patch -#tag:uclibc --start-number 300 -0300-also-match-uclibc-when-checking-host-os.patch -0301-missing-execinfo.h.patch -0302-c99-snprintf.patch -0303-libmudflap-susv3-legacy.patch -#tag:gentoo --start-number 400 -0400-libiberty-pic.patch -0401-libstdc-pic.patch -#tag:OpenEmbedded --start-number 500 -0500-Fix-Argument-list-too-long-error.patch -# 770f638e8c16c7df912e1f26ec0a549a - git-ptx-patches magic diff --git a/patches/gcc-4.9.2/0200-no-host-includes.patch b/patches/gcc-4.9.2/0200-no-host-includes.patch new file mode 100644 index 0000000..91006f5 --- /dev/null +++ b/patches/gcc-4.9.2/0200-no-host-includes.patch @@ -0,0 +1,55 @@ +From: Marc Kleine-Budde +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 +Signed-off-by: Robert Schwebel +--- + gcc/incpath.c | 28 ++++++++++++++++++++++++++++ + 1 file changed, 28 insertions(+) + +diff --git a/gcc/incpath.c b/gcc/incpath.c +index f495c0a7fc0c..d3fb24a525c8 100644 +--- a/gcc/incpath.c ++++ b/gcc/incpath.c +@@ -450,6 +450,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.9.2/0201-gcc-i386-use-pure64-CLFS-patch.patch b/patches/gcc-4.9.2/0201-gcc-i386-use-pure64-CLFS-patch.patch new file mode 100644 index 0000000..8699d7c --- /dev/null +++ b/patches/gcc-4.9.2/0201-gcc-i386-use-pure64-CLFS-patch.patch @@ -0,0 +1,45 @@ +From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= +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 +--- + 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 a90171e8c540..24c7c9489421 100644 +--- a/gcc/config/i386/linux64.h ++++ b/gcc/config/i386/linux64.h +@@ -27,6 +27,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 5ec8907a9343..7b83beec7fd1 100644 +--- a/gcc/config/i386/t-linux64 ++++ b/gcc/config/i386/t-linux64 +@@ -33,6 +33,6 @@ + comma=, + MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) + MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) +-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) +-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) ++MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu) ++MULTILIB_OSDIRNAMES+= m32=../lib32$(call if_multiarch,:i386-linux-gnu) + MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) diff --git a/patches/gcc-4.9.2/0300-also-match-uclibc-when-checking-host-os.patch b/patches/gcc-4.9.2/0300-also-match-uclibc-when-checking-host-os.patch new file mode 100644 index 0000000..c18364b --- /dev/null +++ b/patches/gcc-4.9.2/0300-also-match-uclibc-when-checking-host-os.patch @@ -0,0 +1,49 @@ +From: Robert Schwebel +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 +--- + 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 60b0497fea24..6dc7eadff360 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 743d95135fb8..ae4ea6095cdd 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.9.2/0301-missing-execinfo.h.patch b/patches/gcc-4.9.2/0301-missing-execinfo.h.patch new file mode 100644 index 0000000..0bafc7c --- /dev/null +++ b/patches/gcc-4.9.2/0301-missing-execinfo.h.patch @@ -0,0 +1,24 @@ +From: Robert Schwebel +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 +--- + 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 c51e017d6748..a7ba8dca1a62 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 + # 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.9.2/0302-c99-snprintf.patch b/patches/gcc-4.9.2/0302-c99-snprintf.patch new file mode 100644 index 0000000..0258f31 --- /dev/null +++ b/patches/gcc-4.9.2/0302-c99-snprintf.patch @@ -0,0 +1,24 @@ +From: Robert Schwebel +Date: Tue, 1 Nov 2011 18:25:07 +0100 +Subject: [PATCH] c99 snprintf + +This patch was taken from uclibc. + +Signed-off-by: Robert Schwebel +--- + 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 6043b3de2bf3..54772bccc0c9 100644 +--- a/libstdc++-v3/include/c_global/cstdio ++++ b/libstdc++-v3/include/c_global/cstdio +@@ -146,7 +146,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.9.2/0400-libiberty-pic.patch b/patches/gcc-4.9.2/0400-libiberty-pic.patch new file mode 100644 index 0000000..872295e --- /dev/null +++ b/patches/gcc-4.9.2/0400-libiberty-pic.patch @@ -0,0 +1,24 @@ +From: Marc Kleine-Budde +Date: Tue, 1 Nov 2011 18:25:08 +0100 +Subject: [PATCH] libiberty pic + +Taken from gentoo. + +Signed-off-by: Marc Kleine-Budde +Signed-off-by: Robert Schwebel +--- + libiberty/Makefile.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in +index 75ff82d984a9..a55137e5f1de 100644 +--- a/libiberty/Makefile.in ++++ b/libiberty/Makefile.in +@@ -250,6 +250,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.9.2/0401-libstdc-pic.patch b/patches/gcc-4.9.2/0401-libstdc-pic.patch new file mode 100644 index 0000000..aa90fa9 --- /dev/null +++ b/patches/gcc-4.9.2/0401-libstdc-pic.patch @@ -0,0 +1,58 @@ +From: Marc Kleine-Budde +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 +Signed-off-by: Robert Schwebel +--- + 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 6c2d228f844d..a77072802d4f 100644 +--- a/libstdc++-v3/src/Makefile.am ++++ b/libstdc++-v3/src/Makefile.am +@@ -187,6 +187,13 @@ CXXLINK = \ + $(VTV_CXXLINKFLAGS) \ + $(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 cd3943b1afc8..b49f2aedb1b9 100644 +--- a/libstdc++-v3/src/Makefile.in ++++ b/libstdc++-v3/src/Makefile.in +@@ -769,7 +769,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 + +@@ -963,6 +963,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.9.2/0500-Fix-Argument-list-too-long-error.patch b/patches/gcc-4.9.2/0500-Fix-Argument-list-too-long-error.patch new file mode 100644 index 0000000..e434b45 --- /dev/null +++ b/patches/gcc-4.9.2/0500-Fix-Argument-list-too-long-error.patch @@ -0,0 +1,37 @@ +From: Robert Yang +Date: Wed, 5 Dec 2012 17:20:37 +0100 +Subject: [PATCH] Fix "Argument list too long" error + +There would be an "Argument list too long" error when the +build directory is longer than 200, this is caused by: + +headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u` + +The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle +it, use the $(sort list) of GNU make which can handle the too long list +would fix the problem, the header would be short enough after sorted. +The "tr ' ' '\012'" was used for translating the space to "\n", the +$(sort list) doesn't need this. + +Signed-off-by: Robert Yang + +This was taken from OE. + +Signed-off-by: Michael Olbrich +--- + gcc/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index b47733cef501..13cd6944b67c 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -3160,7 +3160,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype + # We keep the directory structure for files in config or c-family and .def + # files. All other files are flattened to a single directory. + $(mkinstalldirs) $(DESTDIR)$(plugin_includedir) +- headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`; \ ++ headers="$(sort $(PLUGIN_HEADERS))"; \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \ + for file in $$headers; do \ + if [ -f $$file ] ; then \ diff --git a/patches/gcc-4.9.2/series b/patches/gcc-4.9.2/series new file mode 100644 index 0000000..5278778 --- /dev/null +++ b/patches/gcc-4.9.2/series @@ -0,0 +1,16 @@ +# generated by git-ptx-patches +#tag:base +#tag:Upstream --start-number 100 +#tag:OSELAS.toolchain --start-number 200 +0200-no-host-includes.patch +0201-gcc-i386-use-pure64-CLFS-patch.patch +#tag:uclibc --start-number 300 +0300-also-match-uclibc-when-checking-host-os.patch +0301-missing-execinfo.h.patch +0302-c99-snprintf.patch +#tag:gentoo --start-number 400 +0400-libiberty-pic.patch +0401-libstdc-pic.patch +#tag:OpenEmbedded --start-number 500 +0500-Fix-Argument-list-too-long-error.patch +# c671ca1334def5681f59a78c91610f8c - git-ptx-patches magic diff --git a/patches/gcc-linaro-4.8-2013.11 b/patches/gcc-linaro-4.8-2013.11 deleted file mode 120000 index 82eb636..0000000 --- a/patches/gcc-linaro-4.8-2013.11 +++ /dev/null @@ -1 +0,0 @@ -gcc-4.8.2 \ No newline at end of file -- cgit v1.2.3