diff options
Diffstat (limited to 'toolchain/gcc/patches/arc-2016.03')
18 files changed, 0 insertions, 885 deletions
diff --git a/toolchain/gcc/patches/arc-2016.03/001-revert_register_mode_search.patch b/toolchain/gcc/patches/arc-2016.03/001-revert_register_mode_search.patch deleted file mode 100644 index 162d651..0000000 --- a/toolchain/gcc/patches/arc-2016.03/001-revert_register_mode_search.patch +++ /dev/null @@ -1,65 +0,0 @@ -Revert of: - -commit 275035b56823b26d5fb7e90fad945b998648edf2 -Author: bergner <bergner@138bc75d-0d04-0410-961f-82ee72b054a4> -Date: Thu Sep 5 14:09:07 2013 +0000 - - PR target/58139 - * reginfo.c (choose_hard_reg_mode): Scan through all mode classes - looking for widest mode. - - - git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4 - - ---- a/gcc/reginfo.c -+++ b/gcc/reginfo.c -@@ -620,35 +620,40 @@ choose_hard_reg_mode (unsigned int regno - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - - if (found_mode != VOIDmode) diff --git a/toolchain/gcc/patches/arc-2016.03/002-weak_data_fix.patch b/toolchain/gcc/patches/arc-2016.03/002-weak_data_fix.patch deleted file mode 100644 index a740b4c..0000000 --- a/toolchain/gcc/patches/arc-2016.03/002-weak_data_fix.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- /dev/null -+++ b/gcc/testsuite/gcc.dg/visibility-21.c -@@ -0,0 +1,14 @@ -+/* PR target/32219 */ -+/* { dg-do run } */ -+/* { dg-require-visibility "" } */ -+/* { dg-options "-fPIC" { target fpic } } */ -+ -+extern void f() __attribute__((weak,visibility("hidden"))); -+extern int puts( char const* ); -+int main() -+{ -+ if (f) -+ f(); -+ return 0; -+} -+ ---- a/gcc/varasm.c -+++ b/gcc/varasm.c -@@ -6677,6 +6677,10 @@ default_binds_local_p_1 (const_tree exp, - /* Static variables are always local. */ - else if (! TREE_PUBLIC (exp)) - local_p = true; -+ /* hidden weak can't be overridden by something non-local, all -+ that is possible is that it is not defined at all. */ -+ else if (DECL_WEAK (exp)) -+ local_p = false; - /* A variable is local if the user has said explicitly that it will - be. */ - else if ((DECL_VISIBILITY_SPECIFIED (exp) -@@ -6690,11 +6694,6 @@ default_binds_local_p_1 (const_tree exp, - local. */ - else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT) - local_p = true; -- /* Default visibility weak data can be overridden by a strong symbol -- in another module and so are not local. */ -- else if (DECL_WEAK (exp) -- && !resolved_locally) -- local_p = false; - /* If PIC, then assume that any global name can be overridden by - symbols resolved from other modules. */ - else if (shlib) diff --git a/toolchain/gcc/patches/arc-2016.03/003-universal_initializer.patch b/toolchain/gcc/patches/arc-2016.03/003-universal_initializer.patch deleted file mode 100644 index 1b9a5b3..0000000 --- a/toolchain/gcc/patches/arc-2016.03/003-universal_initializer.patch +++ /dev/null @@ -1,94 +0,0 @@ ---- a/gcc/c/c-typeck.c -+++ b/gcc/c/c-typeck.c -@@ -62,9 +62,9 @@ int in_typeof; - if expr.original_code == SIZEOF_EXPR. */ - tree c_last_sizeof_arg; - --/* Nonzero if we've already printed a "missing braces around initializer" -- message within this initializer. */ --static int missing_braces_mentioned; -+/* Nonzero if we might need to print a "missing braces around -+ initializer" message within this initializer. */ -+static int found_missing_braces; - - static int require_constant_value; - static int require_constant_elements; -@@ -6363,6 +6363,9 @@ static int constructor_nonconst; - /* 1 if this constructor is erroneous so far. */ - static int constructor_erroneous; - -+/* 1 if this constructor is the universal zero initializer { 0 }. */ -+static int constructor_zeroinit; -+ - /* Structure for managing pending initializer elements, organized as an - AVL tree. */ - -@@ -6524,7 +6527,7 @@ start_init (tree decl, tree asmspec_tree - constructor_stack = 0; - constructor_range_stack = 0; - -- missing_braces_mentioned = 0; -+ found_missing_braces = 0; - - spelling_base = 0; - spelling_size = 0; -@@ -6619,6 +6622,7 @@ really_start_incremental_init (tree type - constructor_type = type; - constructor_incremental = 1; - constructor_designated = 0; -+ constructor_zeroinit = 1; - designator_depth = 0; - designator_erroneous = 0; - -@@ -6816,11 +6820,8 @@ push_init_level (int implicit, struct ob - set_nonincremental_init (braced_init_obstack); - } - -- if (implicit == 1 && warn_missing_braces && !missing_braces_mentioned) -- { -- missing_braces_mentioned = 1; -- warning_init (OPT_Wmissing_braces, "missing braces around initializer"); -- } -+ if (implicit == 1) -+ found_missing_braces = 1; - - if (TREE_CODE (constructor_type) == RECORD_TYPE - || TREE_CODE (constructor_type) == UNION_TYPE) -@@ -6953,16 +6954,23 @@ pop_init_level (int implicit, struct obs - } - } - -+ if (vec_safe_length (constructor_elements) != 1) -+ constructor_zeroinit = 0; -+ -+ /* Warn when some structs are initialized with direct aggregation. */ -+ if (!implicit && found_missing_braces && warn_missing_braces -+ && !constructor_zeroinit) -+ { -+ warning_init (OPT_Wmissing_braces, -+ "missing braces around initializer"); -+ } -+ - /* Warn when some struct elements are implicitly initialized to zero. */ - if (warn_missing_field_initializers - && constructor_type - && TREE_CODE (constructor_type) == RECORD_TYPE - && constructor_unfilled_fields) - { -- bool constructor_zeroinit = -- (vec_safe_length (constructor_elements) == 1 -- && integer_zerop ((*constructor_elements)[0].value)); -- - /* Do not warn for flexible array members or zero-length arrays. */ - while (constructor_unfilled_fields - && (!DECL_SIZE (constructor_unfilled_fields) -@@ -8077,6 +8085,9 @@ process_init_element (struct c_expr valu - designator_depth = 0; - designator_erroneous = 0; - -+ if (!implicit && value.value && !integer_zerop (value.value)) -+ constructor_zeroinit = 0; -+ - /* Handle superfluous braces around string cst as in - char x[] = {"foo"}; */ - if (string_flag diff --git a/toolchain/gcc/patches/arc-2016.03/004-case_insensitive.patch b/toolchain/gcc/patches/arc-2016.03/004-case_insensitive.patch deleted file mode 100644 index b3d2dbe..0000000 --- a/toolchain/gcc/patches/arc-2016.03/004-case_insensitive.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -43,11 +43,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/toolchain/gcc/patches/arc-2016.03/010-documentation.patch b/toolchain/gcc/patches/arc-2016.03/010-documentation.patch deleted file mode 100644 index 5548069..0000000 --- a/toolchain/gcc/patches/arc-2016.03/010-documentation.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -4327,18 +4327,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/toolchain/gcc/patches/arc-2016.03/020-no-plt-backport.patch b/toolchain/gcc/patches/arc-2016.03/020-no-plt-backport.patch deleted file mode 100644 index b225376..0000000 --- a/toolchain/gcc/patches/arc-2016.03/020-no-plt-backport.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/gcc/calls.c -+++ b/gcc/calls.c -@@ -176,6 +176,12 @@ prepare_call_address (tree fndecl, rtx f - && targetm.small_register_classes_for_mode_p (FUNCTION_MODE)) - ? force_not_mem (memory_address (FUNCTION_MODE, funexp)) - : memory_address (FUNCTION_MODE, funexp)); -+ else if (flag_pic && !flag_plt && fndecl -+ && TREE_CODE (fndecl) == FUNCTION_DECL -+ && !targetm.binds_local_p (fndecl)) -+ { -+ funexp = force_reg (Pmode, funexp); -+ } - else if (! sibcallp) - { - #ifndef NO_FUNCTION_CSE ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -1617,6 +1617,10 @@ fpie - Common Report Var(flag_pie,1) Negative(fPIC) - Generate position-independent code for executables if possible (small mode) - -+fplt -+Common Report Var(flag_plt) Init(1) -+Use PLT for PIC calls (-fno-plt: load the address from GOT at call site) -+ - fplugin= - Common Joined RejectNegative Var(common_deferred_options) Defer - Specify a plugin to load diff --git a/toolchain/gcc/patches/arc-2016.03/210-disable_libsanitizer_off_t_check.patch b/toolchain/gcc/patches/arc-2016.03/210-disable_libsanitizer_off_t_check.patch deleted file mode 100644 index 5608469..0000000 --- a/toolchain/gcc/patches/arc-2016.03/210-disable_libsanitizer_off_t_check.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libsanitizer/interception/interception_type_test.cc -+++ b/libsanitizer/interception/interception_type_test.cc -@@ -31,7 +31,7 @@ COMPILER_CHECK(sizeof(OFF64_T) == sizeof - // rest (they depend on _FILE_OFFSET_BITS setting when building an application). - # if defined(__ANDROID__) || !defined _FILE_OFFSET_BITS || \ - _FILE_OFFSET_BITS != 64 --COMPILER_CHECK(sizeof(OFF_T) == sizeof(off_t)); -+// COMPILER_CHECK(sizeof(OFF_T) == sizeof(off_t)); - # endif - - #endif diff --git a/toolchain/gcc/patches/arc-2016.03/800-arc-disablelibgmon.patch b/toolchain/gcc/patches/arc-2016.03/800-arc-disablelibgmon.patch deleted file mode 100644 index 612883c..0000000 --- a/toolchain/gcc/patches/arc-2016.03/800-arc-disablelibgmon.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/libgcc/config.host b/libgcc/config.host -index e768389..aec10c7 100644 ---- a/libgcc/config.host -+++ b/libgcc/config.host -@@ -320,11 +320,11 @@ alpha*-dec-*vms*) - ;; - arc*-*-elf*) - tmake_file="arc/t-arc-newlib arc/t-arc" -- extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o libgmon.a crtg.o crtgend.o crttls_r25.o crttls_r30.o" -+ extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o crtg.o crtgend.o crttls_r25.o crttls_r30.o" - ;; - arc*-*-linux-uclibc*) - tmake_file="${tmake_file} t-slibgcc-libgcc t-slibgcc-nolc-override arc/t-arc700-uClibc arc/t-arc" -- extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o libgmon.a crtg.o crtgend.o" -+ extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o crtg.o crtgend.o" - ;; - arm-wrs-vxworks) - tmake_file="$tmake_file arm/t-arm arm/t-vxworks t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" diff --git a/toolchain/gcc/patches/arc-2016.03/820-libgcc_pic.patch b/toolchain/gcc/patches/arc-2016.03/820-libgcc_pic.patch deleted file mode 100644 index 7a0ac73..0000000 --- a/toolchain/gcc/patches/arc-2016.03/820-libgcc_pic.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -865,11 +865,12 @@ $(libgcov-objects): %$(objext): $(srcdir - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -891,7 +892,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_E - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - endif -@@ -1058,6 +1059,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/toolchain/gcc/patches/arc-2016.03/850-use_shared_libgcc.patch b/toolchain/gcc/patches/arc-2016.03/850-use_shared_libgcc.patch deleted file mode 100644 index 6934bc9..0000000 --- a/toolchain/gcc/patches/arc-2016.03/850-use_shared_libgcc.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -131,10 +131,6 @@ - #define ENDFILE_SPEC \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -51,6 +51,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_assert ("system=posix"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic is the default C library and whether - -muclibc or -mglibc or -mbionic has been passed to change the default. */ ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -132,5 +132,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -61,6 +61,9 @@ - #undef CPLUSPLUS_CPP_SPEC - #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" - diff --git a/toolchain/gcc/patches/arc-2016.03/851-libgcc_no_compat.patch b/toolchain/gcc/patches/arc-2016.03/851-libgcc_no_compat.patch deleted file mode 100644 index 80c3476..0000000 --- a/toolchain/gcc/patches/arc-2016.03/851-libgcc_no_compat.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/toolchain/gcc/patches/arc-2016.03/860-use_eh_frame.patch b/toolchain/gcc/patches/arc-2016.03/860-use_eh_frame.patch deleted file mode 100644 index 1ac83fe..0000000 --- a/toolchain/gcc/patches/arc-2016.03/860-use_eh_frame.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/libgcc/unwind-dw2-fde-dip.c -+++ b/libgcc/unwind-dw2-fde-dip.c -@@ -46,33 +46,13 @@ - #include "unwind-compat.h" - #include "gthr.h" - --#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ -- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) --# define USE_PT_GNU_EH_FRAME --#endif -- --#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -- && defined(__BIONIC__) --# define USE_PT_GNU_EH_FRAME --#endif -- --#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -- && defined(__FreeBSD__) && __FreeBSD__ >= 7 --# define ElfW __ElfN --# define USE_PT_GNU_EH_FRAME --#endif -- --#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -- && defined(__OpenBSD__) --# define ElfW(type) Elf_##type --# define USE_PT_GNU_EH_FRAME --#endif -- --#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -- && defined(TARGET_DL_ITERATE_PHDR) \ -- && defined(__sun__) && defined(__svr4__) -+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) - # define USE_PT_GNU_EH_FRAME -+# ifdef __OpenBSD__ -+# define ElfW(type) Elf_##type -+# elif defined(__FreeBSD__) && __FreeBSD__ >= 7 -+# define ElfW __ElfN -+# endif - #endif - - #if defined(USE_PT_GNU_EH_FRAME) diff --git a/toolchain/gcc/patches/arc-2016.03/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/arc-2016.03/870-ppc_no_crtsavres.patch deleted file mode 100644 index 4b7fcbd..0000000 --- a/toolchain/gcc/patches/arc-2016.03/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/rs6000/rs6000.c -+++ b/gcc/config/rs6000/rs6000.c -@@ -17662,7 +17662,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/toolchain/gcc/patches/arc-2016.03/880-no_java_section.patch b/toolchain/gcc/patches/arc-2016.03/880-no_java_section.patch deleted file mode 100644 index def6c9f..0000000 --- a/toolchain/gcc/patches/arc-2016.03/880-no_java_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/defaults.h -+++ b/gcc/defaults.h -@@ -380,7 +380,7 @@ see the files COPYING3 and COPYING.RUNTI - /* If we have named section and we support weak symbols, then use the - .jcr section for recording java classes which need to be registered - at program start-up time. */ --#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK -+#if 0 && defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK - #ifndef JCR_SECTION_NAME - #define JCR_SECTION_NAME ".jcr" - #endif diff --git a/toolchain/gcc/patches/arc-2016.03/910-mbsd_multi.patch b/toolchain/gcc/patches/arc-2016.03/910-mbsd_multi.patch deleted file mode 100644 index 5387f8e..0000000 --- a/toolchain/gcc/patches/arc-2016.03/910-mbsd_multi.patch +++ /dev/null @@ -1,253 +0,0 @@ - - This patch brings over a few features from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - * -Werror-maybe-reset - Has the effect of -Wno-error if GCC_NO_WERROR is - set and not '0', a no-operation otherwise. This is - to be able to use -Werror in "make" but prevent - GNU autoconf generated configure scripts from - freaking out. - * Make -fno-strict-aliasing and -fno-delete-null-pointer-checks - the default for -O2/-Os, because they trigger gcc bugs - and can delete code with security implications. - - This patch was authored by Thorsten Glaser <tg at mirbsd.de> - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -104,6 +104,9 @@ static size_t include_cursor; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -383,6 +386,9 @@ c_common_handle_option (size_t scode, co - cpp_opts->warn_endif_labels = value; - break; - -+ case OPT_Werror_maybe_reset: -+ break; -+ - case OPT_Winvalid_pch: - cpp_opts->warn_invalid_pch = value; - break; -@@ -491,6 +497,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1027,6 +1039,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -379,6 +379,10 @@ Werror-implicit-function-declaration - C ObjC RejectNegative Warning Alias(Werror=, implicit-function-declaration) - This switch is deprecated; use -Werror=implicit-function-declaration instead - -+Werror-maybe-reset -+C ObjC C++ ObjC++ -+; Documented in common.opt -+ - Wfloat-equal - C ObjC C++ ObjC++ Var(warn_float_equal) Warning - Warn if testing floating point numbers for equality -@@ -949,6 +953,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ Ignore Warn(switch %qs is no longer supported) - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -541,6 +541,10 @@ Werror= - Common Joined - Treat specified warning as error - -+Werror-maybe-reset -+Common -+If environment variable GCC_NO_WERROR is set, act as -Wno-error -+ - Wextra - Common Var(extra_warnings) Warning - Print extra (possibly unwanted) warnings -@@ -1242,6 +1246,9 @@ fguess-branch-probability - Common Report Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -468,8 +468,6 @@ static const struct default_options defa - { OPT_LEVELS_2_PLUS, OPT_fschedule_insns2, NULL, 1 }, - #endif - { OPT_LEVELS_2_PLUS, OPT_fregmove, NULL, 1 }, -- { OPT_LEVELS_2_PLUS, OPT_fstrict_aliasing, NULL, 1 }, -- { OPT_LEVELS_2_PLUS, OPT_fstrict_overflow, NULL, 1 }, - { OPT_LEVELS_2_PLUS, OPT_freorder_blocks, NULL, 1 }, - { OPT_LEVELS_2_PLUS, OPT_freorder_functions, NULL, 1 }, - { OPT_LEVELS_2_PLUS, OPT_ftree_vrp, NULL, 1 }, -@@ -489,6 +487,8 @@ static const struct default_options defa - { OPT_LEVELS_2_PLUS, OPT_fhoist_adjacent_loads, NULL, 1 }, - - /* -O3 optimizations. */ -+ { OPT_LEVELS_3_PLUS, OPT_fstrict_aliasing, NULL, 1 }, -+ { OPT_LEVELS_3_PLUS, OPT_fstrict_overflow, NULL, 1 }, - { OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 }, - { OPT_LEVELS_3_PLUS, OPT_fpredictive_commoning, NULL, 1 }, - /* Inlining of functions reducing size is a good idea with -Os -@@ -1435,6 +1435,17 @@ common_handle_option (struct gcc_options - opts, opts_set, loc, dc); - break; - -+ case OPT_Werror_maybe_reset: -+ { -+ char *ev = getenv ("GCC_NO_WERROR"); -+ if ((ev != NULL) && (*ev != '0')) -+ warnings_are_errors = 0; -+ } -+ break; -+ -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Wlarger_than_: - opts->x_larger_than_size = value; - opts->x_warn_larger_than = value != -1; ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -163,6 +163,11 @@ in older programs. This warning is on b - Make all warnings into hard errors. Source code which triggers warnings - will be rejected. - -+ at item -Werror-maybe-reset -+ at opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ - @item -Wsystem-headers - @opindex Wsystem-headers - Issue warnings for code in system headers. These are normally unhelpful ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -240,7 +240,7 @@ Objective-C and Objective-C++ Dialects}. - -Wconversion -Wcoverage-mismatch -Wno-cpp -Wno-deprecated @gol - -Wno-deprecated-declarations -Wdisabled-optimization @gol - -Wno-div-by-zero -Wdouble-promotion -Wempty-body -Wenum-compare @gol ---Wno-endif-labels -Werror -Werror=* @gol -+-Wno-endif-labels -Werror -Werror=* -Werror-maybe-reset @gol - -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol - -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol - -Wformat-security -Wformat-y2k @gol -@@ -4817,6 +4817,22 @@ This option is only supported for C and - @option{-Wall} and by @option{-Wpedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+ at item -Werror-maybe-reset -+ at opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ -+ at item -fhonour-copts -+ at opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector -@@ -6928,7 +6944,7 @@ so, the first branch is redirected to ei - second branch or a point immediately following it, depending on whether - the condition is known to be true or false. - --Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -+Enabled at levels @option{-O3}. - - @item -fsplit-wide-types - @opindex fsplit-wide-types ---- a/gcc/java/jvspec.c -+++ b/gcc/java/jvspec.c -@@ -626,6 +626,7 @@ lang_specific_pre_link (void) - class name. Append dummy `.c' that can be stripped by set_input so %b - is correct. */ - set_input (concat (main_class_name, "main.c", NULL)); -+ putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack! */ - err = do_spec (jvgenmain_spec); - if (err == 0) - { diff --git a/toolchain/gcc/patches/arc-2016.03/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/arc-2016.03/920-specs_nonfatal_getenv.patch deleted file mode 100644 index 09768f5..0000000 --- a/toolchain/gcc/patches/arc-2016.03/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -8029,7 +8029,10 @@ getenv_spec_function (int argc, const ch - - value = getenv (argv[0]); - if (!value) -- fatal_error ("environment variable %qs not defined", argv[0]); -+ { -+ warning (0, "environment variable %qs not defined", argv[0]); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/toolchain/gcc/patches/arc-2016.03/940-no-clobber-stamp-bits.patch b/toolchain/gcc/patches/arc-2016.03/940-no-clobber-stamp-bits.patch deleted file mode 100644 index dbecef2..0000000 --- a/toolchain/gcc/patches/arc-2016.03/940-no-clobber-stamp-bits.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libstdc++-v3/include/Makefile.in -+++ b/libstdc++-v3/include/Makefile.in -@@ -1342,7 +1342,7 @@ - @$(STAMP) stamp-bits - - stamp-bits-sup: stamp-bits ${bits_sup_headers} -- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null -+ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null - @$(STAMP) stamp-bits-sup - - stamp-c_base: ${c_base_headers} diff --git a/toolchain/gcc/patches/arc-2016.03/950-fix-building-with-gcc6.patch b/toolchain/gcc/patches/arc-2016.03/950-fix-building-with-gcc6.patch deleted file mode 100644 index e958380..0000000 --- a/toolchain/gcc/patches/arc-2016.03/950-fix-building-with-gcc6.patch +++ /dev/null @@ -1,153 +0,0 @@ -From 5dce741e00f86a08a4c174fb3605d896f210ab52 Mon Sep 17 00:00:00 2001 -From: Bernd Edlinger <bernd.edlinger@hotmail.de> -Date: Wed, 27 Jul 2016 13:30:03 +0300 -Subject: [PATCH] 2016-02-19 Jakub Jelinek <jakub@redhat.com> Bernd Edlinger - <bernd.edlinger@hotmail.de> - - * Make-lang.in: Invoke gperf with -L C++. - * cfns.gperf: Remove prototypes for hash and libc_name_p - inlines. - * cfns.h: Regenerated. - * except.c (nothrow_libfn_p): Adjust. - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233572138bc75d-0d04-0410-961f-82ee72b054a4 - -This patch fixes building of gcc-4.x by gcc-6.x, for more details see -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69959 - -Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> ---- - gcc/cp/Make-lang.in | 2 +- - gcc/cp/cfns.gperf | 10 ++-------- - gcc/cp/cfns.h | 41 ++++++++++++++--------------------------- - gcc/cp/except.c | 3 ++- - 4 files changed, 19 insertions(+), 37 deletions(-) - -diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in -index dce523a..36a1a97 100644 ---- a/gcc/cp/Make-lang.in -+++ b/gcc/cp/Make-lang.in -@@ -115,7 +115,7 @@ else - # deleting the $(srcdir)/cp/cfns.h file. - $(srcdir)/cp/cfns.h: - endif -- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \ -+ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \ - $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h - - # -diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf -index c4c4e2a..5c40933 100644 ---- a/gcc/cp/cfns.gperf -+++ b/gcc/cp/cfns.gperf -@@ -1,3 +1,5 @@ -+%language=C++ -+%define class-name libc_name - %{ - /* Copyright (C) 2000-2013 Free Software Foundation, Inc. - -@@ -16,14 +18,6 @@ for more details. - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - <http://www.gnu.org/licenses/>. */ --#ifdef __GNUC__ --__inline --#endif --static unsigned int hash (const char *, unsigned int); --#ifdef __GNUC__ --__inline --#endif --const char * libc_name_p (const char *, unsigned int); - %} - %% - # The standard C library functions, for feeding to gperf; the result is used -diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h -index 42dd3cf..6c79864 100644 ---- a/gcc/cp/cfns.h -+++ b/gcc/cp/cfns.h -@@ -1,5 +1,5 @@ --/* ANSI-C code produced by gperf version 3.0.3 */ --/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */ -+/* C++ code produced by gperf version 3.0.4 */ -+/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */ - - #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ - && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ -@@ -28,7 +28,7 @@ - #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." - #endif - --#line 1 "cfns.gperf" -+#line 3 "cfns.gperf" - - /* Copyright (C) 2000-2013 Free Software Foundation, Inc. - -@@ -47,25 +47,18 @@ for more details. - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - <http://www.gnu.org/licenses/>. */ --#ifdef __GNUC__ --__inline --#endif --static unsigned int hash (const char *, unsigned int); --#ifdef __GNUC__ --__inline --#endif --const char * libc_name_p (const char *, unsigned int); - /* maximum key range = 391, duplicates = 0 */ - --#ifdef __GNUC__ --__inline --#else --#ifdef __cplusplus --inline --#endif --#endif --static unsigned int --hash (register const char *str, register unsigned int len) -+class libc_name -+{ -+private: -+ static inline unsigned int hash (const char *str, unsigned int len); -+public: -+ static const char *libc_name_p (const char *str, unsigned int len); -+}; -+ -+inline unsigned int -+libc_name::hash (register const char *str, register unsigned int len) - { - static const unsigned short asso_values[] = - { -@@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len) - return hval + asso_values[(unsigned char)str[len - 1]]; - } - --#ifdef __GNUC__ --__inline --#ifdef __GNUC_STDC_INLINE__ --__attribute__ ((__gnu_inline__)) --#endif --#endif - const char * --libc_name_p (register const char *str, register unsigned int len) -+libc_name::libc_name_p (register const char *str, register unsigned int len) - { - enum - { -diff --git a/gcc/cp/except.c b/gcc/cp/except.c -index 604f274..c3298cb 100644 ---- a/gcc/cp/except.c -+++ b/gcc/cp/except.c -@@ -1025,7 +1025,8 @@ nothrow_libfn_p (const_tree fn) - unless the system headers are playing rename tricks, and if - they are, we don't want to be confused by them. */ - id = DECL_NAME (fn); -- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id)); -+ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id), -+ IDENTIFIER_LENGTH (id)); - } - - /* Returns nonzero if an exception of type FROM will be caught by a --- -2.7.4 - |