From 651567ff9093092a7d4aeabec44a55f563c6a231 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Thu, 22 Sep 2016 17:01:43 -0700 Subject: Add a checkbox for libmpx build. Disable libmpx for musl builds. Signed-off-by: Alexey Neyman --- config/cc/gcc.in | 5 +++++ config/cc/gcc.in.2 | 10 ++++++++++ 2 files changed, 15 insertions(+) (limited to 'config') diff --git a/config/cc/gcc.in b/config/cc/gcc.in index 101f2b27..9cc903f0 100644 --- a/config/cc/gcc.in +++ b/config/cc/gcc.in @@ -160,6 +160,7 @@ config CC_GCC_5 select CC_GCC_HAS_LNK_HASH_STYLE select CC_GCC_HAS_LIBQUADMATH select CC_GCC_HAS_LIBSANITIZER + select CC_GCC_HAS_LIBMPX select CC_SUPPORT_GOLANG config CC_GCC_5_or_later @@ -178,6 +179,7 @@ config CC_GCC_6 select CC_GCC_HAS_LNK_HASH_STYLE select CC_GCC_HAS_LIBQUADMATH select CC_GCC_HAS_LIBSANITIZER + select CC_GCC_HAS_LIBMPX select CC_SUPPORT_GOLANG config CC_GCC_6_or_later @@ -276,6 +278,9 @@ config CC_GCC_HAS_LIBQUADMATH config CC_GCC_HAS_LIBSANITIZER bool +config CC_GCC_HAS_LIBMPX + bool + if ! CC_GCC_CUSTOM config CC_GCC_VERSION diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2 index c200d22c..b7353dfa 100644 --- a/config/cc/gcc.in.2 +++ b/config/cc/gcc.in.2 @@ -182,6 +182,16 @@ config CC_GCC_LIBSANITIZER The default is 'N'. Say 'Y' if you need it, and report success/failure. +config CC_GCC_LIBMPX + bool + default y + prompt "Compile libmpx" + depends on CC_GCC_HAS_LIBMPX + depends on ARCH_x86 + depends on !LIBC_musl # MUSL does not define libc types that GCC requires + help + Enable GCC support for Intel Memory Protection Extensions (MPX). + #----------------------------------------------------------------------------- comment "Misc. obscure options." -- cgit v1.2.3 From 202ca9b7d4fcf06e19af34c8718353aa8ffe41f8 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Fri, 13 May 2016 08:44:21 -0700 Subject: Upgrade uClibc-ng to 1.0.14. Signed-off-by: Alexey Neyman --- config/libc/uClibc.in | 10 +++++----- patches/uClibc-ng/1.0.12/100-provide-_obstack_free.patch | 12 ------------ 2 files changed, 5 insertions(+), 17 deletions(-) delete mode 100644 patches/uClibc-ng/1.0.12/100-provide-_obstack_free.patch (limited to 'config') diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in index a99ff736..6d814da8 100644 --- a/config/libc/uClibc.in +++ b/config/libc/uClibc.in @@ -75,10 +75,10 @@ choice # Don't remove next line # CT_INSERT_VERSION_BELOW -config LIBC_UCLIBC_NG_V_1_0_12 +config LIBC_UCLIBC_NG_V_1_0_14 bool - prompt "1.0.12" - select LIBC_UCLIBC_NG_1_0_12_or_later + prompt "1.0.14" + select LIBC_UCLIBC_NG_1_0_14_or_later config LIBC_UCLIBC_V_0_9_33_2 bool @@ -91,12 +91,12 @@ config LIBC_VERSION string # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW - default "1.0.12" if LIBC_UCLIBC_NG_V_1_0_12 + default "1.0.14" if LIBC_UCLIBC_NG_V_1_0_14 default "0.9.33.2" if LIBC_UCLIBC_V_0_9_33_2 endif # ! LIBC_UCLIBC_CUSTOM -config LIBC_UCLIBC_NG_1_0_12_or_later +config LIBC_UCLIBC_NG_1_0_14_or_later bool select LIBC_UCLIBC_NG_1_0_0_or_later diff --git a/patches/uClibc-ng/1.0.12/100-provide-_obstack_free.patch b/patches/uClibc-ng/1.0.12/100-provide-_obstack_free.patch deleted file mode 100644 index 9fd4bc3a..00000000 --- a/patches/uClibc-ng/1.0.12/100-provide-_obstack_free.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur uClibc-ng-1.0.12.orig/libc/misc/gnu/obstack.c uClibc-ng-1.0.12/libc/misc/gnu/obstack.c ---- uClibc-ng-1.0.12.orig/libc/misc/gnu/obstack.c 2016-03-13 15:08:44.408962824 -0700 -+++ uClibc-ng-1.0.12/libc/misc/gnu/obstack.c 2016-03-13 15:13:30.129322998 -0700 -@@ -385,7 +385,7 @@ - abort (); - } - --# if 0 -+# if 1 - /* Older versions of libc used a function _obstack_free intended to be - called by non-GCC compilers. */ - strong_alias (obstack_free, _obstack_free) -- cgit v1.2.3 From f35c62daf0b4c6eaa50ef3d51499b6c5c4e24332 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sun, 11 Sep 2016 12:39:42 -0700 Subject: Add uClibc-ng 1.0.17. Also, support uClibc-ng in addToolVersion.sh Signed-off-by: Alexey Neyman --- config/libc/uClibc.in | 6 ++++++ scripts/addToolVersion.sh | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in index 6d814da8..5ce2674c 100644 --- a/config/libc/uClibc.in +++ b/config/libc/uClibc.in @@ -75,6 +75,11 @@ choice # Don't remove next line # CT_INSERT_VERSION_BELOW +config LIBC_UCLIBC_NG_V_1_0_17 + bool + prompt "1.0.17" + select LIBC_UCLIBC_NG_1_0_14_or_later + config LIBC_UCLIBC_NG_V_1_0_14 bool prompt "1.0.14" @@ -91,6 +96,7 @@ config LIBC_VERSION string # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW + default "1.0.17" if LIBC_UCLIBC_NG_V_1_0_17 default "1.0.14" if LIBC_UCLIBC_NG_V_1_0_14 default "0.9.33.2" if LIBC_UCLIBC_V_0_9_33_2 diff --git a/scripts/addToolVersion.sh b/scripts/addToolVersion.sh index 806ecca8..72baac01 100755 --- a/scripts/addToolVersion.sh +++ b/scripts/addToolVersion.sh @@ -16,7 +16,7 @@ doHelp() { cat <<-EOF Usage: ${myname} <--tool> <[options] version [...]> ... 'tool' in one of: - gcc, binutils, glibc, uClibc, newlib, linux, gdb, dmalloc, + gcc, binutils, glibc, uClibc, uClibc-ng, newlib, linux, gdb, dmalloc, duma, strace, ltrace, libelf, gmp, mpfr, isl, cloog, mpc, mingw-w64, expat, ncurses @@ -179,6 +179,7 @@ while [ $# -gt 0 ]; do --binutils) EXP=; OBS=; cat=BINUTILS; tool=binutils; tool_prefix=binutils; dot2suffix=;; --glibc) EXP=; OBS=; cat=LIBC_GLIBC; tool=glibc; tool_prefix=libc; dot2suffix=;; --uClibc) EXP=; OBS=; cat=LIBC_UCLIBC; tool=uClibc; tool_prefix=libc; dot2suffix=;; + --uClibc-ng)EXP=; OBS=; cat=LIBC_UCLIBC_NG; tool=uClibc; tool_prefix=libc; dot2suffix=;; --newlib) EXP=; OBS=; cat=LIBC_NEWLIB; tool=newlib; tool_prefix=libc; dot2suffix=;; --mingw-w64)EXP=; OBS=; cat=WINAPI; tool=mingw; tool_prefix=libc; dot2suffix=;; --linux) EXP=; OBS=; cat=KERNEL; tool=linux; tool_prefix=kernel; dot2suffix=;; -- cgit v1.2.3 From 03730997ae01710a55988d6129d937c21eb24608 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sun, 18 Sep 2016 11:38:44 -0700 Subject: GC uClibc 1.0.14. Signed-off-by: Alexey Neyman --- config/libc/uClibc.in | 6 ------ 1 file changed, 6 deletions(-) (limited to 'config') diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in index 5ce2674c..3a76a426 100644 --- a/config/libc/uClibc.in +++ b/config/libc/uClibc.in @@ -80,11 +80,6 @@ config LIBC_UCLIBC_NG_V_1_0_17 prompt "1.0.17" select LIBC_UCLIBC_NG_1_0_14_or_later -config LIBC_UCLIBC_NG_V_1_0_14 - bool - prompt "1.0.14" - select LIBC_UCLIBC_NG_1_0_14_or_later - config LIBC_UCLIBC_V_0_9_33_2 bool prompt "0.9.33.2" @@ -97,7 +92,6 @@ config LIBC_VERSION # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW default "1.0.17" if LIBC_UCLIBC_NG_V_1_0_17 - default "1.0.14" if LIBC_UCLIBC_NG_V_1_0_14 default "0.9.33.2" if LIBC_UCLIBC_V_0_9_33_2 endif # ! LIBC_UCLIBC_CUSTOM -- cgit v1.2.3 From 8121be5b217d1b354db856f8c4ca1b94ce7cffd4 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Mon, 19 Sep 2016 18:50:08 -0700 Subject: Fix m68k with uClibc-ng >= 1.0.15. 1.0.15 only kept a single LINUXTHREADS option, and renamed it, making it no longer option-compatible with uClibc. The option for "1.0.14 or later" version of uClibc-ng is not currently used; rename it to "1.0.15 or later" and use it to handle newer uClibc-ng's linuxthreads. m68k happens to be the only sample using linuxthreads. Signed-off-by: Alexey Neyman --- config/libc/uClibc.in | 4 ++-- config/libc/uClibc.in.2 | 4 +++- scripts/build/libc/uClibc.sh | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in index 3a76a426..14564bab 100644 --- a/config/libc/uClibc.in +++ b/config/libc/uClibc.in @@ -78,7 +78,7 @@ choice config LIBC_UCLIBC_NG_V_1_0_17 bool prompt "1.0.17" - select LIBC_UCLIBC_NG_1_0_14_or_later + select LIBC_UCLIBC_NG_1_0_15_or_later config LIBC_UCLIBC_V_0_9_33_2 bool @@ -96,7 +96,7 @@ config LIBC_VERSION endif # ! LIBC_UCLIBC_CUSTOM -config LIBC_UCLIBC_NG_1_0_14_or_later +config LIBC_UCLIBC_NG_1_0_15_or_later bool select LIBC_UCLIBC_NG_1_0_0_or_later diff --git a/config/libc/uClibc.in.2 b/config/libc/uClibc.in.2 index 3a5fe345..dc024201 100644 --- a/config/libc/uClibc.in.2 +++ b/config/libc/uClibc.in.2 @@ -1,6 +1,6 @@ # uClibc second-part option -if THREADS_LT +if THREADS_LT && !LIBC_UCLIBC_NG_1_0_15_or_later choice bool @@ -30,10 +30,12 @@ endchoice endif # THREADS_LT +# uClibc-ng 1.0.15 did away with 2 implementations of linuxthreads config LIBC_UCLIBC_LNXTHRD string default "" if THREADS_NONE default "" if THREADS_NATIVE + default "" if LIBC_UCLIBC_NG_1_0_15_or_later default "old" if LIBC_UCLIBC_LNXTHRD_OLD default "new" if LIBC_UCLIBC_LNXTHRD_NEW diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh index 47e135b9..be8d6bf2 100644 --- a/scripts/build/libc/uClibc.sh +++ b/scripts/build/libc/uClibc.sh @@ -377,6 +377,11 @@ manage_uClibc_config() { case "${CT_THREADS}:${CT_LIBC_UCLIBC_LNXTHRD}" in none:) ;; + linuxthreads:) + # Newer version of uClibc-ng, no old/new dichotomy + CT_KconfigEnableOption "UCLIBC_HAS_THREADS" "${dst}" + CT_KconfigEnableOption "UCLIBC_HAS_LINUXTHREADS" "${dst}" + ;; linuxthreads:old) CT_KconfigEnableOption "UCLIBC_HAS_THREADS" "${dst}" CT_KconfigEnableOption "LINUXTHREADS_OLD" "${dst}" -- cgit v1.2.3 From 1cb9253dd76ddc93082952c580b2512ff600d9fd Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Tue, 4 Oct 2016 17:48:28 -0700 Subject: uClibc-ng pushes new releases faster than we merge them in! Signed-off-by: Alexey Neyman --- config/libc/uClibc.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in index 14564bab..f7054d66 100644 --- a/config/libc/uClibc.in +++ b/config/libc/uClibc.in @@ -75,9 +75,9 @@ choice # Don't remove next line # CT_INSERT_VERSION_BELOW -config LIBC_UCLIBC_NG_V_1_0_17 +config LIBC_UCLIBC_NG_V_1_0_18 bool - prompt "1.0.17" + prompt "1.0.18" select LIBC_UCLIBC_NG_1_0_15_or_later config LIBC_UCLIBC_V_0_9_33_2 @@ -91,7 +91,7 @@ config LIBC_VERSION string # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW - default "1.0.17" if LIBC_UCLIBC_NG_V_1_0_17 + default "1.0.18" if LIBC_UCLIBC_NG_V_1_0_18 default "0.9.33.2" if LIBC_UCLIBC_V_0_9_33_2 endif # ! LIBC_UCLIBC_CUSTOM -- cgit v1.2.3 From 1d43ed3151e184452ce97ba1a326b2027f0dc208 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 5 Oct 2016 15:23:40 -0700 Subject: Restore 1.0.17 and make 1.0.18 experimental. 1.0.18 changed the dependencies for the static libraries, notably in libc/Makefile.in. This resulted in packing a lot of unrelated stuff into libc.a, including (sic!) a nested .a library and stuff from other libraries such as libdl. This results in a failure to statically link with thus created libc.a: .../libc.a(libdl.os):(.literal+0x74): undefined reference to `_dl_tlsdesc_return' This was breaking xtensa-*-uclibc sample. Signed-off-by: Alexey Neyman --- config/libc/uClibc.in | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'config') diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in index f7054d66..da74968a 100644 --- a/config/libc/uClibc.in +++ b/config/libc/uClibc.in @@ -60,6 +60,8 @@ config LIBC_UCLIBC_CUSTOM_VERSION prompt "Custom uClibc Version" help Enter the version number for your custom uClibc. + Version 1.0.18 is only enabled in EXPERIMENTAL builds due to issues + with static libraries. config LIBC_VERSION string @@ -75,9 +77,16 @@ choice # Don't remove next line # CT_INSERT_VERSION_BELOW +# List 1.0.17 first to make it default. 1.0.18 has issues with static libs. +config LIBC_UCLIBC_NG_V_1_0_17 + bool + prompt "1.0.17" + select LIBC_UCLIBC_NG_1_0_15_or_later + config LIBC_UCLIBC_NG_V_1_0_18 bool prompt "1.0.18" + depends on EXPERIMENTAL select LIBC_UCLIBC_NG_1_0_15_or_later config LIBC_UCLIBC_V_0_9_33_2 @@ -92,6 +101,7 @@ config LIBC_VERSION # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW default "1.0.18" if LIBC_UCLIBC_NG_V_1_0_18 + default "1.0.17" if LIBC_UCLIBC_NG_V_1_0_17 default "0.9.33.2" if LIBC_UCLIBC_V_0_9_33_2 endif # ! LIBC_UCLIBC_CUSTOM -- cgit v1.2.3 From 339b83c3939296e54f5366439a19861372bad9b9 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 5 Oct 2016 13:05:44 -0700 Subject: MINGW doesn't like libmpx either. Signed-off-by: Alexey Neyman --- config/cc/gcc.in.2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2 index b7353dfa..2c5d45e6 100644 --- a/config/cc/gcc.in.2 +++ b/config/cc/gcc.in.2 @@ -188,7 +188,8 @@ config CC_GCC_LIBMPX prompt "Compile libmpx" depends on CC_GCC_HAS_LIBMPX depends on ARCH_x86 - depends on !LIBC_musl # MUSL does not define libc types that GCC requires + # MUSL does not define libc types that GCC requires. Mingw lacks certain headers. + depends on !LIBC_musl && ! LIBC_mingw help Enable GCC support for Intel Memory Protection Extensions (MPX). -- cgit v1.2.3 From 0bf97beb30cf5af7cf9c32943f73fa46c85ce01b Mon Sep 17 00:00:00 2001 From: Yogesh Sharma Date: Mon, 31 Oct 2016 14:29:00 -0400 Subject: gcc: Updated gcc from 6.1.0 to 6.2.0 Signed-off-by: Yogesh Sharma --- config/cc/gcc.in | 6 +- patches/gcc/6.1.0/100-uclibc-conf.patch | 15 -- patches/gcc/6.1.0/301-missing-execinfo_h.patch | 13 -- ...t-need-undefined-extern-var-refs-nor-fpic.patch | 160 -------------------- ...380-gcc-plugin-POSIX-include-sys-select-h.patch | 11 -- patches/gcc/6.1.0/810-arm-softfloat-libgcc.patch | 30 ---- patches/gcc/6.1.0/830-arm_unbreak_armv4t.patch | 15 -- .../840-microblaze-enable-dwarf-eh-support.patch | 166 --------------------- patches/gcc/6.1.0/860-cilk-wchar.patch | 56 ------- patches/gcc/6.2.0/100-uclibc-conf.patch | 15 ++ patches/gcc/6.2.0/301-missing-execinfo_h.patch | 13 ++ ...t-need-undefined-extern-var-refs-nor-fpic.patch | 160 ++++++++++++++++++++ ...380-gcc-plugin-POSIX-include-sys-select-h.patch | 11 ++ patches/gcc/6.2.0/810-arm-softfloat-libgcc.patch | 30 ++++ patches/gcc/6.2.0/830-arm_unbreak_armv4t.patch | 15 ++ .../840-microblaze-enable-dwarf-eh-support.patch | 166 +++++++++++++++++++++ patches/gcc/6.2.0/860-cilk-wchar.patch | 56 +++++++ 17 files changed, 469 insertions(+), 469 deletions(-) delete mode 100644 patches/gcc/6.1.0/100-uclibc-conf.patch delete mode 100644 patches/gcc/6.1.0/301-missing-execinfo_h.patch delete mode 100644 patches/gcc/6.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch delete mode 100644 patches/gcc/6.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch delete mode 100644 patches/gcc/6.1.0/810-arm-softfloat-libgcc.patch delete mode 100644 patches/gcc/6.1.0/830-arm_unbreak_armv4t.patch delete mode 100644 patches/gcc/6.1.0/840-microblaze-enable-dwarf-eh-support.patch delete mode 100644 patches/gcc/6.1.0/860-cilk-wchar.patch create mode 100644 patches/gcc/6.2.0/100-uclibc-conf.patch create mode 100644 patches/gcc/6.2.0/301-missing-execinfo_h.patch create mode 100644 patches/gcc/6.2.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch create mode 100644 patches/gcc/6.2.0/380-gcc-plugin-POSIX-include-sys-select-h.patch create mode 100644 patches/gcc/6.2.0/810-arm-softfloat-libgcc.patch create mode 100644 patches/gcc/6.2.0/830-arm_unbreak_armv4t.patch create mode 100644 patches/gcc/6.2.0/840-microblaze-enable-dwarf-eh-support.patch create mode 100644 patches/gcc/6.2.0/860-cilk-wchar.patch (limited to 'config') diff --git a/config/cc/gcc.in b/config/cc/gcc.in index 9cc903f0..6f6e1a33 100644 --- a/config/cc/gcc.in +++ b/config/cc/gcc.in @@ -71,9 +71,9 @@ choice # Don't remove next line # CT_INSERT_VERSION_BELOW -config CC_GCC_V_6_1_0 +config CC_GCC_V_6_2_0 bool - prompt "6.1.0" + prompt "6.2.0" select CC_GCC_6 config CC_GCC_V_5_4_0 @@ -287,7 +287,7 @@ config CC_GCC_VERSION string # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW - default "6.1.0" if CC_GCC_V_6_1_0 + default "6.2.0" if CC_GCC_V_6_2_0 default "5.4.0" if CC_GCC_V_5_4_0 default "linaro-5.2-2015.11-2" if CC_GCC_V_linaro_5_2 default "linaro-4.9-2015.06" if CC_GCC_V_linaro_4_9 diff --git a/patches/gcc/6.1.0/100-uclibc-conf.patch b/patches/gcc/6.1.0/100-uclibc-conf.patch deleted file mode 100644 index 73d1f0d3..00000000 --- a/patches/gcc/6.1.0/100-uclibc-conf.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: b/contrib/regression/objs-gcc.sh -=================================================================== ---- a/contrib/regression/objs-gcc.sh -+++ b/contrib/regression/objs-gcc.sh -@@ -106,6 +106,10 @@ - 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/patches/gcc/6.1.0/301-missing-execinfo_h.patch b/patches/gcc/6.1.0/301-missing-execinfo_h.patch deleted file mode 100644 index 2d0e7baa..00000000 --- a/patches/gcc/6.1.0/301-missing-execinfo_h.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: b/boehm-gc/include/gc.h -=================================================================== ---- a/boehm-gc/include/gc.h -+++ b/boehm-gc/include/gc.h -@@ -503,7 +503,7 @@ - #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/6.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/patches/gcc/6.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch deleted file mode 100644 index d8986d5f..00000000 --- a/patches/gcc/6.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch +++ /dev/null @@ -1,160 +0,0 @@ -diff -urN gcc-5.3.0.orig/config/gcc-plugin.m4 gcc-5.3.0/config/gcc-plugin.m4 ---- gcc-5.3.0.orig/config/gcc-plugin.m4 2015-12-19 14:39:04.120734900 +0000 -+++ gcc-5.3.0/config/gcc-plugin.m4 2015-12-20 01:28:45.381965300 +0000 -@@ -20,6 +20,9 @@ - - pluginlibs= - -+ PICFLAG="-fPIC" -+ UNDEFINEDPREAMBLE="extern int X;" -+ UNDEFINEDCODE="return X == 0;" - case "${host}" in - *-*-darwin*) - if test x$build = x$host; then -@@ -30,6 +33,11 @@ - export_sym_check= - fi - ;; -+ *-*-mingw*|*-*-cygwin*|*-*-msys*) -+ PICFLAG="" -+ UNDEFINEDPREAMBLE="" -+ UNDEFINEDCODE="" -+ ;; - *) - if test x$build = x$host; then - export_sym_check="objdump${exeext} -T" -@@ -81,17 +89,17 @@ - case "${host}" in - *-*-darwin*) - CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` -- CFLAGS="$CFLAGS -fPIC" -+ CFLAGS="$CFLAGS ${PICFLAG}" - LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" - ;; - *) -- CFLAGS="$CFLAGS -fPIC" -- LDFLAGS="$LDFLAGS -fPIC -shared" -+ CFLAGS="$CFLAGS ${PICFLAG}" -+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared" - ;; - esac -- AC_MSG_CHECKING([for -fPIC -shared]) -+ AC_MSG_CHECKING([for ${PICFLAG} -shared]) - AC_TRY_LINK( -- [extern int X;],[return X == 0;], -+ [${UNDEFINEDPREAMBLE}],[${UNDEFINEDCODE}], - [AC_MSG_RESULT([yes]); have_pic_shared=yes], - [AC_MSG_RESULT([no]); have_pic_shared=no]) - if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then -diff -urN gcc-5.3.0.orig/gcc/configure gcc-5.3.0/gcc/configure ---- gcc-5.3.0.orig/gcc/configure 2015-12-19 14:40:16.893975900 +0000 -+++ gcc-5.3.0/gcc/configure 2015-12-20 01:28:45.472476700 +0000 -@@ -28386,6 +28386,9 @@ - - pluginlibs= - -+ PICFLAG="-fPIC" -+ UNDEFINEDPREAMBLE="extern int X;" -+ UNDEFINEDCODE="return X == 0;" - case "${host}" in - *-*-darwin*) - if test x$build = x$host; then -@@ -28396,6 +28399,11 @@ - export_sym_check= - fi - ;; -+ *-*-mingw*|*-*-cygwin*|*-*-msys*) -+ PICFLAG="" -+ UNDEFINEDPREAMBLE="" -+ UNDEFINEDCODE="" -+ ;; - *) - if test x$build = x$host; then - export_sym_check="objdump${exeext} -T" -@@ -28508,23 +28516,23 @@ - case "${host}" in - *-*-darwin*) - CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` -- CFLAGS="$CFLAGS -fPIC" -+ CFLAGS="$CFLAGS ${PICFLAG}" - LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" - ;; - *) -- CFLAGS="$CFLAGS -fPIC" -- LDFLAGS="$LDFLAGS -fPIC -shared" -+ CFLAGS="$CFLAGS ${PICFLAG}" -+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared" - ;; - esac -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5 --$as_echo_n "checking for -fPIC -shared... " >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5 -+$as_echo_n "checking for ${PICFLAG} -shared... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --extern int X; -+${UNDEFINEDPREAMBLE} - int - main () - { --return X == 0; -+${UNDEFINEDCODE} - ; - return 0; - } -diff -urN gcc-5.3.0.orig/libcc1/configure gcc-5.3.0/libcc1/configure ---- gcc-5.3.0.orig/libcc1/configure 2015-12-19 14:40:20.855979000 +0000 -+++ gcc-5.3.0/libcc1/configure 2015-12-20 01:28:45.504980900 +0000 -@@ -14500,6 +14500,9 @@ - - pluginlibs= - -+ PICFLAG="-fPIC" -+ UNDEFINEDPREAMBLE="extern int X;" -+ UNDEFINEDCODE="return X == 0;" - case "${host}" in - *-*-darwin*) - if test x$build = x$host; then -@@ -14510,6 +14513,11 @@ - export_sym_check= - fi - ;; -+ *-*-mingw*|*-*-cygwin*|*-*-msys*) -+ PICFLAG="" -+ UNDEFINEDPREAMBLE="" -+ UNDEFINEDCODE="" -+ ;; - *) - if test x$build = x$host; then - export_sym_check="objdump${exeext} -T" -@@ -14622,23 +14630,23 @@ - case "${host}" in - *-*-darwin*) - CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` -- CFLAGS="$CFLAGS -fPIC" -+ CFLAGS="$CFLAGS ${PICFLAG}" - LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" - ;; - *) -- CFLAGS="$CFLAGS -fPIC" -- LDFLAGS="$LDFLAGS -fPIC -shared" -+ CFLAGS="$CFLAGS ${PICFLAG}" -+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared" - ;; - esac -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5 --$as_echo_n "checking for -fPIC -shared... " >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5 -+$as_echo_n "checking for ${PICFLAG} -shared... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --extern int X; -+${UNDEFINEDPREAMBLE} - int - main () - { --return X == 0; -+${UNDEFINEDCODE} - ; - return 0; - } diff --git a/patches/gcc/6.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch b/patches/gcc/6.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch deleted file mode 100644 index 12ef48ee..00000000 --- a/patches/gcc/6.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -urN gcc-5.3.0.orig/libcc1/connection.cc gcc-5.3.0/libcc1/connection.cc ---- gcc-5.3.0.orig/libcc1/connection.cc 2015-12-19 14:40:20.860479600 +0000 -+++ gcc-5.3.0/libcc1/connection.cc 2015-12-20 01:31:04.346611500 +0000 -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - #include - #include - #include "marshall.hh" diff --git a/patches/gcc/6.1.0/810-arm-softfloat-libgcc.patch b/patches/gcc/6.1.0/810-arm-softfloat-libgcc.patch deleted file mode 100644 index 5efa7fd1..00000000 --- a/patches/gcc/6.1.0/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,30 +0,0 @@ -Index: b/gcc/config/arm/linux-elf.h -=================================================================== ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -60,7 +60,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 "/lib/ld-linux.so.2" - -Index: b/libgcc/config/arm/t-linux -=================================================================== ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,11 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. diff --git a/patches/gcc/6.1.0/830-arm_unbreak_armv4t.patch b/patches/gcc/6.1.0/830-arm_unbreak_armv4t.patch deleted file mode 100644 index b7300591..00000000 --- a/patches/gcc/6.1.0/830-arm_unbreak_armv4t.patch +++ /dev/null @@ -1,15 +0,0 @@ -http://sourceware.org/ml/crossgcc/2008-05/msg00009.html - -Index: b/gcc/config/arm/linux-eabi.h -=================================================================== ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -45,7 +45,7 @@ - The ARM10TDMI core is the default for armv5t, so set - SUBTARGET_CPU_DEFAULT to achieve this. */ - #undef SUBTARGET_CPU_DEFAULT --#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi -+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi - - /* TARGET_BIG_ENDIAN_DEFAULT is set in - config.gcc for big endian configurations. */ diff --git a/patches/gcc/6.1.0/840-microblaze-enable-dwarf-eh-support.patch b/patches/gcc/6.1.0/840-microblaze-enable-dwarf-eh-support.patch deleted file mode 100644 index 9d29090a..00000000 --- a/patches/gcc/6.1.0/840-microblaze-enable-dwarf-eh-support.patch +++ /dev/null @@ -1,166 +0,0 @@ -Fetched from Xilinx gcc git at https://github.com/Xilinx/gcc - -From 23c35173490ac2d6348a668dfc9c1a6eb62171f2 Mon Sep 17 00:00:00 2001 -From: "Edgar E. Iglesias" -Date: Mon, 18 Jun 2012 20:18:13 +0200 -Subject: [PATCH] [Patch, microblaze]: Enable DWARF exception handling support. - -Changelog - -2013-03-18 Edgar E. Iglesias - David Holsgrove - - * common/config/microblaze/microblaze-common.c: Remove - TARGET_EXCEPT_UNWIND_INFO definition. - * config/microblaze/microblaze-protos.h: Add - microblaze_eh_return prototype. - * gcc/config/microblaze/microblaze.c: (microblaze_must_save_register, - microblaze_expand_epilogue, microblaze_return_addr): Handle - calls_eh_return - (microblaze_eh_return): New function. - * gcc/config/microblaze/microblaze.h: Define RETURN_ADDR_OFFSET, - EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM, EH_RETURN_STACKADJ_RTX, - ASM_PREFERRED_EH_DATA_FORMAT - * gcc/config/microblaze/microblaze.md: Define eh_return pattern. - -Signed-off-by: David Holsgrove -Signed-off-by: Edgar E. Iglesias ---- - gcc/common/config/microblaze/microblaze-common.c | 3 --- - gcc/config/microblaze/microblaze-protos.h | 1 + - gcc/config/microblaze/microblaze.c | 29 ++++++++++++++++++++---- - gcc/config/microblaze/microblaze.h | 15 ++++++++++++ - gcc/config/microblaze/microblaze.md | 11 +++++++++ - 5 files changed, 52 insertions(+), 7 deletions(-) - -Index: b/gcc/common/config/microblaze/microblaze-common.c -=================================================================== ---- a/gcc/common/config/microblaze/microblaze-common.c -+++ b/gcc/common/config/microblaze/microblaze-common.c -@@ -37,7 +37,4 @@ - #undef TARGET_OPTION_OPTIMIZATION_TABLE - #define TARGET_OPTION_OPTIMIZATION_TABLE microblaze_option_optimization_table - --#undef TARGET_EXCEPT_UNWIND_INFO --#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info -- - struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER; -Index: b/gcc/config/microblaze/microblaze-protos.h -=================================================================== ---- a/gcc/config/microblaze/microblaze-protos.h -+++ b/gcc/config/microblaze/microblaze-protos.h -@@ -56,6 +56,7 @@ - extern int symbol_mentioned_p (rtx); - extern int label_mentioned_p (rtx); - extern bool microblaze_cannot_force_const_mem (machine_mode, rtx); -+extern void microblaze_eh_return (rtx op0); - #endif /* RTX_CODE */ - - /* Declare functions in microblaze-c.c. */ -Index: b/gcc/config/microblaze/microblaze.c -=================================================================== ---- a/gcc/config/microblaze/microblaze.c -+++ b/gcc/config/microblaze/microblaze.c -@@ -1959,6 +1959,11 @@ - if (frame_pointer_needed && (regno == HARD_FRAME_POINTER_REGNUM)) - return 1; - -+ if (crtl->calls_eh_return -+ && regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) { -+ return 1; -+ } -+ - if (!crtl->is_leaf) - { - if (regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) -@@ -1986,6 +1991,13 @@ - return 1; - } - -+ if (crtl->calls_eh_return -+ && (regno == EH_RETURN_DATA_REGNO (0) -+ || regno == EH_RETURN_DATA_REGNO (1))) -+ { -+ return 1; -+ } -+ - return 0; - } - -@@ -3067,6 +3079,12 @@ - emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, fsiz_rtx)); - } - -+ if (crtl->calls_eh_return) -+ emit_insn (gen_addsi3 (stack_pointer_rtx, -+ stack_pointer_rtx, -+ gen_rtx_raw_REG (SImode, -+ MB_EH_STACKADJ_REGNUM))); -+ - emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST + - MB_ABI_SUB_RETURN_ADDR_REGNUM))); - } -@@ -3364,10 +3382,13 @@ - if (count != 0) - return NULL_RTX; - -- return gen_rtx_PLUS (Pmode, -- get_hard_reg_initial_val (Pmode, -- MB_ABI_SUB_RETURN_ADDR_REGNUM), -- GEN_INT (8)); -+ return get_hard_reg_initial_val (Pmode, -+ MB_ABI_SUB_RETURN_ADDR_REGNUM); -+} -+ -+void microblaze_eh_return (rtx op0) -+{ -+ emit_insn (gen_movsi(gen_rtx_MEM(Pmode, stack_pointer_rtx), op0)); - } - - /* Queue an .ident string in the queue of top-level asm statements. -Index: b/gcc/config/microblaze/microblaze.h -=================================================================== ---- a/gcc/config/microblaze/microblaze.h -+++ b/gcc/config/microblaze/microblaze.h -@@ -184,6 +184,21 @@ - #define INCOMING_RETURN_ADDR_RTX \ - gen_rtx_REG (VOIDmode, GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM) - -+/* Specifies the offset from INCOMING_RETURN_ADDR_RTX and the actual return PC. */ -+#define RETURN_ADDR_OFFSET (8) -+ -+/* Describe how we implement __builtin_eh_return. */ -+#define EH_RETURN_DATA_REGNO(N) (((N) < 2) ? MB_ABI_FIRST_ARG_REGNUM + (N) : INVALID_REGNUM) -+ -+#define MB_EH_STACKADJ_REGNUM MB_ABI_INT_RETURN_VAL2_REGNUM -+#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, MB_EH_STACKADJ_REGNUM) -+ -+/* Select a format to encode pointers in exception handling data. CODE -+ is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is -+ true if the symbol may be affected by dynamic relocations. */ -+#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ -+ ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr) -+ - /* Use DWARF 2 debugging information by default. */ - #define DWARF2_DEBUGGING_INFO - #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG -Index: b/gcc/config/microblaze/microblaze.md -=================================================================== ---- a/gcc/config/microblaze/microblaze.md -+++ b/gcc/config/microblaze/microblaze.md -@@ -2272,4 +2272,15 @@ - (set_attr "mode" "SI") - (set_attr "length" "4")]) - -+; This is used in compiling the unwind routines. -+(define_expand "eh_return" -+ [(use (match_operand 0 "general_operand" ""))] -+ "" -+ " -+{ -+ microblaze_eh_return(operands[0]); -+ DONE; -+}") -+ - (include "sync.md") -+ diff --git a/patches/gcc/6.1.0/860-cilk-wchar.patch b/patches/gcc/6.1.0/860-cilk-wchar.patch deleted file mode 100644 index 1d9916f5..00000000 --- a/patches/gcc/6.1.0/860-cilk-wchar.patch +++ /dev/null @@ -1,56 +0,0 @@ -[PATCH] cilk: fix build without wchar - -When building against uClibc with wchar support disabled, WCHAR_MIN and -WCHAR_MAX are not defined leading to compilation errors. - -Fix it by only including the wchar code if available. - -Signed-off-by: Peter Korsgaard ---- - libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++ - 1 file changed, 8 insertions(+) - -Index: b/libcilkrts/include/cilk/reducer_min_max.h -=================================================================== ---- a/libcilkrts/include/cilk/reducer_min_max.h -+++ b/libcilkrts/include/cilk/reducer_min_max.h -@@ -3154,7 +3154,9 @@ - CILK_C_REDUCER_MAX_INSTANCE(char, char, CHAR_MIN) - CILK_C_REDUCER_MAX_INSTANCE(unsigned char, uchar, 0) - CILK_C_REDUCER_MAX_INSTANCE(signed char, schar, SCHAR_MIN) -+#ifdef WCHAR_MIN - CILK_C_REDUCER_MAX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN) -+#endif - CILK_C_REDUCER_MAX_INSTANCE(short, short, SHRT_MIN) - CILK_C_REDUCER_MAX_INSTANCE(unsigned short, ushort, 0) - CILK_C_REDUCER_MAX_INSTANCE(int, int, INT_MIN) -@@ -3306,7 +3308,9 @@ - CILK_C_REDUCER_MAX_INDEX_INSTANCE(char, char, CHAR_MIN) - CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned char, uchar, 0) - CILK_C_REDUCER_MAX_INDEX_INSTANCE(signed char, schar, SCHAR_MIN) -+#ifdef WCHAR_MIN - CILK_C_REDUCER_MAX_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN) -+#endif - CILK_C_REDUCER_MAX_INDEX_INSTANCE(short, short, SHRT_MIN) - CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned short, ushort, 0) - CILK_C_REDUCER_MAX_INDEX_INSTANCE(int, int, INT_MIN) -@@ -3432,7 +3436,9 @@ - CILK_C_REDUCER_MIN_INSTANCE(char, char, CHAR_MAX) - CILK_C_REDUCER_MIN_INSTANCE(unsigned char, uchar, CHAR_MAX) - CILK_C_REDUCER_MIN_INSTANCE(signed char, schar, SCHAR_MAX) -+#ifdef WCHAR_MAX - CILK_C_REDUCER_MIN_INSTANCE(wchar_t, wchar_t, WCHAR_MAX) -+#endif - CILK_C_REDUCER_MIN_INSTANCE(short, short, SHRT_MAX) - CILK_C_REDUCER_MIN_INSTANCE(unsigned short, ushort, USHRT_MAX) - CILK_C_REDUCER_MIN_INSTANCE(int, int, INT_MAX) -@@ -3584,7 +3590,9 @@ - CILK_C_REDUCER_MIN_INDEX_INSTANCE(char, char, CHAR_MAX) - CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned char, uchar, CHAR_MAX) - CILK_C_REDUCER_MIN_INDEX_INSTANCE(signed char, schar, SCHAR_MAX) -+#ifdef WCHAR_MAX - CILK_C_REDUCER_MIN_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MAX) -+#endif - CILK_C_REDUCER_MIN_INDEX_INSTANCE(short, short, SHRT_MAX) - CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned short, ushort, USHRT_MAX) - CILK_C_REDUCER_MIN_INDEX_INSTANCE(int, int, INT_MAX) diff --git a/patches/gcc/6.2.0/100-uclibc-conf.patch b/patches/gcc/6.2.0/100-uclibc-conf.patch new file mode 100644 index 00000000..73d1f0d3 --- /dev/null +++ b/patches/gcc/6.2.0/100-uclibc-conf.patch @@ -0,0 +1,15 @@ +Index: b/contrib/regression/objs-gcc.sh +=================================================================== +--- a/contrib/regression/objs-gcc.sh ++++ b/contrib/regression/objs-gcc.sh +@@ -106,6 +106,10 @@ + 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/patches/gcc/6.2.0/301-missing-execinfo_h.patch b/patches/gcc/6.2.0/301-missing-execinfo_h.patch new file mode 100644 index 00000000..2d0e7baa --- /dev/null +++ b/patches/gcc/6.2.0/301-missing-execinfo_h.patch @@ -0,0 +1,13 @@ +Index: b/boehm-gc/include/gc.h +=================================================================== +--- a/boehm-gc/include/gc.h ++++ b/boehm-gc/include/gc.h +@@ -503,7 +503,7 @@ + #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/6.2.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/patches/gcc/6.2.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch new file mode 100644 index 00000000..d8986d5f --- /dev/null +++ b/patches/gcc/6.2.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch @@ -0,0 +1,160 @@ +diff -urN gcc-5.3.0.orig/config/gcc-plugin.m4 gcc-5.3.0/config/gcc-plugin.m4 +--- gcc-5.3.0.orig/config/gcc-plugin.m4 2015-12-19 14:39:04.120734900 +0000 ++++ gcc-5.3.0/config/gcc-plugin.m4 2015-12-20 01:28:45.381965300 +0000 +@@ -20,6 +20,9 @@ + + pluginlibs= + ++ PICFLAG="-fPIC" ++ UNDEFINEDPREAMBLE="extern int X;" ++ UNDEFINEDCODE="return X == 0;" + case "${host}" in + *-*-darwin*) + if test x$build = x$host; then +@@ -30,6 +33,11 @@ + export_sym_check= + fi + ;; ++ *-*-mingw*|*-*-cygwin*|*-*-msys*) ++ PICFLAG="" ++ UNDEFINEDPREAMBLE="" ++ UNDEFINEDCODE="" ++ ;; + *) + if test x$build = x$host; then + export_sym_check="objdump${exeext} -T" +@@ -81,17 +89,17 @@ + case "${host}" in + *-*-darwin*) + CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` +- CFLAGS="$CFLAGS -fPIC" ++ CFLAGS="$CFLAGS ${PICFLAG}" + LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" + ;; + *) +- CFLAGS="$CFLAGS -fPIC" +- LDFLAGS="$LDFLAGS -fPIC -shared" ++ CFLAGS="$CFLAGS ${PICFLAG}" ++ LDFLAGS="$LDFLAGS ${PICFLAG} -shared" + ;; + esac +- AC_MSG_CHECKING([for -fPIC -shared]) ++ AC_MSG_CHECKING([for ${PICFLAG} -shared]) + AC_TRY_LINK( +- [extern int X;],[return X == 0;], ++ [${UNDEFINEDPREAMBLE}],[${UNDEFINEDCODE}], + [AC_MSG_RESULT([yes]); have_pic_shared=yes], + [AC_MSG_RESULT([no]); have_pic_shared=no]) + if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then +diff -urN gcc-5.3.0.orig/gcc/configure gcc-5.3.0/gcc/configure +--- gcc-5.3.0.orig/gcc/configure 2015-12-19 14:40:16.893975900 +0000 ++++ gcc-5.3.0/gcc/configure 2015-12-20 01:28:45.472476700 +0000 +@@ -28386,6 +28386,9 @@ + + pluginlibs= + ++ PICFLAG="-fPIC" ++ UNDEFINEDPREAMBLE="extern int X;" ++ UNDEFINEDCODE="return X == 0;" + case "${host}" in + *-*-darwin*) + if test x$build = x$host; then +@@ -28396,6 +28399,11 @@ + export_sym_check= + fi + ;; ++ *-*-mingw*|*-*-cygwin*|*-*-msys*) ++ PICFLAG="" ++ UNDEFINEDPREAMBLE="" ++ UNDEFINEDCODE="" ++ ;; + *) + if test x$build = x$host; then + export_sym_check="objdump${exeext} -T" +@@ -28508,23 +28516,23 @@ + case "${host}" in + *-*-darwin*) + CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` +- CFLAGS="$CFLAGS -fPIC" ++ CFLAGS="$CFLAGS ${PICFLAG}" + LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" + ;; + *) +- CFLAGS="$CFLAGS -fPIC" +- LDFLAGS="$LDFLAGS -fPIC -shared" ++ CFLAGS="$CFLAGS ${PICFLAG}" ++ LDFLAGS="$LDFLAGS ${PICFLAG} -shared" + ;; + esac +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5 +-$as_echo_n "checking for -fPIC -shared... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5 ++$as_echo_n "checking for ${PICFLAG} -shared... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-extern int X; ++${UNDEFINEDPREAMBLE} + int + main () + { +-return X == 0; ++${UNDEFINEDCODE} + ; + return 0; + } +diff -urN gcc-5.3.0.orig/libcc1/configure gcc-5.3.0/libcc1/configure +--- gcc-5.3.0.orig/libcc1/configure 2015-12-19 14:40:20.855979000 +0000 ++++ gcc-5.3.0/libcc1/configure 2015-12-20 01:28:45.504980900 +0000 +@@ -14500,6 +14500,9 @@ + + pluginlibs= + ++ PICFLAG="-fPIC" ++ UNDEFINEDPREAMBLE="extern int X;" ++ UNDEFINEDCODE="return X == 0;" + case "${host}" in + *-*-darwin*) + if test x$build = x$host; then +@@ -14510,6 +14513,11 @@ + export_sym_check= + fi + ;; ++ *-*-mingw*|*-*-cygwin*|*-*-msys*) ++ PICFLAG="" ++ UNDEFINEDPREAMBLE="" ++ UNDEFINEDCODE="" ++ ;; + *) + if test x$build = x$host; then + export_sym_check="objdump${exeext} -T" +@@ -14622,23 +14630,23 @@ + case "${host}" in + *-*-darwin*) + CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` +- CFLAGS="$CFLAGS -fPIC" ++ CFLAGS="$CFLAGS ${PICFLAG}" + LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" + ;; + *) +- CFLAGS="$CFLAGS -fPIC" +- LDFLAGS="$LDFLAGS -fPIC -shared" ++ CFLAGS="$CFLAGS ${PICFLAG}" ++ LDFLAGS="$LDFLAGS ${PICFLAG} -shared" + ;; + esac +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5 +-$as_echo_n "checking for -fPIC -shared... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5 ++$as_echo_n "checking for ${PICFLAG} -shared... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-extern int X; ++${UNDEFINEDPREAMBLE} + int + main () + { +-return X == 0; ++${UNDEFINEDCODE} + ; + return 0; + } diff --git a/patches/gcc/6.2.0/380-gcc-plugin-POSIX-include-sys-select-h.patch b/patches/gcc/6.2.0/380-gcc-plugin-POSIX-include-sys-select-h.patch new file mode 100644 index 00000000..12ef48ee --- /dev/null +++ b/patches/gcc/6.2.0/380-gcc-plugin-POSIX-include-sys-select-h.patch @@ -0,0 +1,11 @@ +diff -urN gcc-5.3.0.orig/libcc1/connection.cc gcc-5.3.0/libcc1/connection.cc +--- gcc-5.3.0.orig/libcc1/connection.cc 2015-12-19 14:40:20.860479600 +0000 ++++ gcc-5.3.0/libcc1/connection.cc 2015-12-20 01:31:04.346611500 +0000 +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include + #include + #include "marshall.hh" diff --git a/patches/gcc/6.2.0/810-arm-softfloat-libgcc.patch b/patches/gcc/6.2.0/810-arm-softfloat-libgcc.patch new file mode 100644 index 00000000..5efa7fd1 --- /dev/null +++ b/patches/gcc/6.2.0/810-arm-softfloat-libgcc.patch @@ -0,0 +1,30 @@ +Index: b/gcc/config/arm/linux-elf.h +=================================================================== +--- a/gcc/config/arm/linux-elf.h ++++ b/gcc/config/arm/linux-elf.h +@@ -60,7 +60,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 "/lib/ld-linux.so.2" + +Index: b/libgcc/config/arm/t-linux +=================================================================== +--- a/libgcc/config/arm/t-linux ++++ b/libgcc/config/arm/t-linux +@@ -1,6 +1,11 @@ + LIB1ASMSRC = arm/lib1funcs.S + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ +- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 ++ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ ++ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ ++ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ ++ _arm_fixsfsi _arm_fixunssfsi + + # Just for these, we omit the frame pointer since it makes such a big + # difference. diff --git a/patches/gcc/6.2.0/830-arm_unbreak_armv4t.patch b/patches/gcc/6.2.0/830-arm_unbreak_armv4t.patch new file mode 100644 index 00000000..b7300591 --- /dev/null +++ b/patches/gcc/6.2.0/830-arm_unbreak_armv4t.patch @@ -0,0 +1,15 @@ +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html + +Index: b/gcc/config/arm/linux-eabi.h +=================================================================== +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -45,7 +45,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/patches/gcc/6.2.0/840-microblaze-enable-dwarf-eh-support.patch b/patches/gcc/6.2.0/840-microblaze-enable-dwarf-eh-support.patch new file mode 100644 index 00000000..9d29090a --- /dev/null +++ b/patches/gcc/6.2.0/840-microblaze-enable-dwarf-eh-support.patch @@ -0,0 +1,166 @@ +Fetched from Xilinx gcc git at https://github.com/Xilinx/gcc + +From 23c35173490ac2d6348a668dfc9c1a6eb62171f2 Mon Sep 17 00:00:00 2001 +From: "Edgar E. Iglesias" +Date: Mon, 18 Jun 2012 20:18:13 +0200 +Subject: [PATCH] [Patch, microblaze]: Enable DWARF exception handling support. + +Changelog + +2013-03-18 Edgar E. Iglesias + David Holsgrove + + * common/config/microblaze/microblaze-common.c: Remove + TARGET_EXCEPT_UNWIND_INFO definition. + * config/microblaze/microblaze-protos.h: Add + microblaze_eh_return prototype. + * gcc/config/microblaze/microblaze.c: (microblaze_must_save_register, + microblaze_expand_epilogue, microblaze_return_addr): Handle + calls_eh_return + (microblaze_eh_return): New function. + * gcc/config/microblaze/microblaze.h: Define RETURN_ADDR_OFFSET, + EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM, EH_RETURN_STACKADJ_RTX, + ASM_PREFERRED_EH_DATA_FORMAT + * gcc/config/microblaze/microblaze.md: Define eh_return pattern. + +Signed-off-by: David Holsgrove +Signed-off-by: Edgar E. Iglesias +--- + gcc/common/config/microblaze/microblaze-common.c | 3 --- + gcc/config/microblaze/microblaze-protos.h | 1 + + gcc/config/microblaze/microblaze.c | 29 ++++++++++++++++++++---- + gcc/config/microblaze/microblaze.h | 15 ++++++++++++ + gcc/config/microblaze/microblaze.md | 11 +++++++++ + 5 files changed, 52 insertions(+), 7 deletions(-) + +Index: b/gcc/common/config/microblaze/microblaze-common.c +=================================================================== +--- a/gcc/common/config/microblaze/microblaze-common.c ++++ b/gcc/common/config/microblaze/microblaze-common.c +@@ -37,7 +37,4 @@ + #undef TARGET_OPTION_OPTIMIZATION_TABLE + #define TARGET_OPTION_OPTIMIZATION_TABLE microblaze_option_optimization_table + +-#undef TARGET_EXCEPT_UNWIND_INFO +-#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info +- + struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER; +Index: b/gcc/config/microblaze/microblaze-protos.h +=================================================================== +--- a/gcc/config/microblaze/microblaze-protos.h ++++ b/gcc/config/microblaze/microblaze-protos.h +@@ -56,6 +56,7 @@ + extern int symbol_mentioned_p (rtx); + extern int label_mentioned_p (rtx); + extern bool microblaze_cannot_force_const_mem (machine_mode, rtx); ++extern void microblaze_eh_return (rtx op0); + #endif /* RTX_CODE */ + + /* Declare functions in microblaze-c.c. */ +Index: b/gcc/config/microblaze/microblaze.c +=================================================================== +--- a/gcc/config/microblaze/microblaze.c ++++ b/gcc/config/microblaze/microblaze.c +@@ -1959,6 +1959,11 @@ + if (frame_pointer_needed && (regno == HARD_FRAME_POINTER_REGNUM)) + return 1; + ++ if (crtl->calls_eh_return ++ && regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) { ++ return 1; ++ } ++ + if (!crtl->is_leaf) + { + if (regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) +@@ -1986,6 +1991,13 @@ + return 1; + } + ++ if (crtl->calls_eh_return ++ && (regno == EH_RETURN_DATA_REGNO (0) ++ || regno == EH_RETURN_DATA_REGNO (1))) ++ { ++ return 1; ++ } ++ + return 0; + } + +@@ -3067,6 +3079,12 @@ + emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, fsiz_rtx)); + } + ++ if (crtl->calls_eh_return) ++ emit_insn (gen_addsi3 (stack_pointer_rtx, ++ stack_pointer_rtx, ++ gen_rtx_raw_REG (SImode, ++ MB_EH_STACKADJ_REGNUM))); ++ + emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST + + MB_ABI_SUB_RETURN_ADDR_REGNUM))); + } +@@ -3364,10 +3382,13 @@ + if (count != 0) + return NULL_RTX; + +- return gen_rtx_PLUS (Pmode, +- get_hard_reg_initial_val (Pmode, +- MB_ABI_SUB_RETURN_ADDR_REGNUM), +- GEN_INT (8)); ++ return get_hard_reg_initial_val (Pmode, ++ MB_ABI_SUB_RETURN_ADDR_REGNUM); ++} ++ ++void microblaze_eh_return (rtx op0) ++{ ++ emit_insn (gen_movsi(gen_rtx_MEM(Pmode, stack_pointer_rtx), op0)); + } + + /* Queue an .ident string in the queue of top-level asm statements. +Index: b/gcc/config/microblaze/microblaze.h +=================================================================== +--- a/gcc/config/microblaze/microblaze.h ++++ b/gcc/config/microblaze/microblaze.h +@@ -184,6 +184,21 @@ + #define INCOMING_RETURN_ADDR_RTX \ + gen_rtx_REG (VOIDmode, GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM) + ++/* Specifies the offset from INCOMING_RETURN_ADDR_RTX and the actual return PC. */ ++#define RETURN_ADDR_OFFSET (8) ++ ++/* Describe how we implement __builtin_eh_return. */ ++#define EH_RETURN_DATA_REGNO(N) (((N) < 2) ? MB_ABI_FIRST_ARG_REGNUM + (N) : INVALID_REGNUM) ++ ++#define MB_EH_STACKADJ_REGNUM MB_ABI_INT_RETURN_VAL2_REGNUM ++#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, MB_EH_STACKADJ_REGNUM) ++ ++/* Select a format to encode pointers in exception handling data. CODE ++ is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is ++ true if the symbol may be affected by dynamic relocations. */ ++#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ ++ ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr) ++ + /* Use DWARF 2 debugging information by default. */ + #define DWARF2_DEBUGGING_INFO + #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG +Index: b/gcc/config/microblaze/microblaze.md +=================================================================== +--- a/gcc/config/microblaze/microblaze.md ++++ b/gcc/config/microblaze/microblaze.md +@@ -2272,4 +2272,15 @@ + (set_attr "mode" "SI") + (set_attr "length" "4")]) + ++; This is used in compiling the unwind routines. ++(define_expand "eh_return" ++ [(use (match_operand 0 "general_operand" ""))] ++ "" ++ " ++{ ++ microblaze_eh_return(operands[0]); ++ DONE; ++}") ++ + (include "sync.md") ++ diff --git a/patches/gcc/6.2.0/860-cilk-wchar.patch b/patches/gcc/6.2.0/860-cilk-wchar.patch new file mode 100644 index 00000000..1d9916f5 --- /dev/null +++ b/patches/gcc/6.2.0/860-cilk-wchar.patch @@ -0,0 +1,56 @@ +[PATCH] cilk: fix build without wchar + +When building against uClibc with wchar support disabled, WCHAR_MIN and +WCHAR_MAX are not defined leading to compilation errors. + +Fix it by only including the wchar code if available. + +Signed-off-by: Peter Korsgaard +--- + libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +Index: b/libcilkrts/include/cilk/reducer_min_max.h +=================================================================== +--- a/libcilkrts/include/cilk/reducer_min_max.h ++++ b/libcilkrts/include/cilk/reducer_min_max.h +@@ -3154,7 +3154,9 @@ + CILK_C_REDUCER_MAX_INSTANCE(char, char, CHAR_MIN) + CILK_C_REDUCER_MAX_INSTANCE(unsigned char, uchar, 0) + CILK_C_REDUCER_MAX_INSTANCE(signed char, schar, SCHAR_MIN) ++#ifdef WCHAR_MIN + CILK_C_REDUCER_MAX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN) ++#endif + CILK_C_REDUCER_MAX_INSTANCE(short, short, SHRT_MIN) + CILK_C_REDUCER_MAX_INSTANCE(unsigned short, ushort, 0) + CILK_C_REDUCER_MAX_INSTANCE(int, int, INT_MIN) +@@ -3306,7 +3308,9 @@ + CILK_C_REDUCER_MAX_INDEX_INSTANCE(char, char, CHAR_MIN) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned char, uchar, 0) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(signed char, schar, SCHAR_MIN) ++#ifdef WCHAR_MIN + CILK_C_REDUCER_MAX_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN) ++#endif + CILK_C_REDUCER_MAX_INDEX_INSTANCE(short, short, SHRT_MIN) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned short, ushort, 0) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(int, int, INT_MIN) +@@ -3432,7 +3436,9 @@ + CILK_C_REDUCER_MIN_INSTANCE(char, char, CHAR_MAX) + CILK_C_REDUCER_MIN_INSTANCE(unsigned char, uchar, CHAR_MAX) + CILK_C_REDUCER_MIN_INSTANCE(signed char, schar, SCHAR_MAX) ++#ifdef WCHAR_MAX + CILK_C_REDUCER_MIN_INSTANCE(wchar_t, wchar_t, WCHAR_MAX) ++#endif + CILK_C_REDUCER_MIN_INSTANCE(short, short, SHRT_MAX) + CILK_C_REDUCER_MIN_INSTANCE(unsigned short, ushort, USHRT_MAX) + CILK_C_REDUCER_MIN_INSTANCE(int, int, INT_MAX) +@@ -3584,7 +3590,9 @@ + CILK_C_REDUCER_MIN_INDEX_INSTANCE(char, char, CHAR_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned char, uchar, CHAR_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(signed char, schar, SCHAR_MAX) ++#ifdef WCHAR_MAX + CILK_C_REDUCER_MIN_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MAX) ++#endif + CILK_C_REDUCER_MIN_INDEX_INSTANCE(short, short, SHRT_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned short, ushort, USHRT_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(int, int, INT_MAX) -- cgit v1.2.3