diff options
Diffstat (limited to 'toolchain/gcc')
-rw-r--r-- | toolchain/gcc/Makefile | 4 | ||||
-rw-r--r-- | toolchain/gcc/Makefile.inc | 5 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.4.6/cflags.patch | 269 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.4.6/gcc-avr32.patch | 25993 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.5.3/cflags.patch | 253 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.5.3/mirbsd-compat.patch | 12 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.5.3/no-lib64.patch | 100 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.6.3/cflags.patch | 253 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.6.3/no-lib64.patch | 100 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.6.3/siginfo.patch | 27 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.7.2/cflags.patch | 241 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.7.2/uclibc-ld-path.patch | 14 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.7.3/musl-cris.patch | 11 |
13 files changed, 0 insertions, 27282 deletions
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index 036a4afb2..4044ead03 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -61,13 +61,9 @@ endif ifeq ($(ARCH),m68k) GCC_CONFOPTS+= --disable-tls -else -ifeq ($(ARCH),cris) -GCC_CONFOPTS+= --disable-tls else GCC_CONFOPTS+= --enable-tls endif -endif ifeq ($(ARCH),powerpc) GCC_CONFOPTS+= --disable-target-optspace --with-long-double-64 --enable-secureplt diff --git a/toolchain/gcc/Makefile.inc b/toolchain/gcc/Makefile.inc index a3dc0f748..689de3b63 100644 --- a/toolchain/gcc/Makefile.inc +++ b/toolchain/gcc/Makefile.inc @@ -3,10 +3,6 @@ PKG_NAME:= gcc -ifeq ($(ADK_LINUX_AVR32),y) -PKG_VERSION:= 4.4.6 -PKG_MD5SUM:= ab525d429ee4425050a554bc9247d6c4 -else ifeq ($(ADK_LINUX_MICROBLAZE),y) PKG_VERSION:= 4.8.2 PKG_MD5SUM:= a3d7d63b9cb6b6ea049469a0c4a43c9d @@ -14,7 +10,6 @@ else PKG_VERSION:= 4.7.3 PKG_MD5SUM:= 86f428a30379bdee0224e353ee2f999e endif -endif PKG_RELEASE:= 1 PKG_SITES:= ${MASTER_SITE_GNU:=gcc/gcc-${PKG_VERSION}/} diff --git a/toolchain/gcc/patches/4.4.6/cflags.patch b/toolchain/gcc/patches/4.4.6/cflags.patch deleted file mode 100644 index 1b17e983e..000000000 --- a/toolchain/gcc/patches/4.4.6/cflags.patch +++ /dev/null @@ -1,269 +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-opts.c -+++ b/gcc/c-opts.c -@@ -105,6 +105,9 @@ static size_t deferred_count; - /* Number of deferred options scanned for -include. */ - static size_t include_cursor; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void set_Wimplicit (int); - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); -@@ -454,6 +457,14 @@ c_common_handle_option (size_t scode, co - enable_warning_as_error ("implicit-function-declaration", value, CL_C | CL_ObjC); - break; - -+ case OPT_Werror_maybe_reset: -+ { -+ char *ev = getenv ("GCC_NO_WERROR"); -+ if ((ev != NULL) && (*ev != '0')) -+ cpp_opts->warnings_are_errors = 0; -+ } -+ break; -+ - case OPT_Wformat: - set_Wformat (value); - break; -@@ -690,6 +701,12 @@ c_common_handle_option (size_t scode, co - flag_exceptions = value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fimplement_inlines: - flag_implement_inlines = value; - break; -@@ -1209,6 +1226,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.opt -+++ b/gcc/c.opt -@@ -215,6 +215,10 @@ Werror-implicit-function-declaration - C ObjC RejectNegative Warning - 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 -@@ -613,6 +617,9 @@ C++ ObjC++ Optimization - fhonor-std - C++ ObjC++ - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -102,6 +102,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 Warning - Print extra (possibly unwanted) warnings -@@ -573,6 +577,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 -@@ -898,9 +898,6 @@ decode_options (unsigned int argc, const - flag_schedule_insns_after_reload = opt2; - #endif - flag_regmove = opt2; -- flag_strict_aliasing = opt2; -- flag_strict_overflow = opt2; -- flag_delete_null_pointer_checks = opt2; - flag_reorder_blocks = opt2; - flag_reorder_functions = opt2; - flag_tree_vrp = opt2; -@@ -924,6 +921,9 @@ decode_options (unsigned int argc, const - - /* -O3 optimizations. */ - opt3 = (optimize >= 3); -+ flag_strict_aliasing = opt3; -+ flag_strict_overflow = opt3; -+ flag_delete_null_pointer_checks = opt3; - flag_predictive_commoning = opt3; - flag_inline_functions = opt3; - flag_unswitch_loops = opt3; -@@ -1603,6 +1603,17 @@ common_handle_option (size_t scode, cons - enable_warning_as_error (arg, value, lang_mask); - 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_Wextra: - set_Wextra (value); - break; ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -164,6 +164,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 -@@ -234,7 +234,7 @@ Objective-C and Objective-C++ Dialects}. - -Wconversion -Wcoverage-mismatch -Wno-deprecated @gol - -Wno-deprecated-declarations -Wdisabled-optimization @gol - -Wno-div-by-zero -Wempty-body -Wenum-compare -Wno-endif-labels @gol ---Werror -Werror=* @gol -+-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 -@@ -4182,6 +4182,22 @@ This option is only supported for C and - @option{-Wall} and by @option{-pedantic}, 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 -@@ -5721,7 +5737,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 -@@ -5866,7 +5882,7 @@ safely dereference null pointers. Use - @option{-fno-delete-null-pointer-checks} to disable this optimization - for programs which depend on that behavior. - --Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -+Enabled at levels @option{-O3}. - - @item -fexpensive-optimizations - @opindex fexpensive-optimizations ---- a/gcc/java/jvspec.c -+++ b/gcc/java/jvspec.c -@@ -670,6 +670,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/4.4.6/gcc-avr32.patch b/toolchain/gcc/patches/4.4.6/gcc-avr32.patch deleted file mode 100644 index f348cba9c..000000000 --- a/toolchain/gcc/patches/4.4.6/gcc-avr32.patch +++ /dev/null @@ -1,25993 +0,0 @@ -diff -Nur gcc-4.4.6.orig/gcc/builtins.c gcc-4.4.6/gcc/builtins.c ---- gcc-4.4.6.orig/gcc/builtins.c 2010-12-07 19:56:56.000000000 +0100 -+++ gcc-4.4.6/gcc/builtins.c 2011-10-22 19:23:08.512581300 +0200 -@@ -11108,7 +11108,7 @@ - - do - { -- code = va_arg (ap, enum tree_code); -+ code = va_arg (ap, int); - switch (code) - { - case 0: -diff -Nur gcc-4.4.6.orig/gcc/calls.c gcc-4.4.6/gcc/calls.c ---- gcc-4.4.6.orig/gcc/calls.c 2010-09-24 17:07:36.000000000 +0200 -+++ gcc-4.4.6/gcc/calls.c 2011-10-22 19:23:08.512581300 +0200 -@@ -3447,7 +3447,7 @@ - for (; count < nargs; count++) - { - rtx val = va_arg (p, rtx); -- enum machine_mode mode = va_arg (p, enum machine_mode); -+ enum machine_mode mode = va_arg (p, int); - - /* We cannot convert the arg value to the mode the library wants here; - must do it earlier where we know the signedness of the arg. */ -diff -Nur gcc-4.4.6.orig/gcc/config/avr32/avr32-elf.h gcc-4.4.6/gcc/config/avr32/avr32-elf.h ---- gcc-4.4.6.orig/gcc/config/avr32/avr32-elf.h 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.6/gcc/config/avr32/avr32-elf.h 2011-10-22 19:23:08.516581300 +0200 -@@ -0,0 +1,91 @@ -+/* -+ Elf specific definitions. -+ Copyright 2003,2004,2005,2006,2007,2008,2009 Atmel Corporation. -+ -+ This file is part of GCC. -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -+ -+ -+/***************************************************************************** -+ * Controlling the Compiler Driver, 'gcc' -+ *****************************************************************************/ -+ -+/* Run-time Target Specification. */ -+#undef TARGET_VERSION -+#define TARGET_VERSION fputs (" (AVR32 GNU with ELF)", stderr); -+ -+/* -+Another C string constant used much like LINK_SPEC. The -+difference between the two is that STARTFILE_SPEC is used at -+the very beginning of the command given to the linker. -+ -+If this macro is not defined, a default is provided that loads the -+standard C startup file from the usual place. See gcc.c. -+*/ -+#if 0 -+#undef STARTFILE_SPEC -+#define STARTFILE_SPEC "crt0%O%s crti%O%s crtbegin%O%s" -+#endif -+#undef STARTFILE_SPEC -+#define STARTFILE_SPEC "%{mflashvault: crtfv.o%s} %{!mflashvault: crt0.o%s} \ -+ crti.o%s crtbegin.o%s" -+ -+#undef LINK_SPEC -+#define LINK_SPEC "%{muse-oscall:--defsym __do_not_use_oscall_coproc__=0} %{mrelax|O*:%{mno-relax|O0|O1: ;:--relax}} %{mpart=uc3a3revd:-mavr32elf_uc3a3256s;:%{mpart=*:-mavr32elf_%*}} %{mcpu=*:-mavr32elf_%*}" -+ -+ -+/* -+Another C string constant used much like LINK_SPEC. The -+difference between the two is that ENDFILE_SPEC is used at -+the very end of the command given to the linker. -+ -+Do not define this macro if it does not need to do anything. -+*/ -+#undef ENDFILE_SPEC -+#define ENDFILE_SPEC "crtend%O%s crtn%O%s" -+ -+ -+/* Target CPU builtins. */ -+#define TARGET_CPU_CPP_BUILTINS() \ -+ do \ -+ { \ -+ builtin_define ("__avr32__"); \ -+ builtin_define ("__AVR32__"); \ -+ builtin_define ("__AVR32_ELF__"); \ -+ builtin_define (avr32_part->macro); \ -+ builtin_define (avr32_arch->macro); \ -+ if (avr32_arch->uarch_type == UARCH_TYPE_AVR32A) \ -+ builtin_define ("__AVR32_AVR32A__"); \ -+ else \ -+ builtin_define ("__AVR32_AVR32B__"); \ -+ if (TARGET_UNALIGNED_WORD) \ -+ builtin_define ("__AVR32_HAS_UNALIGNED_WORD__"); \ -+ if (TARGET_SIMD) \ -+ builtin_define ("__AVR32_HAS_SIMD__"); \ -+ if (TARGET_DSP) \ -+ builtin_define ("__AVR32_HAS_DSP__"); \ -+ if (TARGET_RMW) \ -+ builtin_define ("__AVR32_HAS_RMW__"); \ -+ if (TARGET_BRANCH_PRED) \ -+ builtin_define ("__AVR32_HAS_BRANCH_PRED__"); \ -+ if (TARGET_FAST_FLOAT) \ -+ builtin_define ("__AVR32_FAST_FLOAT__"); \ -+ if (TARGET_FLASHVAULT) \ -+ builtin_define ("__AVR32_FLASHVAULT__"); \ -+ if (TARGET_NO_MUL_INSNS) \ -+ builtin_define ("__AVR32_NO_MUL__"); \ -+ } \ -+ while (0) -diff -Nur gcc-4.4.6.orig/gcc/config/avr32/avr32-modes.def gcc-4.4.6/gcc/config/avr32/avr32-modes.def ---- gcc-4.4.6.orig/gcc/config/avr32/avr32-modes.def 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.6/gcc/config/avr32/avr32-modes.def 2011-10-22 19:23:08.524581303 +0200 -@@ -0,0 +1 @@ -+VECTOR_MODES (INT, 4); /* V4QI V2HI */ -diff -Nur gcc-4.4.6.orig/gcc/config/avr32/avr32-protos.h gcc-4.4.6/gcc/config/avr32/avr32-protos.h ---- gcc-4.4.6.orig/gcc/config/avr32/avr32-protos.h 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.6/gcc/config/avr32/avr32-protos.h 2011-10-22 19:23:08.524581303 +0200 -@@ -0,0 +1,196 @@ -+/* -+ Prototypes for exported functions defined in avr32.c -+ Copyright 2003,2004,2005,2006,2007,2008,2009 Atmel Corporation. -+ -+ This file is part of GCC. -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -+ -+ -+#ifndef AVR32_PROTOS_H -+#define AVR32_PROTOS_H -+ -+extern const int swap_reg[]; -+ -+extern int avr32_valid_macmac_bypass (rtx, rtx); -+extern int avr32_valid_mulmac_bypass (rtx, rtx); -+ -+extern int avr32_decode_lcomm_symbol_offset (rtx, int *); -+extern void avr32_encode_lcomm_symbol_offset (tree, char *, int); -+ -+extern const char *avr32_strip_name_encoding (const char *); -+ -+extern rtx avr32_get_note_reg_equiv (rtx insn); -+ -+extern int avr32_use_return_insn (int iscond); -+ -+extern void avr32_make_reglist16 (int reglist16_vect, char *reglist16_string); -+ -+extern void avr32_make_reglist8 (int reglist8_vect, char *reglist8_string); -+extern void avr32_make_fp_reglist_w (int reglist_mask, char *reglist_string); -+extern void avr32_make_fp_reglist_d (int reglist_mask, char *reglist_string); -+ -+extern void avr32_output_return_instruction (int single_ret_inst, -+ int iscond, rtx cond, -+ rtx r12_imm); -+extern void avr32_expand_prologue (void); -+extern void avr32_set_return_address (rtx source, rtx scratch); -+ -+extern int avr32_hard_regno_mode_ok (int regno, enum machine_mode mode); -+extern int avr32_extra_constraint_s (rtx value, const int strict); -+extern int avr32_eh_return_data_regno (const int n); -+extern int avr32_initial_elimination_offset (const int from, const int to); -+extern rtx avr32_function_arg (CUMULATIVE_ARGS * cum, enum machine_mode mode, -+ tree type, int named); -+extern void avr32_init_cumulative_args (CUMULATIVE_ARGS * cum, tree fntype, -+ rtx libname, tree fndecl); -+extern void avr32_function_arg_advance (CUMULATIVE_ARGS * cum, -+ enum machine_mode mode, -+ tree type, int named); -+#ifdef ARGS_SIZE_RTX -+/* expr.h defines ARGS_SIZE_RTX and `enum direction'. */ -+extern enum direction avr32_function_arg_padding (enum machine_mode mode, -+ tree type); -+#endif /* ARGS_SIZE_RTX */ -+extern rtx avr32_function_value (tree valtype, tree func, bool outgoing); -+extern rtx avr32_libcall_value (enum machine_mode mode); -+extern int avr32_sched_use_dfa_pipeline_interface (void); -+extern bool avr32_return_in_memory (tree type, tree fntype); -+extern void avr32_regs_to_save (char *operand); -+extern void avr32_target_asm_function_prologue (FILE * file, -+ HOST_WIDE_INT size); -+extern void avr32_target_asm_function_epilogue (FILE * file, -+ HOST_WIDE_INT size); -+extern void avr32_trampoline_template (FILE * file); -+extern void avr32_initialize_trampoline (rtx addr, rtx fnaddr, -+ rtx static_chain); -+extern int avr32_legitimate_address (enum machine_mode mode, rtx x, -+ int strict); -+extern int avr32_legitimate_constant_p (rtx x); -+ -+extern int avr32_legitimate_pic_operand_p (rtx x); -+ -+extern rtx avr32_find_symbol (rtx x); -+extern void avr32_select_section (rtx exp, int reloc, int align); -+extern void avr32_encode_section_info (tree decl, rtx rtl, int first); -+extern void avr32_asm_file_end (FILE * stream); -+extern void avr32_asm_output_ascii (FILE * stream, char *ptr, int len); -+extern void avr32_asm_output_common (FILE * stream, const char *name, -+ int size, int rounded); -+extern void avr32_asm_output_label (FILE * stream, const char *name); -+extern void avr32_asm_declare_object_name (FILE * stream, char *name, -+ tree decl); -+extern void avr32_asm_globalize_label (FILE * stream, const char *name); -+extern void avr32_asm_weaken_label (FILE * stream, const char *name); -+extern void avr32_asm_output_external (FILE * stream, tree decl, -+ const char *name); -+extern void avr32_asm_output_external_libcall (FILE * stream, rtx symref); -+extern void avr32_asm_output_labelref (FILE * stream, const char *name); -+extern void avr32_notice_update_cc (rtx exp, rtx insn); -+extern void avr32_print_operand (FILE * stream, rtx x, int code); -+extern void avr32_print_operand_address (FILE * stream, rtx x); -+ -+extern int avr32_symbol (rtx x); -+ -+extern void avr32_select_rtx_section (enum machine_mode mode, rtx x, -+ unsigned HOST_WIDE_INT align); -+ -+extern int avr32_load_multiple_operation (rtx op, enum machine_mode mode); -+extern int avr32_store_multiple_operation (rtx op, enum machine_mode mode); -+ -+extern int avr32_const_ok_for_constraint_p (HOST_WIDE_INT value, char c, -+ const char *str); -+ -+extern bool avr32_cannot_force_const_mem (rtx x); -+ -+extern void avr32_init_builtins (void); -+ -+extern rtx avr32_expand_builtin (tree exp, rtx target, rtx subtarget, -+ enum machine_mode mode, int ignore); -+ -+extern bool avr32_must_pass_in_stack (enum machine_mode mode, tree type); -+ -+extern bool avr32_strict_argument_naming (CUMULATIVE_ARGS * ca); -+ -+extern bool avr32_pass_by_reference (CUMULATIVE_ARGS * cum, -+ enum machine_mode mode, -+ tree type, bool named); -+ -+extern rtx avr32_gen_load_multiple (rtx * regs, int count, rtx from, -+ int write_back, int in_struct_p, -+ int scalar_p); -+extern rtx avr32_gen_store_multiple (rtx * regs, int count, rtx to, -+ int in_struct_p, int scalar_p); -+extern int avr32_gen_movmemsi (rtx * operands); -+ -+extern int avr32_rnd_operands (rtx add, rtx shift); -+extern int avr32_adjust_insn_length (rtx insn, int length); -+ -+extern int symbol_mentioned_p (rtx x); -+extern int label_mentioned_p (rtx x); -+extern rtx legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg); -+extern int avr32_address_register_rtx_p (rtx x, int strict_p); -+extern int avr32_legitimate_index_p (enum machine_mode mode, rtx index, -+ int strict_p); -+ -+extern int avr32_const_double_immediate (rtx value); -+extern void avr32_init_expanders (void); -+extern rtx avr32_return_addr (int count, rtx frame); -+extern bool avr32_got_mentioned_p (rtx addr); -+ -+extern void avr32_final_prescan_insn (rtx insn, rtx * opvec, int noperands); -+ -+extern int avr32_expand_movcc (enum machine_mode mode, rtx operands[]); -+extern int avr32_expand_addcc (enum machine_mode mode, rtx operands[]); -+#ifdef RTX_CODE -+extern int avr32_expand_scc (RTX_CODE cond, rtx * operands); -+#endif -+ -+extern int avr32_store_bypass (rtx insn_out, rtx insn_in); -+extern int avr32_mul_waw_bypass (rtx insn_out, rtx insn_in); -+extern int avr32_valid_load_double_bypass (rtx insn_out, rtx insn_in); -+extern int avr32_valid_load_quad_bypass (rtx insn_out, rtx insn_in); -+extern rtx avr32_output_cmp (rtx cond, enum machine_mode mode, -+ rtx op0, rtx op1); -+ -+rtx get_next_insn_cond (rtx cur_insn); -+int set_next_insn_cond (rtx cur_insn, rtx cond); -+rtx next_insn_emits_cmp (rtx cur_insn); -+void avr32_override_options (void); -+void avr32_load_pic_register (void); -+#ifdef GCC_BASIC_BLOCK_H -+rtx avr32_ifcvt_modify_insn (ce_if_block_t *ce_info, rtx pattern, rtx insn, -+ int *num_true_changes); -+rtx avr32_ifcvt_modify_test (ce_if_block_t *ce_info, rtx test ); -+void avr32_ifcvt_modify_cancel ( ce_if_block_t *ce_info, int *num_true_changes); -+#endif -+void avr32_optimization_options (int level, int size); -+int avr32_const_ok_for_move (HOST_WIDE_INT c); -+ -+void avr32_split_const_expr (enum machine_mode mode, -+ enum machine_mode new_mode, -+ rtx expr, -+ rtx *split_expr); -+void avr32_get_intval (enum machine_mode mode, -+ rtx const_expr, -+ HOST_WIDE_INT *val); -+ -+int avr32_cond_imm_clobber_splittable (rtx insn, -+ rtx operands[]); -+ -+bool avr32_flashvault_call(tree decl); -+extern void avr32_emit_swdivsf (rtx, rtx, rtx); -+ -+#endif /* AVR32_PROTOS_H */ -diff -Nur gcc-4.4.6.orig/gcc/config/avr32/avr32.c gcc-4.4.6/gcc/config/avr32/avr32.c ---- gcc-4.4.6.orig/gcc/config/avr32/avr32.c 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.4.6/gcc/config/avr32/avr32.c 2011-10-22 19:23:08.516581300 +0200 -@@ -0,0 +1,8087 @@ -+/* -+ Target hooks and helper functions for AVR32. -+ Copyright 2003,2004,2005,2006,2007,2008,2009,2010 Atmel Corporation. -+ -+ This file is part of GCC. -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -+ -+#include "config.h" -+#include "system.h" -+#include "coretypes.h" -+#include "tm.h" -+#include "rtl.h" -+#include "tree.h" -+#include "obstack.h" -+#include "regs.h" -+#include "hard-reg-set.h" -+#include "real.h" -+#include "insn-config.h" -+#include "conditions.h" -+#include "output.h" -+#include "insn-attr.h" -+#include "flags.h" -+#include "reload.h" -+#include "function.h" -+#include "expr.h" -+#include "optabs.h" -+#include "toplev.h" -+#include "recog.h" -+#include "ggc.h" -+#include "except.h" -+#include "c-pragma.h" -+#include "integrate.h" -+#include "tm_p.h" -+#include "langhooks.h" -+#include "hooks.h" -+#include "df.h" -+ -+#include "target.h" -+#include "target-def.h" -+ -+#include <ctype.h> -+ -+ -+ -+/* Global variables. */ -+typedef struct minipool_node Mnode; -+typedef struct minipool_fixup Mfix; -+ -+/* Obstack for minipool constant handling. */ -+static struct obstack minipool_obstack; -+static char *minipool_startobj; -+static rtx minipool_vector_label; -+ -+/* True if we are currently building a constant table. */ -+int making_const_table; -+ -+tree fndecl_attribute_args = NULL_TREE; -+ -+ -+/* Function prototypes. */ -+static unsigned long avr32_isr_value (tree); -+static unsigned long avr32_compute_func_type (void); -+static tree avr32_handle_isr_attribute (tree *, tree, tree, int, bool *); -+static tree avr32_handle_acall_attribute (tree *, tree, tree, int, bool *); -+static tree avr32_handle_fndecl_attribute (tree * node, tree name, tree args, -+ int flags, bool * no_add_attrs); -+static void avr32_reorg (void); -+bool avr32_return_in_msb (tree type); -+bool avr32_vector_mode_supported (enum machine_mode mode); -+static void avr32_init_libfuncs (void); -+static void avr32_file_end (void); -+static void flashvault_decl_list_add (unsigned int vector_num, const char *name); -+ -+ -+ -+static void -+avr32_add_gc_roots (void) -+{ -+ gcc_obstack_init (&minipool_obstack); -+ minipool_startobj = (char *) obstack_alloc (&minipool_obstack, 0); -+} -+ -+ -+/* List of all known AVR32 parts */ -+static const struct part_type_s avr32_part_types[] = { -+ /* name, part_type, architecture type, macro */ -+ {"none", PART_TYPE_AVR32_NONE, ARCH_TYPE_AVR32_AP, "__AVR32__"}, -+ {"ap7000", PART_TYPE_AVR32_AP7000, ARCH_TYPE_AVR32_AP, "__AVR32_AP7000__"}, -+ {"ap7001", PART_TYPE_AVR32_AP7001, ARCH_TYPE_AVR32_AP, "__AVR32_AP7001__"}, -+ {"ap7002", PART_TYPE_AVR32_AP7002, ARCH_TYPE_AVR32_AP, "__AVR32_AP7002__"}, -+ {"ap7200", PART_TYPE_AVR32_AP7200, ARCH_TYPE_AVR32_AP, "__AVR32_AP7200__"}, -+ {"uc3a0128", PART_TYPE_AVR32_UC3A0128, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A0128__"}, -+ {"uc3a0256", PART_TYPE_AVR32_UC3A0256, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A0256__"}, -+ {"uc3a0512", PART_TYPE_AVR32_UC3A0512, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A0512__"}, -+ {"uc3a0512es", PART_TYPE_AVR32_UC3A0512ES, ARCH_TYPE_AVR32_UCR1, "__AVR32_UC3A0512ES__"}, -+ {"uc3a1128", PART_TYPE_AVR32_UC3A1128, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A1128__"}, -+ {"uc3a1256", PART_TYPE_AVR32_UC3A1256, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A1256__"}, -+ {"uc3a1512", PART_TYPE_AVR32_UC3A1512, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A1512__"}, -+ {"uc3a1512es", PART_TYPE_AVR32_UC3A1512ES, ARCH_TYPE_AVR32_UCR1, "__AVR32_UC3A1512ES__"}, -+ {"uc3a3revd", PART_TYPE_AVR32_UC3A3REVD, ARCH_TYPE_AVR32_UCR2NOMUL, "__AVR32_UC3A3256S__"}, -+ {"uc3a364", PART_TYPE_AVR32_UC3A364, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A364__"}, -+ {"uc3a364s", PART_TYPE_AVR32_UC3A364S, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A364S__"}, -+ {"uc3a3128", PART_TYPE_AVR32_UC3A3128, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A3128__"}, -+ {"uc3a3128s", PART_TYPE_AVR32_UC3A3128S, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A3128S__"}, -+ {"uc3a3256", PART_TYPE_AVR32_UC3A3256, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A3256__"}, -+ {"uc3a3256s", PART_TYPE_AVR32_UC3A3256S, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A3256S__"}, -+ {"uc3a464", PART_TYPE_AVR32_UC3A464, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A464__"}, -+ {"uc3a464s", PART_TYPE_AVR32_UC3A464S, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A464S__"}, -+ {"uc3a4128", PART_TYPE_AVR32_UC3A4128, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A4128__"}, -+ {"uc3a4128s", PART_TYPE_AVR32_UC3A4128S, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A4128S__"}, -+ {"uc3a4256", PART_TYPE_AVR32_UC3A4256, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A4256__"}, -+ {"uc3a4256s", PART_TYPE_AVR32_UC3A4256S, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3A4256S__"}, -+ {"uc3b064", PART_TYPE_AVR32_UC3B064, ARCH_TYPE_AVR32_UCR1, "__AVR32_UC3B064__"}, -+ {"uc3b0128", PART_TYPE_AVR32_UC3B0128, ARCH_TYPE_AVR32_UCR1, "__AVR32_UC3B0128__"}, -+ {"uc3b0256", PART_TYPE_AVR32_UC3B0256, ARCH_TYPE_AVR32_UCR1, "__AVR32_UC3B0256__"}, -+ {"uc3b0256es", PART_TYPE_AVR32_UC3B0256ES, ARCH_TYPE_AVR32_UCR1, "__AVR32_UC3B0256ES__"}, -+ {"uc3b0512", PART_TYPE_AVR32_UC3B0512, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3B0512__"}, -+ {"uc3b0512revc", PART_TYPE_AVR32_UC3B0512REVC, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3B0512REVC__"}, -+ {"uc3b164", PART_TYPE_AVR32_UC3B164, ARCH_TYPE_AVR32_UCR1, "__AVR32_UC3B164__"}, -+ {"uc3b1128", PART_TYPE_AVR32_UC3B1128, ARCH_TYPE_AVR32_UCR1, "__AVR32_UC3B1128__"}, -+ {"uc3b1256", PART_TYPE_AVR32_UC3B1256, ARCH_TYPE_AVR32_UCR1, "__AVR32_UC3B1256__"}, -+ {"uc3b1256es", PART_TYPE_AVR32_UC3B1256ES, ARCH_TYPE_AVR32_UCR1, "__AVR32_UC3B1256ES__"}, -+ {"uc3b1512", PART_TYPE_AVR32_UC3B1512, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3B1512__"}, -+ {"uc3b1512revc", PART_TYPE_AVR32_UC3B1512REVC, ARCH_TYPE_AVR32_UCR2, "__AVR32_UC3B1512REVC__"}, -+ {"uc64d3", PART_TYPE_AVR32_UC64D3, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC64D3__"}, -+ {"uc128d3", PART_TYPE_AVR32_UC128D3, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC128D3__"}, -+ {"uc64d4", PART_TYPE_AVR32_UC64D4, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC64D4__"}, -+ {"uc128d4", PART_TYPE_AVR32_UC128D4, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC128D4__"}, -+ {"uc3c0512crevc", PART_TYPE_AVR32_UC3C0512CREVC, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC3C0512CREVC__"}, -+ {"uc3c1512crevc", PART_TYPE_AVR32_UC3C1512CREVC, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC3C1512CREVC__"}, -+ {"uc3c2512crevc", PART_TYPE_AVR32_UC3C2512CREVC, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC3C2512CREVC__"}, -+ {"uc3l0256", PART_TYPE_AVR32_UC3L0256, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC3L0256__"}, -+ {"uc3l0128", PART_TYPE_AVR32_UC3L0128, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC3L0128__"}, -+ {"uc3l064", PART_TYPE_AVR32_UC3L064, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC3L064__"}, -+ {"uc3l032", PART_TYPE_AVR32_UC3L032, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC3L032__"}, -+ {"uc3l016", PART_TYPE_AVR32_UC3L016, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC3L016__"}, -+ {"uc3l064revb", PART_TYPE_AVR32_UC3L064REVB, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC3L064REVB__"}, -+ {"uc64l3u", PART_TYPE_AVR32_UC64L3U, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC64L3U__"}, -+ {"uc128l3u", PART_TYPE_AVR32_UC128L3U, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC128L3U__"}, -+ {"uc256l3u", PART_TYPE_AVR32_UC256L3U, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC256L3U__"}, -+ {"uc64l4u", PART_TYPE_AVR32_UC64L4U, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC64L4U__"}, -+ {"uc128l4u", PART_TYPE_AVR32_UC128L4U, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC128L4U__"}, -+ {"uc256l4u", PART_TYPE_AVR32_UC256L4U, ARCH_TYPE_AVR32_UCR3, "__AVR32_UC256L4U__"}, -+ {"uc3c064c", PART_TYPE_AVR32_UC3C064C, ARCH_TYPE_AVR32_UCR3FP, "__AVR32_UC3C064C__"}, -+ {"uc3c0128c", PART_TYPE_AVR32_UC3C0128C, ARCH_TYPE_AVR32_UCR3FP, "__AVR32_UC3C0128C__"}, -+ {"uc3c0256c", PART_TYPE_AVR32_UC3C0256C, ARCH_TYPE_AVR32_UCR3FP, "__AVR32_UC3C0256C__"}, -+ {"uc3c0512c", PART_TYPE_AVR32_UC3C0512C, ARCH_TYPE_AVR32_UCR3FP, "__AVR32_UC3C0512C__"}, -+ {"uc3c164c", PART_TYPE_AVR32_UC3C164C, ARCH_TYPE_AVR32_UCR3FP, "__AVR32_UC3C164C__"}, -+ {"uc3c1128c", PART_TYPE_AVR32_UC3C1128C, ARCH_TYPE_AVR32_UCR3FP, "__AVR32_UC3C1128C__"}, -+ {"uc3c1256c", PART_TYPE_AVR32_UC3C1256C, ARCH_TYPE_AVR32_UCR3FP, "__AVR32_UC3C1256C__"}, -+ {"uc3c1512c", PART_TYPE_AVR32_UC3C1512C, ARCH_TYPE_AVR32_UCR3FP, "__AVR32_UC3C1512C__"}, -+ {"uc3c264c", PART_TYPE_AVR32_UC3C264C, ARCH_TYPE_AVR32_UCR3FP, "__AVR32_UC3C264C__"}, -+ {"uc3c2128c", PART_TYPE_AVR32_UC3C2128C, ARCH_TYPE_AVR32_UCR3FP, "__AVR32_UC3C2128C__"}, -+ {"uc3c2256c", PART_TYPE_AVR32_UC3C2256C, ARCH_TYPE_AVR32_UCR3FP, "__AVR32_UC3C2256C__"}, -+ {"uc3c2512c", PART_TYPE_AVR32_UC3C2512C, ARCH_TYPE_AVR32_UCR3FP, "__AVR32_UC3C2512C__"}, -+ {"mxt768e", PART_TYPE_AVR32_MXT768E, ARCH_TYPE_AVR32_UCR3, "__AVR32_MXT768E__"}, -+ {NULL, 0, 0, NULL} -+}; -+ -+/* List of all known AVR32 architectures */ -+static const struct arch_type_s avr32_arch_types[] = { -+ /* name, architecture type, microarchitecture type, feature flags, macro */ -+ {"ap", ARCH_TYPE_AVR32_AP, UARCH_TYPE_AVR32B, -+ (FLAG_AVR32_HAS_DSP -+ | FLAG_AVR32_HAS_SIMD -+ | FLAG_AVR32_HAS_UNALIGNED_WORD -+ | FLAG_AVR32_HAS_BRANCH_PRED | FLAG_AVR32_HAS_RETURN_STACK -+ | FLAG_AVR32_HAS_CACHES), -+ "__AVR32_AP__"}, -+ {"ucr1", ARCH_TYPE_AVR32_UCR1, UARCH_TYPE_AVR32A, -+ (FLAG_AVR32_HAS_DSP | FLAG_AVR32_HAS_RMW), -+ "__AVR32_UC__=1"}, -+ {"ucr2", ARCH_TYPE_AVR32_UCR2, UARCH_TYPE_AVR32A, -+ (FLAG_AVR32_HAS_DSP | FLAG_AVR32_HAS_RMW -+ | FLAG_AVR32_HAS_V2_INSNS), -+ "__AVR32_UC__=2"}, |