From d3f383b1eeafa11b093d7a5626d375d07ed2c3d7 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 14 Dec 2009 12:15:36 +0100 Subject: gcc: add avr32 special version * Add new gcc version 4.2.2-avr32-2.1.5 in Config.in * Select the Atmel mirror to download gcc with avr32 in their version name, in gcc-uclibc-*.mk * Do not apply patches if the patch directory is empty, in gcc-uclibc-*.mk Signed-off-by: Thomas Petazzoni --- toolchain/gcc/Config.in | 7 ++++++- toolchain/gcc/gcc-uclibc-3.x.mk | 16 ++++++++++------ toolchain/gcc/gcc-uclibc-4.x.mk | 16 ++++++++++------ 3 files changed, 26 insertions(+), 13 deletions(-) (limited to 'toolchain/gcc') diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in index 7e5851620..3d3da46ec 100644 --- a/toolchain/gcc/Config.in +++ b/toolchain/gcc/Config.in @@ -26,6 +26,10 @@ choice depends on BR2_DEPRECATED || BR2_avr32 bool "gcc 4.2.2" + config BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 + depends on BR2_avr32 + bool "gcc 4.2.2-avr32-2.1.5" + config BR2_GCC_VERSION_4_2_3 depends on !BR2_nios2 depends on BR2_EXT_GCC_VERSION_4_2_3 @@ -66,7 +70,7 @@ config BR2_GCC_SUPPORTS_SYSROOT config BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE bool - default y if !BR2_GCC_VERSION_4_1_2 && !BR2_GCC_VERSION_4_2_1 && !BR2_GCC_VERSION_4_2_2 && !BR2_GCC_VERSION_4_2_3 && !BR2_GCC_VERSION_4_2_4 + default y if !BR2_GCC_VERSION_4_1_2 && !BR2_GCC_VERSION_4_2_1 && !BR2_GCC_VERSION_4_2_2 && !BR2_GCC_VERSION_4_2_3 && !BR2_GCC_VERSION_4_2_4 && !BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 config BR2_GCC_SNAP_DATE string "GCC snapshot date" @@ -81,6 +85,7 @@ config BR2_GCC_VERSION default "4.1.2" if BR2_GCC_VERSION_4_1_2 default "4.2.1" if BR2_GCC_VERSION_4_2_1 default "4.2.2" if BR2_GCC_VERSION_4_2_2 + default "4.2.2-avr32-2.1.5" if BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 default "4.2.3" if BR2_GCC_VERSION_4_2_3 default "4.2.4" if BR2_GCC_VERSION_4_2_4 default "4.3.2" if BR2_GCC_VERSION_4_3_2 diff --git a/toolchain/gcc/gcc-uclibc-3.x.mk b/toolchain/gcc/gcc-uclibc-3.x.mk index e73731348..bc3d423b5 100644 --- a/toolchain/gcc/gcc-uclibc-3.x.mk +++ b/toolchain/gcc/gcc-uclibc-3.x.mk @@ -22,13 +22,15 @@ ifeq ($(BR2_TOOLCHAIN_SOURCE),y) # without sysroot support. Sysroot toolchain is gcc-uclibc-4.x.mk ifneq ($(BR2_TOOLCHAIN_SYSROOT),y) -ifeq ($(GCC_SNAP_DATE),) -GCC_OFFICIAL_VER:=$(GCC_VERSION) -GCC_SITE:=$(BR2_GNU_MIRROR)/gcc/gcc-$(GCC_VERSION) -#GCC_SITE:=ftp://ftp.ibiblio.org/pub/mirrors/gnu/ftp/gnu/gcc/gcc-$(GCC_OFFICIAL_VER) +ifneq ($(GCC_SNAP_DATE),) + GCC_SITE:=ftp://sources.redhat.com/pub/gcc/snapshots/$(GCC_VERSION) + GCC_OFFICIAL_VER:=$(GCC_VERSION)-$(GCC_SNAP_DATE) +else ifeq ($(findstring avr32,$(GCC_VERSION)),avr32) + GCC_SITE:=ftp://www.at91.com/pub/buildroot/ + GCC_OFFICIAL_VER:=$(GCC_VERSION) else -GCC_OFFICIAL_VER:=$(GCC_VERSION)-$(GCC_SNAP_DATE) -GCC_SITE:=ftp://sources.redhat.com/pub/gcc/snapshots/$(GCC_OFFICIAL_VER) + GCC_SITE:=$(BR2_GNU_MIRROR)/gcc/gcc-$(GCC_VERSION) + GCC_OFFICIAL_VER:=$(GCC_VERSION) endif @@ -142,7 +144,9 @@ $(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE) gcc-patched: $(GCC_DIR)/.patched $(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked # Apply any files named gcc-*.patch from the source directory to gcc +ifneq ($(wildcard $(GCC_PATCH_DIR)),) toolchain/patch-kernel.sh $(GCC_DIR) $(GCC_PATCH_DIR) \*.patch +endif # Note: The soft float situation has improved considerably with gcc 3.4.x. # We can dispense with the custom spec files, as well as libfloat for the arm case. # However, we still need a patch for arm. There's a similar patch for gcc 3.3.x diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk index d5a889fa3..14afb367e 100644 --- a/toolchain/gcc/gcc-uclibc-4.x.mk +++ b/toolchain/gcc/gcc-uclibc-4.x.mk @@ -20,13 +20,15 @@ # sysroot support works with gcc >= 4.2.0 only ifeq ($(BR2_TOOLCHAIN_SYSROOT),y) -ifeq ($(GCC_SNAP_DATE),) -GCC_OFFICIAL_VERSION:=$(GCC_VERSION) -GCC_SITE:=$(BR2_GNU_MIRROR)/gcc/gcc-$(GCC_VERSION) -#GCC_SITE:=ftp://ftp.ibiblio.org/pub/mirrors/gnu/ftp/gnu/gcc/gcc-$(GCC_OFFICIAL_VERSION) +ifneq ($(GCC_SNAP_DATE),) + GCC_SITE:=ftp://sources.redhat.com/pub/gcc/snapshots/$(GCC_VERSION) + GCC_OFFICIAL_VER:=$(GCC_VERSION)-$(GCC_SNAP_DATE) +else ifeq ($(findstring avr32,$(GCC_VERSION)),avr32) + GCC_SITE:=ftp://www.at91.com/pub/buildroot/ + GCC_OFFICIAL_VER:=$(GCC_VERSION) else -GCC_OFFICIAL_VERSION:=$(GCC_VERSION)-$(GCC_SNAP_DATE) -GCC_SITE:=ftp://sources.redhat.com/pub/gcc/snapshots/$(GCC_OFFICIAL_VERSION) + GCC_SITE:=$(BR2_GNU_MIRROR)/gcc/gcc-$(GCC_VERSION) + GCC_OFFICIAL_VER:=$(GCC_VERSION) endif # redefine if using an external prepatched gcc source @@ -182,7 +184,9 @@ $(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE) gcc-patched: $(GCC_DIR)/.patched $(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked # Apply any files named gcc-*.patch from the source directory to gcc +ifneq ($(wildcard $(GCC_PATCH_DIR)),) toolchain/patch-kernel.sh $(GCC_DIR) $(GCC_PATCH_DIR) \*.patch $(GCC_PATCH_EXTRA) +endif # Note: The soft float situation has improved considerably with gcc 3.4.x. # We can dispense with the custom spec files, as well as libfloat for the arm case. -- cgit v1.2.3 From 9e172b3f9178c22d167e4b4c3698bc0fe5bd9228 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 14 Dec 2009 12:16:28 +0100 Subject: gcc: add 4.2.2-avr32-2.1.5 patches Signed-off-by: Thomas Petazzoni --- ...-fix-removal-of-redundant-cast-operations.patch | 16 +++ ...conditional-insn-which-clobbers-cc_status.patch | 150 +++++++++++++++++++++ ...use-movh-to-move-immediates-into-register.patch | 31 +++++ 3 files changed, 197 insertions(+) create mode 100644 toolchain/gcc/4.2.2-avr32-2.1.5/903-avr32-fix-removal-of-redundant-cast-operations.patch create mode 100644 toolchain/gcc/4.2.2-avr32-2.1.5/904-avr32-fix-conditional-insn-which-clobbers-cc_status.patch create mode 100644 toolchain/gcc/4.2.2-avr32-2.1.5/905-avr32-optimize-movsf2-use-movh-to-move-immediates-into-register.patch (limited to 'toolchain/gcc') diff --git a/toolchain/gcc/4.2.2-avr32-2.1.5/903-avr32-fix-removal-of-redundant-cast-operations.patch b/toolchain/gcc/4.2.2-avr32-2.1.5/903-avr32-fix-removal-of-redundant-cast-operations.patch new file mode 100644 index 000000000..59ecbff4f --- /dev/null +++ b/toolchain/gcc/4.2.2-avr32-2.1.5/903-avr32-fix-removal-of-redundant-cast-operations.patch @@ -0,0 +1,16 @@ +Index: trunk/gcc/config/avr32/avr32.c +=================================================================== +--- trunk/gcc/config/avr32/avr32.c (revision 43495) ++++ trunk/gcc/config/avr32/avr32.c (revision 43496) +@@ -6499,6 +6499,11 @@ + break; + } + ++ /* Check if we have a call and the register is used as an argument. */ ++ if (CALL_P (scan) ++ && find_reg_fusage (scan, USE, reg) ) ++ break; ++ + if (!reg_mentioned_p (reg, PATTERN (scan))) + continue; + diff --git a/toolchain/gcc/4.2.2-avr32-2.1.5/904-avr32-fix-conditional-insn-which-clobbers-cc_status.patch b/toolchain/gcc/4.2.2-avr32-2.1.5/904-avr32-fix-conditional-insn-which-clobbers-cc_status.patch new file mode 100644 index 000000000..539c666d2 --- /dev/null +++ b/toolchain/gcc/4.2.2-avr32-2.1.5/904-avr32-fix-conditional-insn-which-clobbers-cc_status.patch @@ -0,0 +1,150 @@ +Index: gcc-4.2.2/gcc/config/avr32/avr32.c +=================================================================== +--- gcc-4.2.2.orig/gcc/config/avr32/avr32.c 2008-09-19 14:29:20.000000000 +0200 ++++ gcc-4.2.2/gcc/config/avr32/avr32.c 2008-09-19 14:30:02.000000000 +0200 +@@ -1788,7 +1788,7 @@ + { + if (TREE_CODE (*node) != FUNCTION_DECL) + { +- warning ("`%s' attribute only applies to functions", ++ warning (OPT_Wattributes,"`%s' attribute only applies to functions", + IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } +@@ -1802,7 +1802,7 @@ + { + if (avr32_isr_value (args) == AVR32_FT_UNKNOWN) + { +- warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); ++ warning (OPT_Wattributes,"`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + } +@@ -1829,7 +1829,7 @@ + } + else + { +- warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); ++ warning (OPT_Wattributes,"`%s' attribute ignored", IDENTIFIER_POINTER (name)); + } + } + } +@@ -1847,7 +1847,7 @@ + { + if (TREE_CODE (*node) != FUNCTION_DECL) + { +- warning ("%qs attribute only applies to functions", ++ warning (OPT_Wattributes,"%qs attribute only applies to functions", + IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } +@@ -1866,13 +1866,13 @@ + { + if (TREE_CODE (*node) == FUNCTION_TYPE || TREE_CODE (*node) == METHOD_TYPE) + { +- warning ("`%s' attribute not yet supported...", ++ warning (OPT_Wattributes,"`%s' attribute not yet supported...", + IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + return NULL_TREE; + } + +- warning ("`%s' attribute only applies to functions", ++ warning (OPT_Wattributes,"`%s' attribute only applies to functions", + IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + return NULL_TREE; +@@ -4215,51 +4215,6 @@ + + + void +-avr32_asm_output_ascii (FILE * stream, char *ptr, int len) +-{ +- int i, i_new = 0; +- char *new_ptr = xmalloc (4 * len); +- if (new_ptr == NULL) +- internal_error ("Out of memory."); +- +- for (i = 0; i < len; i++) +- { +- if (ptr[i] == '\n') +- { +- new_ptr[i_new++] = '\\'; +- new_ptr[i_new++] = '0'; +- new_ptr[i_new++] = '1'; +- new_ptr[i_new++] = '2'; +- } +- else if (ptr[i] == '\"') +- { +- new_ptr[i_new++] = '\\'; +- new_ptr[i_new++] = '\"'; +- } +- else if (ptr[i] == '\\') +- { +- new_ptr[i_new++] = '\\'; +- new_ptr[i_new++] = '\\'; +- } +- else if (ptr[i] == '\0' && i + 1 < len) +- { +- new_ptr[i_new++] = '\\'; +- new_ptr[i_new++] = '0'; +- } +- else +- { +- new_ptr[i_new++] = ptr[i]; +- } +- } +- +- /* Terminate new_ptr. */ +- new_ptr[i_new] = '\0'; +- fprintf (stream, "\t.ascii\t\"%s\"\n", new_ptr); +- free (new_ptr); +-} +- +- +-void + avr32_asm_output_label (FILE * stream, const char *name) + { + name = avr32_strip_name_encoding (name); +@@ -4444,12 +4399,15 @@ + rtx cmp; + rtx cmp_op0, cmp_op1; + rtx cond; ++ rtx dest; ++ + if ( GET_CODE (exp) == COND_EXEC ) + { + cmp_op0 = XEXP (COND_EXEC_TEST (exp), 0); + cmp_op1 = XEXP (COND_EXEC_TEST (exp), 1); + cond = COND_EXEC_TEST (exp); +- } ++ dest = SET_DEST (COND_EXEC_CODE (exp)); ++ } + else + { + /* If then else conditional. compare operands are in operands +@@ -4457,6 +4415,7 @@ + cmp_op0 = recog_data.operand[4]; + cmp_op1 = recog_data.operand[5]; + cond = recog_data.operand[1]; ++ dest = SET_DEST (exp); + } + + if ( GET_CODE (cmp_op0) == AND ) +@@ -4466,7 +4425,15 @@ + cmp_op0, + cmp_op1); + +- if (is_compare_redundant (cmp, cond) == NULL_RTX) ++ /* Check if the conditional insns updates a register present ++ in the comparison, if so then we must reset the cc_status. */ ++ if (REG_P (dest) ++ && (reg_mentioned_p (dest, cmp_op0) ++ || reg_mentioned_p (dest, cmp_op1))) ++ { ++ CC_STATUS_INIT; ++ } ++ else if (is_compare_redundant (cmp, cond) == NULL_RTX) + { + /* Reset the nonstandard flag */ + CC_STATUS_INIT; diff --git a/toolchain/gcc/4.2.2-avr32-2.1.5/905-avr32-optimize-movsf2-use-movh-to-move-immediates-into-register.patch b/toolchain/gcc/4.2.2-avr32-2.1.5/905-avr32-optimize-movsf2-use-movh-to-move-immediates-into-register.patch new file mode 100644 index 000000000..08d972df2 --- /dev/null +++ b/toolchain/gcc/4.2.2-avr32-2.1.5/905-avr32-optimize-movsf2-use-movh-to-move-immediates-into-register.patch @@ -0,0 +1,31 @@ +Index: gcc-4.2.2/gcc/config/avr32/avr32.md +=================================================================== +--- gcc-4.2.2.orig/gcc/config/avr32/avr32.md 2008-09-19 14:23:34.000000000 +0200 ++++ gcc-4.2.2/gcc/config/avr32/avr32.md 2008-09-19 14:30:18.000000000 +0200 +@@ -803,14 +803,22 @@ + (define_insn "*movsf_internal" + [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,r,r,m") + (match_operand:SF 1 "general_operand" "r, G,F,m,r"))] +- "TARGET_SOFT_FLOAT +- && (register_operand (operands[0], SFmode) +- || register_operand (operands[1], SFmode))" ++ "(register_operand (operands[0], SFmode) ++ || register_operand (operands[1], SFmode))" + { + switch (which_alternative) { + case 0: + case 1: return "mov\t%0, %1"; +- case 2: return "mov\t%0, lo(%1)\;orh\t%0, hi(%1)"; ++ case 2: ++ { ++ HOST_WIDE_INT target_float[2]; ++ real_to_target (target_float, CONST_DOUBLE_REAL_VALUE (operands[1]), SFmode); ++ if ( TARGET_V2_INSNS ++ && avr32_hi16_immediate_operand (GEN_INT (target_float[0]), VOIDmode) ) ++ return "movh\t%0, hi(%1)"; ++ else ++ return "mov\t%0, lo(%1)\;orh\t%0, hi(%1)"; ++ } + case 3: + if ( (REG_P(XEXP(operands[1], 0)) + && REGNO(XEXP(operands[1], 0)) == SP_REGNUM) -- cgit v1.2.3 From 5c6ccd9f20a9aec2d26bcbb32f17a027b333ace3 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 14 Dec 2009 11:57:14 +0100 Subject: gcc: on avr32, only allow avr32 gcc versions Remove references to BR2_EXT_GCC_VERSION_* configuration options, and only allows special avr32 gcc versions on the AVR32 architecture. Signed-off-by: Thomas Petazzoni --- toolchain/gcc/Config.in | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'toolchain/gcc') diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in index 3d3da46ec..07e42a6da 100644 --- a/toolchain/gcc/Config.in +++ b/toolchain/gcc/Config.in @@ -10,20 +10,18 @@ choice Select the version of gcc you wish to use. config BR2_GCC_VERSION_4_1_2 - depends on !BR2_nios2 - depends on BR2_EXT_GCC_VERSION_4_1_2 + depends on !BR2_nios2 && !BR2_avr32 depends on BR2_DEPRECATED bool "gcc 4.1.2" config BR2_GCC_VERSION_4_2_1 - depends on !BR2_nios2 - depends on BR2_EXT_GCC_VERSION_4_2_1 + depends on !BR2_nios2 && !BR2_avr32 depends on BR2_DEPRECATED bool "gcc 4.2.1" config BR2_GCC_VERSION_4_2_2 - depends on BR2_EXT_GCC_VERSION_4_2_2 - depends on BR2_DEPRECATED || BR2_avr32 + depends on !BR2_avr32 + depends on BR2_DEPRECATED bool "gcc 4.2.2" config BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 @@ -31,9 +29,8 @@ choice bool "gcc 4.2.2-avr32-2.1.5" config BR2_GCC_VERSION_4_2_3 - depends on !BR2_nios2 - depends on BR2_EXT_GCC_VERSION_4_2_3 - depends on BR2_DEPRECATED || BR2_avr32 + depends on !BR2_nios2 && !BR2_avr32 + depends on BR2_DEPRECATED bool "gcc 4.2.3" config BR2_GCC_VERSION_4_2_4 -- cgit v1.2.3 From 636afc4664238b9555411622f45ff4d00ceffcde Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 14 Dec 2009 11:59:44 +0100 Subject: gcc: improve configuration for snapshot versions Make the selection of a snapshot version a normal gcc version choice, and make sure BR2_GCC_VERSION is properly defined. Signed-off-by: Thomas Petazzoni --- toolchain/gcc/Config.in | 11 ++++++----- toolchain/gcc/Makefile.in | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'toolchain/gcc') diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in index 07e42a6da..10cb841a1 100644 --- a/toolchain/gcc/Config.in +++ b/toolchain/gcc/Config.in @@ -55,11 +55,11 @@ choice config BR2_GCC_VERSION_4_4_X depends on !BR2_avr32 && !BR2_nios2 bool "gcc 4.4.x" -endchoice -config BR2_GCC_IS_SNAP - depends on !BR2_avr32 - bool + config BR2_GCC_VERSION_SNAP + depends on !BR2_avr32 && !BR2_nios2 + bool "gcc snapshot" +endchoice config BR2_GCC_SUPPORTS_SYSROOT bool @@ -72,7 +72,7 @@ config BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE config BR2_GCC_SNAP_DATE string "GCC snapshot date" default "20070921" - depends on BR2_GCC_IS_SNAP + depends on BR2_GCC_VERSION_SNAP help Enter snapshot date to use for gcc. Format is: YYYYMMDD @@ -89,6 +89,7 @@ config BR2_GCC_VERSION default "4.3.3" if BR2_GCC_VERSION_4_3_3 default "4.3.4" if BR2_GCC_VERSION_4_3_4 default "4.4.2" if BR2_GCC_VERSION_4_4_X + default $BR2_GCC_SNAP_DATE if BR2_GCC_VERSION_SNAP config BR2_TOOLCHAIN_SYSROOT bool "Enable toolchain with --sysroot support" diff --git a/toolchain/gcc/Makefile.in b/toolchain/gcc/Makefile.in index e92ecbc7b..c3e21cf35 100644 --- a/toolchain/gcc/Makefile.in +++ b/toolchain/gcc/Makefile.in @@ -8,7 +8,7 @@ GCC_VERSION:=$(call qstrip,$(BR2_GCC_VERSION)) TARGET_OPTIMIZATION:=$(call qstrip,$(BR2_TARGET_OPTIMIZATION)) EXTRA_GCC_CONFIG_OPTIONS:=$(call qstrip,$(BR2_EXTRA_GCC_CONFIG_OPTIONS)) -ifeq ($(call qstrip,$(BR2_GCC_IS_SNAP)),y) +ifeq ($(call qstrip,$(BR2_GCC_VERSION_SNAP)),y) GCC_SNAP_DATE:=$(call qstrip,$(BR2_GCC_SNAP_DATE)) else GCC_SNAP_DATE:= -- cgit v1.2.3 From 3f90a29baf8a57ff2ead2fd21f896850f0bc596f Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 14 Dec 2009 12:02:02 +0100 Subject: gcc: remove support for external source toolchains Signed-off-by: Thomas Petazzoni --- toolchain/gcc/gcc-uclibc-3.x.mk | 10 ---------- toolchain/gcc/gcc-uclibc-4.x.mk | 10 ---------- 2 files changed, 20 deletions(-) (limited to 'toolchain/gcc') diff --git a/toolchain/gcc/gcc-uclibc-3.x.mk b/toolchain/gcc/gcc-uclibc-3.x.mk index bc3d423b5..c7ae9137b 100644 --- a/toolchain/gcc/gcc-uclibc-3.x.mk +++ b/toolchain/gcc/gcc-uclibc-3.x.mk @@ -33,18 +33,9 @@ else GCC_OFFICIAL_VER:=$(GCC_VERSION) endif - -# redefine if using an external prepatched gcc source -ifneq ($(BR2_TOOLCHAIN_BUILDROOT),y) -GCC_SITE:=$(VENDOR_SITE) -GCC_OFFICIAL_VER:=$(GCC_VERSION)$(VENDOR_SUFFIX)$(VENDOR_GCC_RELEASE) -GCC_PATCH_DIR:=toolchain/gcc/ext_source/$(VENDOR_PATCH_DIR)/$(GCC_OFFICIAL_VERSION) -endif - GCC_SOURCE:=gcc-$(GCC_OFFICIAL_VER).tar.bz2 GCC_DIR:=$(TOOLCHAIN_DIR)/gcc-$(GCC_OFFICIAL_VER) -ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) ifeq ($(GCC_SNAP_DATE),) GCC_PATCH_DIR:=toolchain/gcc/$(GCC_VERSION) else @@ -54,7 +45,6 @@ else GCC_PATCH_DIR:=toolchain/gcc/$(GCC_VERSION) endif endif -endif GCC_CAT:=$(BZCAT) GCC_STRIP_HOST_BINARIES:=true diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk index 14afb367e..b3ee26644 100644 --- a/toolchain/gcc/gcc-uclibc-4.x.mk +++ b/toolchain/gcc/gcc-uclibc-4.x.mk @@ -31,15 +31,6 @@ else GCC_OFFICIAL_VER:=$(GCC_VERSION) endif -# redefine if using an external prepatched gcc source -ifneq ($(BR2_TOOLCHAIN_BUILDROOT),y) -GCC_SITE:=$(VENDOR_SITE) -GCC_OFFICIAL_VERSION:=$(GCC_VERSION)$(VENDOR_SUFFIX)$(VENDOR_GCC_RELEASE) -GCC_PATCH_DIR:=toolchain/gcc/ext_source/$(VENDOR_PATCH_DIR)/$(GCC_OFFICIAL_VERSION) -endif #!BR2_TOOLCHAIN_BUILDROOT - -# define patch location -ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) # Normal toolchain ifeq ($(GCC_SNAP_DATE),) # Not a snapshot GCC_PATCH_DIR:=toolchain/gcc/$(GCC_VERSION) else # Is a snapshot @@ -50,7 +41,6 @@ else # Normal patch to snapshot GCC_PATCH_DIR:=toolchain/gcc/$(GCC_VERSION) endif # Snapshot patch endif # Not a snapshot -endif # BR2_TOOLCHAIN_BUILDROOT ifneq ($(filter xtensa%,$(ARCH)),) include target/xtensa/patch.in -- cgit v1.2.3 From 495e5bdca3146a5debfa98a90b7e1a4e9b2e5c09 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 14 Dec 2009 12:04:11 +0100 Subject: gcc: remove GCC_OFFICIAL_VERSION and just use GCC_VERSION instead Signed-off-by: Thomas Petazzoni --- toolchain/gcc/gcc-uclibc-3.x.mk | 17 ++--------------- toolchain/gcc/gcc-uclibc-4.x.mk | 21 ++++----------------- 2 files changed, 6 insertions(+), 32 deletions(-) (limited to 'toolchain/gcc') diff --git a/toolchain/gcc/gcc-uclibc-3.x.mk b/toolchain/gcc/gcc-uclibc-3.x.mk index c7ae9137b..0af3f38e6 100644 --- a/toolchain/gcc/gcc-uclibc-3.x.mk +++ b/toolchain/gcc/gcc-uclibc-3.x.mk @@ -24,28 +24,15 @@ ifneq ($(BR2_TOOLCHAIN_SYSROOT),y) ifneq ($(GCC_SNAP_DATE),) GCC_SITE:=ftp://sources.redhat.com/pub/gcc/snapshots/$(GCC_VERSION) - GCC_OFFICIAL_VER:=$(GCC_VERSION)-$(GCC_SNAP_DATE) else ifeq ($(findstring avr32,$(GCC_VERSION)),avr32) GCC_SITE:=ftp://www.at91.com/pub/buildroot/ - GCC_OFFICIAL_VER:=$(GCC_VERSION) else GCC_SITE:=$(BR2_GNU_MIRROR)/gcc/gcc-$(GCC_VERSION) - GCC_OFFICIAL_VER:=$(GCC_VERSION) endif -GCC_SOURCE:=gcc-$(GCC_OFFICIAL_VER).tar.bz2 -GCC_DIR:=$(TOOLCHAIN_DIR)/gcc-$(GCC_OFFICIAL_VER) - -ifeq ($(GCC_SNAP_DATE),) -GCC_PATCH_DIR:=toolchain/gcc/$(GCC_VERSION) -else -ifneq ($(wildcard toolchain/gcc/$(GCC_OFFICIAL_VER)),) -GCC_PATCH_DIR:=toolchain/gcc/$(GCC_OFFICIAL_VER) -else +GCC_SOURCE:=gcc-$(GCC_VERSION).tar.bz2 +GCC_DIR:=$(TOOLCHAIN_DIR)/gcc-$(GCC_VERSION) GCC_PATCH_DIR:=toolchain/gcc/$(GCC_VERSION) -endif -endif - GCC_CAT:=$(BZCAT) GCC_STRIP_HOST_BINARIES:=true diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk index b3ee26644..b162b93bc 100644 --- a/toolchain/gcc/gcc-uclibc-4.x.mk +++ b/toolchain/gcc/gcc-uclibc-4.x.mk @@ -22,33 +22,20 @@ ifeq ($(BR2_TOOLCHAIN_SYSROOT),y) ifneq ($(GCC_SNAP_DATE),) GCC_SITE:=ftp://sources.redhat.com/pub/gcc/snapshots/$(GCC_VERSION) - GCC_OFFICIAL_VER:=$(GCC_VERSION)-$(GCC_SNAP_DATE) else ifeq ($(findstring avr32,$(GCC_VERSION)),avr32) GCC_SITE:=ftp://www.at91.com/pub/buildroot/ - GCC_OFFICIAL_VER:=$(GCC_VERSION) else GCC_SITE:=$(BR2_GNU_MIRROR)/gcc/gcc-$(GCC_VERSION) - GCC_OFFICIAL_VER:=$(GCC_VERSION) endif -ifeq ($(GCC_SNAP_DATE),) # Not a snapshot -GCC_PATCH_DIR:=toolchain/gcc/$(GCC_VERSION) -else # Is a snapshot -ifneq ($(wildcard toolchain/gcc/$(GCC_OFFICIAL_VERSION)),) # Snapshot patch? -GCC_PATCH_DIR:=toolchain/gcc/$(GCC_OFFICIAL_VERSION) -else # Normal patch to snapshot -# Use the normal location, if the dedicated location does not exist -GCC_PATCH_DIR:=toolchain/gcc/$(GCC_VERSION) -endif # Snapshot patch -endif # Not a snapshot - ifneq ($(filter xtensa%,$(ARCH)),) include target/xtensa/patch.in GCC_PATCH_EXTRA:=$(call XTENSA_PATCH,gcc,$(GCC_PATCH_DIR),. ..) endif -GCC_SOURCE:=gcc-$(GCC_OFFICIAL_VERSION).tar.bz2 -GCC_DIR:=$(TOOLCHAIN_DIR)/gcc-$(GCC_OFFICIAL_VERSION) +GCC_SOURCE:=gcc-$(GCC_VERSION).tar.bz2 +GCC_PATCH_DIR:=toolchain/gcc/$(GCC_VERSION) +GCC_DIR:=$(TOOLCHAIN_DIR)/gcc-$(GCC_VERSION) GCC_CAT:=$(BZCAT) GCC_STRIP_HOST_BINARIES:=nope GCC_SRC_DIR:=$(GCC_DIR) @@ -516,7 +503,7 @@ gcc_target-dirclean: rm -rf $(GCC_BUILD_DIR3) gcc-status: - @echo GCC_OFFICIAL_VERSION=$(GCC_OFFICIAL_VERSION) + @echo GCC_VERSION=$(GCC_VERSION) @echo GCC_PATCH_DIR=$(GCC_PATCH_DIR) @echo GCC_SITE=$(GCC_SITE) -- cgit v1.2.3 From bc994c533cdac1ab843a889c4afaae80234cc6b2 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 14 Dec 2009 12:10:12 +0100 Subject: Use BR2_TOOLCHAIN_BUILDROOT instead of BR2_TOOLCHAIN_SOURCE The BR2_TOOLCHAIN_SOURCE option is removed in a future commit. Signed-off-by: Thomas Petazzoni --- Makefile | 4 ++-- package/Makefile.in | 4 ++-- target/Config.in | 2 +- toolchain/Config.in.1 | 2 +- toolchain/Config.in.2 | 6 +++--- toolchain/gcc/gcc-uclibc-3.x.mk | 2 +- toolchain/uClibc/uclibc.mk | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) (limited to 'toolchain/gcc') diff --git a/Makefile b/Makefile index 5b71051c1..051b661fe 100644 --- a/Makefile +++ b/Makefile @@ -197,7 +197,7 @@ PREFERRED_LIB_FLAGS:=--enable-static --enable-shared # along with the packages to build for the target. # ############################################################## -ifeq ($(BR2_TOOLCHAIN_SOURCE),y) +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) BASE_TARGETS:=uclibc-configured binutils cross_compiler uclibc-target-utils kernel-headers else BASE_TARGETS:=uclibc @@ -289,7 +289,7 @@ include .config.cmd # We also need the various per-package makefiles, which also add # each selected package to TARGETS if that package was selected # in the .config file. -ifeq ($(BR2_TOOLCHAIN_SOURCE),y) +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) # avoid pulling in external toolchain which is broken for toplvl parallel builds # Explicit ordering: include toolchain/dependencies/dependencies.mk diff --git a/package/Makefile.in b/package/Makefile.in index 7c009bbe0..25dd6da81 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -36,7 +36,7 @@ endif ######################################################################### -ifeq ($(BR2_TOOLCHAIN_SOURCE),y) +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) \ -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include TARGET_LDFLAGS+=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib @@ -105,7 +105,7 @@ XXXX=xxxx ROOTFS_SUFFIX:=-$(BR2_ROOTFS_SUFFIX) endif -ifeq ($(BR2_TOOLCHAIN_SOURCE),y) +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) TOOLCHAIN_DIR=$(BASE_DIR)/toolchain # Quotes are needed for spaces et al in path components. diff --git a/target/Config.in b/target/Config.in index ab46dcb16..4cae66cf7 100644 --- a/target/Config.in +++ b/target/Config.in @@ -74,7 +74,7 @@ config BR2_KERNEL_LINUX_ADVANCED # The kernel with the same version as linux headers cannot be compiled # when using an external toolchain, because the linux headers are not # handled by Buildroot in this case. -if BR2_TOOLCHAIN_SOURCE +if BR2_TOOLCHAIN_BUILDROOT config BR2_KERNEL_LINUX bool "linux (Same version as linux headers)" diff --git a/toolchain/Config.in.1 b/toolchain/Config.in.1 index 83bc710b6..5c26858d0 100644 --- a/toolchain/Config.in.1 +++ b/toolchain/Config.in.1 @@ -1,6 +1,6 @@ # -if BR2_TOOLCHAIN_SOURCE +if BR2_TOOLCHAIN_BUILDROOT source "toolchain/kernel-headers/Config.in" source "toolchain/uClibc/Config.in" source "toolchain/binutils/Config.in" diff --git a/toolchain/Config.in.2 b/toolchain/Config.in.2 index 2f7de75b6..6317ff4fb 100644 --- a/toolchain/Config.in.2 +++ b/toolchain/Config.in.2 @@ -37,7 +37,7 @@ config BR2_ENABLE_LOCALE config BR2_ENABLE_LOCALE_PREGENERATED bool "Use pregenerated locale data?" - depends on BR2_ENABLE_LOCALE && BR2_TOOLCHAIN_SOURCE && BROKEN # tarball missing + depends on BR2_ENABLE_LOCALE && BR2_TOOLCHAIN_BUILDROOT && BROKEN # tarball missing help Instead of generating the locale data locally you can optionally download a pregenerated set of locales. @@ -142,7 +142,7 @@ config BR2_GCC_CROSS_CXX config BR2_INSTALL_LIBSTDCPP bool "Build/install c++ compiler and libstdc++?" - select BR2_LARGEFILE if (!BR2_GCC_SUPPORTS_SYSROOT && BR2_TOOLCHAIN_SOURCE) + select BR2_LARGEFILE if (!BR2_GCC_SUPPORTS_SYSROOT && BR2_TOOLCHAIN_BUILDROOT) select BR2_GCC_CROSS_CXX help If you are building your own toolchain and want to build and install @@ -157,7 +157,7 @@ config BR2_TARGET_OPTIMIZATION help Optimizations to use when building for the target host. -if BR2_TOOLCHAIN_SOURCE +if BR2_TOOLCHAIN_BUILDROOT source "toolchain/elf2flt/Config.in" source "toolchain/mklibs/Config.in" source "toolchain/sstrip/Config.in" diff --git a/toolchain/gcc/gcc-uclibc-3.x.mk b/toolchain/gcc/gcc-uclibc-3.x.mk index 0af3f38e6..332af884a 100644 --- a/toolchain/gcc/gcc-uclibc-3.x.mk +++ b/toolchain/gcc/gcc-uclibc-3.x.mk @@ -17,7 +17,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -ifeq ($(BR2_TOOLCHAIN_SOURCE),y) +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) # without sysroot support. Sysroot toolchain is gcc-uclibc-4.x.mk ifneq ($(BR2_TOOLCHAIN_SYSROOT),y) diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk index 79d272fea..f742d4ef4 100644 --- a/toolchain/uClibc/uclibc.mk +++ b/toolchain/uClibc/uclibc.mk @@ -4,7 +4,7 @@ # ############################################################# -ifeq ($(BR2_TOOLCHAIN_SOURCE),y) +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) # specifying UCLIBC_CONFIG_FILE on the command-line overrides the .config # setting. -- cgit v1.2.3 From ebf4f67a8d5cd7b697636fb298432567b6ba2cca Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 14 Dec 2009 12:16:43 +0100 Subject: gcc: remove external sources patches Signed-off-by: Thomas Petazzoni --- .../ext_source/Atmel/avr32/4.1.2-avr32-2.0/.empty | 0 .../ext_source/Atmel/avr32/4.1.2-avr32-2.2/.empty | 0 .../Atmel/avr32/4.2.1-avr32-2.1.3/.empty | 0 .../Atmel/avr32/4.2.2-avr32-1.1.3/.empty | 0 .../901-avr32-revert-broken-uclibc-stuff.patch | 42 ------ ...-fix-removal-of-redundant-cast-operations.patch | 16 --- ...conditional-insn-which-clobbers-cc_status.patch | 150 --------------------- ...use-movh-to-move-immediates-into-register.patch | 31 ----- .../Atmel/avr32/4.2.3-avr32-2.1.5/.empty | 0 9 files changed, 239 deletions(-) delete mode 100644 toolchain/gcc/ext_source/Atmel/avr32/4.1.2-avr32-2.0/.empty delete mode 100644 toolchain/gcc/ext_source/Atmel/avr32/4.1.2-avr32-2.2/.empty delete mode 100644 toolchain/gcc/ext_source/Atmel/avr32/4.2.1-avr32-2.1.3/.empty delete mode 100644 toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-1.1.3/.empty delete mode 100644 toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-1.1.3/901-avr32-revert-broken-uclibc-stuff.patch delete mode 100644 toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-2.1.5/903-avr32-fix-removal-of-redundant-cast-operations.patch delete mode 100644 toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-2.1.5/904-avr32-fix-conditional-insn-which-clobbers-cc_status.patch delete mode 100644 toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-2.1.5/905-avr32-optimize-movsf2-use-movh-to-move-immediates-into-register.patch delete mode 100644 toolchain/gcc/ext_source/Atmel/avr32/4.2.3-avr32-2.1.5/.empty (limited to 'toolchain/gcc') diff --git a/toolchain/gcc/ext_source/Atmel/avr32/4.1.2-avr32-2.0/.empty b/toolchain/gcc/ext_source/Atmel/avr32/4.1.2-avr32-2.0/.empty deleted file mode 100644 index e69de29bb..000000000 diff --git a/toolchain/gcc/ext_source/Atmel/avr32/4.1.2-avr32-2.2/.empty b/toolchain/gcc/ext_source/Atmel/avr32/4.1.2-avr32-2.2/.empty deleted file mode 100644 index e69de29bb..000000000 diff --git a/toolchain/gcc/ext_source/Atmel/avr32/4.2.1-avr32-2.1.3/.empty b/toolchain/gcc/ext_source/Atmel/avr32/4.2.1-avr32-2.1.3/.empty deleted file mode 100644 index e69de29bb..000000000 diff --git a/toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-1.1.3/.empty b/toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-1.1.3/.empty deleted file mode 100644 index e69de29bb..000000000 diff --git a/toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-1.1.3/901-avr32-revert-broken-uclibc-stuff.patch b/toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-1.1.3/901-avr32-revert-broken-uclibc-stuff.patch deleted file mode 100644 index e056be0fd..000000000 --- a/toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-1.1.3/901-avr32-revert-broken-uclibc-stuff.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/libstdc++-v3/acinclude.m4 -+++ b/libstdc++-v3/acinclude.m4 -@@ -125,6 +125,15 @@ AC_DEFUN([GLIBCXX_CONFIGURE], [ - ## other macros from doing the same. This should be automated.) -pme - need_libmath=no - -+ # Check for uClibc since Linux platforms use different configuration -+ # directories depending on the C library in use. -+ AC_EGREP_CPP([_using_uclibc], [ -+ #include -+ #if __UCLIBC__ -+ _using_uclibc -+ #endif -+ ], uclibc=yes, uclibc=no) -+ - # Find platform-specific directories containing configuration info. - # Also possibly modify flags used elsewhere, as needed by the platform. - GLIBCXX_CHECK_HOST ---- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h -+++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h -@@ -31,8 +31,6 @@ - // - // ISO C++ 14882: 22.1 Locales - // --#include --#include - - /** @file ctype_base.h - * This is an internal header file, included by other library headers. -@@ -47,11 +45,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) - struct ctype_base - { - // Non-standard typedefs. --#ifdef __UCLIBC__ -- typedef const __ctype_touplow_t* __to_type; --#else -- typedef const int* __to_type; --#endif -+ typedef const int* __to_type; - - // NB: Offsets into ctype::_M_table force a particular size - // on the mask type. Because of this, we don't use an enum. diff --git a/toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-2.1.5/903-avr32-fix-removal-of-redundant-cast-operations.patch b/toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-2.1.5/903-avr32-fix-removal-of-redundant-cast-operations.patch deleted file mode 100644 index 59ecbff4f..000000000 --- a/toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-2.1.5/903-avr32-fix-removal-of-redundant-cast-operations.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: trunk/gcc/config/avr32/avr32.c -=================================================================== ---- trunk/gcc/config/avr32/avr32.c (revision 43495) -+++ trunk/gcc/config/avr32/avr32.c (revision 43496) -@@ -6499,6 +6499,11 @@ - break; - } - -+ /* Check if we have a call and the register is used as an argument. */ -+ if (CALL_P (scan) -+ && find_reg_fusage (scan, USE, reg) ) -+ break; -+ - if (!reg_mentioned_p (reg, PATTERN (scan))) - continue; - diff --git a/toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-2.1.5/904-avr32-fix-conditional-insn-which-clobbers-cc_status.patch b/toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-2.1.5/904-avr32-fix-conditional-insn-which-clobbers-cc_status.patch deleted file mode 100644 index 539c666d2..000000000 --- a/toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-2.1.5/904-avr32-fix-conditional-insn-which-clobbers-cc_status.patch +++ /dev/null @@ -1,150 +0,0 @@ -Index: gcc-4.2.2/gcc/config/avr32/avr32.c -=================================================================== ---- gcc-4.2.2.orig/gcc/config/avr32/avr32.c 2008-09-19 14:29:20.000000000 +0200 -+++ gcc-4.2.2/gcc/config/avr32/avr32.c 2008-09-19 14:30:02.000000000 +0200 -@@ -1788,7 +1788,7 @@ - { - if (TREE_CODE (*node) != FUNCTION_DECL) - { -- warning ("`%s' attribute only applies to functions", -+ warning (OPT_Wattributes,"`%s' attribute only applies to functions", - IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } -@@ -1802,7 +1802,7 @@ - { - if (avr32_isr_value (args) == AVR32_FT_UNKNOWN) - { -- warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); -+ warning (OPT_Wattributes,"`%s' attribute ignored", IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - } -@@ -1829,7 +1829,7 @@ - } - else - { -- warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); -+ warning (OPT_Wattributes,"`%s' attribute ignored", IDENTIFIER_POINTER (name)); - } - } - } -@@ -1847,7 +1847,7 @@ - { - if (TREE_CODE (*node) != FUNCTION_DECL) - { -- warning ("%qs attribute only applies to functions", -+ warning (OPT_Wattributes,"%qs attribute only applies to functions", - IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } -@@ -1866,13 +1866,13 @@ - { - if (TREE_CODE (*node) == FUNCTION_TYPE || TREE_CODE (*node) == METHOD_TYPE) - { -- warning ("`%s' attribute not yet supported...", -+ warning (OPT_Wattributes,"`%s' attribute not yet supported...", - IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - return NULL_TREE; - } - -- warning ("`%s' attribute only applies to functions", -+ warning (OPT_Wattributes,"`%s' attribute only applies to functions", - IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - return NULL_TREE; -@@ -4215,51 +4215,6 @@ - - - void --avr32_asm_output_ascii (FILE * stream, char *ptr, int len) --{ -- int i, i_new = 0; -- char *new_ptr = xmalloc (4 * len); -- if (new_ptr == NULL) -- internal_error ("Out of memory."); -- -- for (i = 0; i < len; i++) -- { -- if (ptr[i] == '\n') -- { -- new_ptr[i_new++] = '\\'; -- new_ptr[i_new++] = '0'; -- new_ptr[i_new++] = '1'; -- new_ptr[i_new++] = '2'; -- } -- else if (ptr[i] == '\"') -- { -- new_ptr[i_new++] = '\\'; -- new_ptr[i_new++] = '\"'; -- } -- else if (ptr[i] == '\\') -- { -- new_ptr[i_new++] = '\\'; -- new_ptr[i_new++] = '\\'; -- } -- else if (ptr[i] == '\0' && i + 1 < len) -- { -- new_ptr[i_new++] = '\\'; -- new_ptr[i_new++] = '0'; -- } -- else -- { -- new_ptr[i_new++] = ptr[i]; -- } -- } -- -- /* Terminate new_ptr. */ -- new_ptr[i_new] = '\0'; -- fprintf (stream, "\t.ascii\t\"%s\"\n", new_ptr); -- free (new_ptr); --} -- -- --void - avr32_asm_output_label (FILE * stream, const char *name) - { - name = avr32_strip_name_encoding (name); -@@ -4444,12 +4399,15 @@ - rtx cmp; - rtx cmp_op0, cmp_op1; - rtx cond; -+ rtx dest; -+ - if ( GET_CODE (exp) == COND_EXEC ) - { - cmp_op0 = XEXP (COND_EXEC_TEST (exp), 0); - cmp_op1 = XEXP (COND_EXEC_TEST (exp), 1); - cond = COND_EXEC_TEST (exp); -- } -+ dest = SET_DEST (COND_EXEC_CODE (exp)); -+ } - else - { - /* If then else conditional. compare operands are in operands -@@ -4457,6 +4415,7 @@ - cmp_op0 = recog_data.operand[4]; - cmp_op1 = recog_data.operand[5]; - cond = recog_data.operand[1]; -+ dest = SET_DEST (exp); - } - - if ( GET_CODE (cmp_op0) == AND ) -@@ -4466,7 +4425,15 @@ - cmp_op0, - cmp_op1); - -- if (is_compare_redundant (cmp, cond) == NULL_RTX) -+ /* Check if the conditional insns updates a register present -+ in the comparison, if so then we must reset the cc_status. */ -+ if (REG_P (dest) -+ && (reg_mentioned_p (dest, cmp_op0) -+ || reg_mentioned_p (dest, cmp_op1))) -+ { -+ CC_STATUS_INIT; -+ } -+ else if (is_compare_redundant (cmp, cond) == NULL_RTX) - { - /* Reset the nonstandard flag */ - CC_STATUS_INIT; diff --git a/toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-2.1.5/905-avr32-optimize-movsf2-use-movh-to-move-immediates-into-register.patch b/toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-2.1.5/905-avr32-optimize-movsf2-use-movh-to-move-immediates-into-register.patch deleted file mode 100644 index 08d972df2..000000000 --- a/toolchain/gcc/ext_source/Atmel/avr32/4.2.2-avr32-2.1.5/905-avr32-optimize-movsf2-use-movh-to-move-immediates-into-register.patch +++ /dev/null @@ -1,31 +0,0 @@ -Index: gcc-4.2.2/gcc/config/avr32/avr32.md -=================================================================== ---- gcc-4.2.2.orig/gcc/config/avr32/avr32.md 2008-09-19 14:23:34.000000000 +0200 -+++ gcc-4.2.2/gcc/config/avr32/avr32.md 2008-09-19 14:30:18.000000000 +0200 -@@ -803,14 +803,22 @@ - (define_insn "*movsf_internal" - [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,r,r,m") - (match_operand:SF 1 "general_operand" "r, G,F,m,r"))] -- "TARGET_SOFT_FLOAT -- && (register_operand (operands[0], SFmode) -- || register_operand (operands[1], SFmode))" -+ "(register_operand (operands[0], SFmode) -+ || register_operand (operands[1], SFmode))" - { - switch (which_alternative) { - case 0: - case 1: return "mov\t%0, %1"; -- case 2: return "mov\t%0, lo(%1)\;orh\t%0, hi(%1)"; -+ case 2: -+ { -+ HOST_WIDE_INT target_float[2]; -+ real_to_target (target_float, CONST_DOUBLE_REAL_VALUE (operands[1]), SFmode); -+ if ( TARGET_V2_INSNS -+ && avr32_hi16_immediate_operand (GEN_INT (target_float[0]), VOIDmode) ) -+ return "movh\t%0, hi(%1)"; -+ else -+ return "mov\t%0, lo(%1)\;orh\t%0, hi(%1)"; -+ } - case 3: - if ( (REG_P(XEXP(operands[1], 0)) - && REGNO(XEXP(operands[1], 0)) == SP_REGNUM) diff --git a/toolchain/gcc/ext_source/Atmel/avr32/4.2.3-avr32-2.1.5/.empty b/toolchain/gcc/ext_source/Atmel/avr32/4.2.3-avr32-2.1.5/.empty deleted file mode 100644 index e69de29bb..000000000 -- cgit v1.2.3