diff options
| author | Khem Raj <raj.khem@gmail.com> | 2011-09-19 11:34:49 +0000 |
|---|---|---|
| committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-09-19 08:26:10 +0200 |
| commit | 549f974a5df4c3e117d269007e9b671cf4e925f9 (patch) | |
| tree | f61b316be618772acfd52c4bb78fef9312259fcd /meta-oe/recipes-devtools/gcc | |
| parent | 0f149196c1de01bd557a0dfbba169d73c0d93ad3 (diff) | |
| download | meta-openembedded-549f974a5df4c3e117d269007e9b671cf4e925f9.tar.gz | |
gcc-4.5: Upgrade to latest FSF 4.5 branch and bring in latest linaro patches
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-devtools/gcc')
13 files changed, 829 insertions, 125 deletions
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5.inc b/meta-oe/recipes-devtools/gcc/gcc-4.5.inc index a7f9480366..59be31779d 100644 --- a/meta-oe/recipes-devtools/gcc/gcc-4.5.inc +++ b/meta-oe/recipes-devtools/gcc/gcc-4.5.inc | |||
| @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ | |||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | PV = "4.5" | 16 | PV = "4.5" |
| 17 | PR = "r41" | 17 | PR = "r42" |
| 18 | 18 | ||
| 19 | # BINV should be incremented after updating to a revision | 19 | # BINV should be incremented after updating to a revision |
| 20 | # after a minor gcc release (e.g. 4.5.1 or 4.5.2) has been made | 20 | # after a minor gcc release (e.g. 4.5.1 or 4.5.2) has been made |
| @@ -24,7 +24,7 @@ PR = "r41" | |||
| 24 | 24 | ||
| 25 | BINV = "${PV}.4" | 25 | BINV = "${PV}.4" |
| 26 | 26 | ||
| 27 | SRCREV = 176640 | 27 | SRCREV = 178923 |
| 28 | BRANCH = "gcc-4_5-branch" | 28 | BRANCH = "gcc-4_5-branch" |
| 29 | PR_append = "+svnr${SRCPV}" | 29 | PR_append = "+svnr${SRCPV}" |
| 30 | 30 | ||
| @@ -200,7 +200,15 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \ | |||
| 200 | file://linaro/gcc-4.5-linaro-r99525.patch \ | 200 | file://linaro/gcc-4.5-linaro-r99525.patch \ |
| 201 | file://linaro/gcc-4.5-linaro-r99528.patch \ | 201 | file://linaro/gcc-4.5-linaro-r99528.patch \ |
| 202 | file://linaro/gcc-4.5-linaro-r99529.patch \ | 202 | file://linaro/gcc-4.5-linaro-r99529.patch \ |
| 203 | file://linaro/linaro-lp815435.patch \ | 203 | file://linaro/gcc-4.5-linaro-r99530.patch \ |
| 204 | file://linaro/gcc-4.5-linaro-r99531.patch \ | ||
| 205 | file://linaro/gcc-4.5-linaro-r99532.patch \ | ||
| 206 | file://linaro/gcc-4.5-linaro-r99533.patch \ | ||
| 207 | file://linaro/gcc-4.5-linaro-r99534.patch \ | ||
| 208 | file://linaro/gcc-4.5-linaro-r99536.patch \ | ||
| 209 | file://linaro/gcc-4.5-linaro-r99537.patch \ | ||
| 210 | file://linaro/gcc-4.5-linaro-r99540.patch \ | ||
| 211 | file://linaro/gcc-4.5-linaro-r99541.patch \ | ||
| 204 | \ | 212 | \ |
| 205 | file://more-epilogues.patch \ | 213 | file://more-epilogues.patch \ |
| 206 | file://gcc-scalar-widening-pr45847.patch \ | 214 | file://gcc-scalar-widening-pr45847.patch \ |
| @@ -224,7 +232,6 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \ | |||
| 224 | file://gcc-poison-dir-extend.patch \ | 232 | file://gcc-poison-dir-extend.patch \ |
| 225 | file://gcc-poison-parameters.patch \ | 233 | file://gcc-poison-parameters.patch \ |
| 226 | file://gcc-ppc-config-fix.patch \ | 234 | file://gcc-ppc-config-fix.patch \ |
| 227 | file://gcc-ppc-include-config-linux.h.patch \ | ||
| 228 | file://use-defaults.h-and-t-oe-in-B.patch \ | 235 | file://use-defaults.h-and-t-oe-in-B.patch \ |
| 229 | " | 236 | " |
| 230 | 237 | ||
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/fedora/gcc45-no-add-needed.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/fedora/gcc45-no-add-needed.patch index 23704d3b71..bf03c27852 100644 --- a/meta-oe/recipes-devtools/gcc/gcc-4.5/fedora/gcc45-no-add-needed.patch +++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/fedora/gcc45-no-add-needed.patch | |||
| @@ -6,9 +6,11 @@ | |||
| 6 | * config/alpha/elf.h (LINK_EH_SPEC): Likewise. | 6 | * config/alpha/elf.h (LINK_EH_SPEC): Likewise. |
| 7 | * config/ia64/linux.h (LINK_EH_SPEC): Likewise. | 7 | * config/ia64/linux.h (LINK_EH_SPEC): Likewise. |
| 8 | 8 | ||
| 9 | --- gcc/config/alpha/elf.h.~1~ | 9 | Index: gcc/config/alpha/elf.h |
| 10 | +++ gcc/config/alpha/elf.h | 10 | =================================================================== |
| 11 | @@ -421,7 +421,7 @@ extern int alpha_this_gpdisp_sequence_nu | 11 | --- gcc/config/alpha/elf.h.orig 2011-06-16 17:58:47.000000000 -0700 |
| 12 | +++ gcc/config/alpha/elf.h 2011-09-17 11:04:57.033298875 -0700 | ||
| 13 | @@ -441,7 +441,7 @@ extern int alpha_this_gpdisp_sequence_nu | ||
| 12 | I imagine that other systems will catch up. In the meantime, it | 14 | I imagine that other systems will catch up. In the meantime, it |
| 13 | doesn't harm to make sure that the data exists to be used later. */ | 15 | doesn't harm to make sure that the data exists to be used later. */ |
| 14 | #if defined(HAVE_LD_EH_FRAME_HDR) | 16 | #if defined(HAVE_LD_EH_FRAME_HDR) |
| @@ -17,9 +19,11 @@ | |||
| 17 | #endif | 19 | #endif |
| 18 | 20 | ||
| 19 | /* A C statement (sans semicolon) to output to the stdio stream STREAM | 21 | /* A C statement (sans semicolon) to output to the stdio stream STREAM |
| 20 | --- gcc/config/ia64/linux.h.~1~ | 22 | Index: gcc/config/ia64/linux.h |
| 21 | +++ gcc/config/ia64/linux.h | 23 | =================================================================== |
| 22 | @@ -58,7 +58,7 @@ do { \ | 24 | --- gcc/config/ia64/linux.h.orig 2011-09-17 11:03:19.000000000 -0700 |
| 25 | +++ gcc/config/ia64/linux.h 2011-09-17 11:04:57.033298875 -0700 | ||
| 26 | @@ -80,7 +80,7 @@ do { \ | ||
| 23 | Signalize that because we have fde-glibc, we don't need all C shared libs | 27 | Signalize that because we have fde-glibc, we don't need all C shared libs |
| 24 | linked against -lgcc_s. */ | 28 | linked against -lgcc_s. */ |
| 25 | #undef LINK_EH_SPEC | 29 | #undef LINK_EH_SPEC |
| @@ -28,9 +32,11 @@ | |||
| 28 | 32 | ||
| 29 | #define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h" | 33 | #define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h" |
| 30 | 34 | ||
| 31 | --- gcc/config/linux.h.~1~ | 35 | Index: gcc/config/linux.h |
| 32 | +++ gcc/config/linux.h | 36 | =================================================================== |
| 33 | @@ -89,7 +89,7 @@ see the files COPYING3 and COPYING.RUNTI | 37 | --- gcc/config/linux.h.orig 2011-09-17 11:03:38.000000000 -0700 |
| 38 | +++ gcc/config/linux.h 2011-09-17 11:04:57.033298875 -0700 | ||
| 39 | @@ -101,7 +101,7 @@ see the files COPYING3 and COPYING.RUNTI | ||
| 34 | } while (0) | 40 | } while (0) |
| 35 | 41 | ||
| 36 | #if defined(HAVE_LD_EH_FRAME_HDR) | 42 | #if defined(HAVE_LD_EH_FRAME_HDR) |
| @@ -39,12 +45,14 @@ | |||
| 39 | #endif | 45 | #endif |
| 40 | 46 | ||
| 41 | /* Define this so we can compile MS code for use with WINE. */ | 47 | /* Define this so we can compile MS code for use with WINE. */ |
| 42 | --- gcc/config/rs6000/sysv4.h.~1~ | 48 | Index: gcc/config/rs6000/sysv4.h |
| 43 | +++ gcc/config/rs6000/sysv4.h | 49 | =================================================================== |
| 44 | @@ -917,7 +917,7 @@ SVR4_ASM_SPEC \ | 50 | --- gcc/config/rs6000/sysv4.h.orig 2011-09-17 11:03:41.000000000 -0700 |
| 45 | %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}" | 51 | +++ gcc/config/rs6000/sysv4.h 2011-09-17 11:05:58.653298861 -0700 |
| 52 | @@ -908,7 +908,7 @@ SVR4_ASM_SPEC \ | ||
| 46 | 53 | ||
| 47 | #if defined(HAVE_LD_EH_FRAME_HDR) | 54 | #if defined(HAVE_LD_EH_FRAME_HDR) |
| 55 | # undef LINK_EH_SPEC | ||
| 48 | -# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " | 56 | -# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " |
| 49 | +# define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} " | 57 | +# define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} " |
| 50 | #endif | 58 | #endif |
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/gcc-ppc-config-fix.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/gcc-ppc-config-fix.patch index 9c2c298882..6ae75a012b 100644 --- a/meta-oe/recipes-devtools/gcc/gcc-4.5/gcc-ppc-config-fix.patch +++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/gcc-ppc-config-fix.patch | |||
| @@ -20,11 +20,11 @@ Date: Mon Dec 20 15:29:31 2010 +0000 | |||
| 20 | 20 | ||
| 21 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168085 138bc75d-0d04-0410-961f-82ee72b054a4 | 21 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168085 138bc75d-0d04-0410-961f-82ee72b054a4 |
| 22 | 22 | ||
| 23 | Index: gcc-4.5.3/gcc/config.gcc | 23 | Index: gcc-4_5-branch/gcc/config.gcc |
| 24 | =================================================================== | 24 | =================================================================== |
| 25 | --- gcc-4.5.3.orig/gcc/config.gcc 2011-06-15 21:18:55.000000000 -0700 | 25 | --- gcc-4_5-branch.orig/gcc/config.gcc 2011-09-17 11:11:28.000000000 -0700 |
| 26 | +++ gcc-4.5.3/gcc/config.gcc 2011-06-16 15:01:07.945285352 -0700 | 26 | +++ gcc-4_5-branch/gcc/config.gcc 2011-09-17 11:16:32.543298716 -0700 |
| 27 | @@ -1989,53 +1989,53 @@ | 27 | @@ -1989,48 +1989,48 @@ powerpc-*-netbsd*) |
| 28 | extra_options="${extra_options} rs6000/sysv4.opt" | 28 | extra_options="${extra_options} rs6000/sysv4.opt" |
| 29 | ;; | 29 | ;; |
| 30 | powerpc-*-eabispe*) | 30 | powerpc-*-eabispe*) |
| @@ -81,13 +81,7 @@ Index: gcc-4.5.3/gcc/config.gcc | |||
| 81 | extra_options="${extra_options} rs6000/sysv4.opt" | 81 | extra_options="${extra_options} rs6000/sysv4.opt" |
| 82 | tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-rtems t-rtems rs6000/t-ppccomm" | 82 | tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-rtems t-rtems rs6000/t-ppccomm" |
| 83 | ;; | 83 | ;; |
| 84 | powerpc-*-linux* | powerpc64-*-linux*) | 84 | @@ -2079,12 +2079,12 @@ powerpc-*-linux* | powerpc64-*-linux*) |
| 85 | - tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h" | ||
| 86 | + tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h" | ||
| 87 | extra_options="${extra_options} rs6000/sysv4.opt" | ||
| 88 | tmake_file="t-dfprules rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm" | ||
| 89 | maybe_biarch=yes | ||
| 90 | @@ -2079,12 +2079,12 @@ | ||
| 91 | fi | 85 | fi |
| 92 | ;; | 86 | ;; |
| 93 | powerpc64-*-gnu*) | 87 | powerpc64-*-gnu*) |
| @@ -102,7 +96,7 @@ Index: gcc-4.5.3/gcc/config.gcc | |||
| 102 | extra_options="${extra_options} rs6000/sysv4.opt" | 96 | extra_options="${extra_options} rs6000/sysv4.opt" |
| 103 | tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu rs6000/t-ppccomm" | 97 | tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu rs6000/t-ppccomm" |
| 104 | if test x$enable_threads = xyes; then | 98 | if test x$enable_threads = xyes; then |
| 105 | @@ -2092,7 +2092,7 @@ | 99 | @@ -2092,7 +2092,7 @@ powerpc-*-gnu-gnualtivec*) |
| 106 | fi | 100 | fi |
| 107 | ;; | 101 | ;; |
| 108 | powerpc-*-gnu*) | 102 | powerpc-*-gnu*) |
| @@ -111,7 +105,7 @@ Index: gcc-4.5.3/gcc/config.gcc | |||
| 111 | tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu rs6000/t-ppccomm" | 105 | tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu rs6000/t-ppccomm" |
| 112 | extra_options="${extra_options} rs6000/sysv4.opt" | 106 | extra_options="${extra_options} rs6000/sysv4.opt" |
| 113 | if test x$enable_threads = xyes; then | 107 | if test x$enable_threads = xyes; then |
| 114 | @@ -2100,7 +2100,7 @@ | 108 | @@ -2100,7 +2100,7 @@ powerpc-*-gnu*) |
| 115 | fi | 109 | fi |
| 116 | ;; | 110 | ;; |
| 117 | powerpc-wrs-vxworks|powerpc-wrs-vxworksae) | 111 | powerpc-wrs-vxworks|powerpc-wrs-vxworksae) |
| @@ -120,7 +114,7 @@ Index: gcc-4.5.3/gcc/config.gcc | |||
| 120 | tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppccomm rs6000/t-vxworks" | 114 | tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppccomm rs6000/t-vxworks" |
| 121 | extra_options="${extra_options} rs6000/sysv4.opt" | 115 | extra_options="${extra_options} rs6000/sysv4.opt" |
| 122 | extra_headers=ppc-asm.h | 116 | extra_headers=ppc-asm.h |
| 123 | @@ -2126,18 +2126,18 @@ | 117 | @@ -2126,18 +2126,18 @@ powerpc-*-lynxos*) |
| 124 | gas=yes | 118 | gas=yes |
| 125 | ;; | 119 | ;; |
| 126 | powerpcle-*-elf*) | 120 | powerpcle-*-elf*) |
| @@ -142,10 +136,10 @@ Index: gcc-4.5.3/gcc/config.gcc | |||
| 142 | tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm" | 136 | tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm" |
| 143 | extra_options="${extra_options} rs6000/sysv4.opt" | 137 | extra_options="${extra_options} rs6000/sysv4.opt" |
| 144 | use_gcc_stdint=wrap | 138 | use_gcc_stdint=wrap |
| 145 | Index: gcc-4.5.3/gcc/config/rs6000/freebsd.h | 139 | Index: gcc-4_5-branch/gcc/config/rs6000/freebsd.h |
| 146 | =================================================================== | 140 | =================================================================== |
| 147 | --- gcc-4.5.3.orig/gcc/config/rs6000/freebsd.h 2009-08-10 11:23:57.000000000 -0700 | 141 | --- gcc-4_5-branch.orig/gcc/config/rs6000/freebsd.h 2011-06-16 17:58:58.000000000 -0700 |
| 148 | +++ gcc-4.5.3/gcc/config/rs6000/freebsd.h 2011-06-16 15:02:02.775285339 -0700 | 142 | +++ gcc-4_5-branch/gcc/config/rs6000/freebsd.h 2011-09-17 11:13:13.623298761 -0700 |
| 149 | @@ -69,6 +69,4 @@ | 143 | @@ -69,6 +69,4 @@ |
| 150 | /* Override rs6000.h definition. */ | 144 | /* Override rs6000.h definition. */ |
| 151 | #undef ASM_APP_OFF | 145 | #undef ASM_APP_OFF |
| @@ -154,10 +148,10 @@ Index: gcc-4.5.3/gcc/config/rs6000/freebsd.h | |||
| 154 | -#define SVR4_ASM_SPEC \ | 148 | -#define SVR4_ASM_SPEC \ |
| 155 | - "%{v:-V} %{Wa,*:%*}" | 149 | - "%{v:-V} %{Wa,*:%*}" |
| 156 | +#define DBX_REGISTER_NUMBER(REGNO) rs6000_dbx_register_number (REGNO) | 150 | +#define DBX_REGISTER_NUMBER(REGNO) rs6000_dbx_register_number (REGNO) |
| 157 | Index: gcc-4.5.3/gcc/config/rs6000/lynx.h | 151 | Index: gcc-4_5-branch/gcc/config/rs6000/lynx.h |
| 158 | =================================================================== | 152 | =================================================================== |
| 159 | --- gcc-4.5.3.orig/gcc/config/rs6000/lynx.h 2007-08-02 03:49:31.000000000 -0700 | 153 | --- gcc-4_5-branch.orig/gcc/config/rs6000/lynx.h 2011-06-16 17:58:58.000000000 -0700 |
| 160 | +++ gcc-4.5.3/gcc/config/rs6000/lynx.h 2011-06-16 15:01:07.945285352 -0700 | 154 | +++ gcc-4_5-branch/gcc/config/rs6000/lynx.h 2011-09-17 11:13:13.623298761 -0700 |
| 161 | @@ -1,5 +1,5 @@ | 155 | @@ -1,5 +1,5 @@ |
| 162 | /* Definitions for Rs6000 running LynxOS. | 156 | /* Definitions for Rs6000 running LynxOS. |
| 163 | - Copyright (C) 1995, 1996, 2000, 2002, 2003, 2004, 2005, 2007 | 157 | - Copyright (C) 1995, 1996, 2000, 2002, 2003, 2004, 2005, 2007 |
| @@ -174,10 +168,10 @@ Index: gcc-4.5.3/gcc/config/rs6000/lynx.h | |||
| 174 | #ifdef CRT_BEGIN | 168 | #ifdef CRT_BEGIN |
| 175 | /* This function is part of crtbegin*.o which is at the beginning of | 169 | /* This function is part of crtbegin*.o which is at the beginning of |
| 176 | the link and is called from .fini which is usually toward the end | 170 | the link and is called from .fini which is usually toward the end |
| 177 | Index: gcc-4.5.3/gcc/config/rs6000/netbsd.h | 171 | Index: gcc-4_5-branch/gcc/config/rs6000/netbsd.h |
| 178 | =================================================================== | 172 | =================================================================== |
| 179 | --- gcc-4.5.3.orig/gcc/config/rs6000/netbsd.h 2009-02-20 07:20:38.000000000 -0800 | 173 | --- gcc-4_5-branch.orig/gcc/config/rs6000/netbsd.h 2011-06-16 17:58:58.000000000 -0700 |
| 180 | +++ gcc-4.5.3/gcc/config/rs6000/netbsd.h 2011-06-16 15:01:07.945285352 -0700 | 174 | +++ gcc-4_5-branch/gcc/config/rs6000/netbsd.h 2011-09-17 11:13:13.623298761 -0700 |
| 181 | @@ -1,6 +1,6 @@ | 175 | @@ -1,6 +1,6 @@ |
| 182 | /* Definitions of target machine for GNU compiler, | 176 | /* Definitions of target machine for GNU compiler, |
| 183 | for PowerPC NetBSD systems. | 177 | for PowerPC NetBSD systems. |
| @@ -192,11 +186,11 @@ Index: gcc-4.5.3/gcc/config/rs6000/netbsd.h | |||
| 192 | #define TARGET_VERSION fprintf (stderr, " (NetBSD/powerpc ELF)"); | 186 | #define TARGET_VERSION fprintf (stderr, " (NetBSD/powerpc ELF)"); |
| 193 | + | 187 | + |
| 194 | +#define DBX_REGISTER_NUMBER(REGNO) rs6000_dbx_register_number (REGNO) | 188 | +#define DBX_REGISTER_NUMBER(REGNO) rs6000_dbx_register_number (REGNO) |
| 195 | Index: gcc-4.5.3/gcc/config/rs6000/sysv4.h | 189 | Index: gcc-4_5-branch/gcc/config/rs6000/sysv4.h |
| 196 | =================================================================== | 190 | =================================================================== |
| 197 | --- gcc-4.5.3.orig/gcc/config/rs6000/sysv4.h 2011-06-15 21:18:57.000000000 -0700 | 191 | --- gcc-4_5-branch.orig/gcc/config/rs6000/sysv4.h 2011-09-17 11:11:29.000000000 -0700 |
| 198 | +++ gcc-4.5.3/gcc/config/rs6000/sysv4.h 2011-06-16 15:01:07.945285352 -0700 | 192 | +++ gcc-4_5-branch/gcc/config/rs6000/sysv4.h 2011-09-17 11:13:13.623298761 -0700 |
| 199 | @@ -293,6 +293,10 @@ | 193 | @@ -293,6 +293,10 @@ do { \ |
| 200 | #define RESTORE_FP_PREFIX "_restfpr_" | 194 | #define RESTORE_FP_PREFIX "_restfpr_" |
| 201 | #define RESTORE_FP_SUFFIX "" | 195 | #define RESTORE_FP_SUFFIX "" |
| 202 | 196 | ||
| @@ -207,7 +201,7 @@ Index: gcc-4.5.3/gcc/config/rs6000/sysv4.h | |||
| 207 | /* Type used for ptrdiff_t, as a string used in a declaration. */ | 201 | /* Type used for ptrdiff_t, as a string used in a declaration. */ |
| 208 | #define PTRDIFF_TYPE "int" | 202 | #define PTRDIFF_TYPE "int" |
| 209 | 203 | ||
| 210 | @@ -588,9 +592,8 @@ | 204 | @@ -588,9 +592,8 @@ extern int fixuplabelno; |
| 211 | /* Override svr4.h definition. */ | 205 | /* Override svr4.h definition. */ |
| 212 | #undef ASM_SPEC | 206 | #undef ASM_SPEC |
| 213 | #define ASM_SPEC "%(asm_cpu) \ | 207 | #define ASM_SPEC "%(asm_cpu) \ |
| @@ -219,7 +213,7 @@ Index: gcc-4.5.3/gcc/config/rs6000/sysv4.h | |||
| 219 | %{memb|msdata=eabi: -memb} \ | 213 | %{memb|msdata=eabi: -memb} \ |
| 220 | %{mlittle|mlittle-endian:-mlittle; \ | 214 | %{mlittle|mlittle-endian:-mlittle; \ |
| 221 | mbig|mbig-endian :-mbig; \ | 215 | mbig|mbig-endian :-mbig; \ |
| 222 | @@ -1127,3 +1130,5 @@ | 216 | @@ -1120,3 +1123,5 @@ ncrtn.o%s" |
| 223 | 217 | ||
| 224 | /* This target uses the sysv4.opt file. */ | 218 | /* This target uses the sysv4.opt file. */ |
| 225 | #define TARGET_USES_SYSV4_OPT 1 | 219 | #define TARGET_USES_SYSV4_OPT 1 |
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/gcc-ppc-include-config-linux.h.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/gcc-ppc-include-config-linux.h.patch deleted file mode 100644 index 97364d9b14..0000000000 --- a/meta-oe/recipes-devtools/gcc/gcc-4.5/gcc-ppc-include-config-linux.h.patch +++ /dev/null | |||
| @@ -1,73 +0,0 @@ | |||
| 1 | The patch is a solution for https://bugs.launchpad.net/ubuntu/+source/gcc-4.5/+bug/768921 | ||
| 2 | |||
| 3 | -Khem | ||
| 4 | |||
| 5 | Index: gcc-4_5-branch/gcc/config.gcc | ||
| 6 | =================================================================== | ||
| 7 | --- gcc-4_5-branch.orig/gcc/config.gcc 2011-06-16 21:23:22.000000000 -0700 | ||
| 8 | +++ gcc-4_5-branch/gcc/config.gcc 2011-06-16 21:51:20.845279713 -0700 | ||
| 9 | @@ -2035,7 +2035,7 @@ | ||
| 10 | tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-rtems t-rtems rs6000/t-ppccomm" | ||
| 11 | ;; | ||
| 12 | powerpc-*-linux* | powerpc64-*-linux*) | ||
| 13 | - tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h" | ||
| 14 | + tm_file="${tm_file} dbxelf.h elfos.h linux.h freebsd-spec.h rs6000/sysv4.h" | ||
| 15 | extra_options="${extra_options} rs6000/sysv4.opt" | ||
| 16 | tmake_file="t-dfprules rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm" | ||
| 17 | maybe_biarch=yes | ||
| 18 | Index: gcc-4_5-branch/gcc/config/rs6000/sysv4.h | ||
| 19 | =================================================================== | ||
| 20 | --- gcc-4_5-branch.orig/gcc/config/rs6000/sysv4.h 2011-06-16 21:23:22.000000000 -0700 | ||
| 21 | +++ gcc-4_5-branch/gcc/config/rs6000/sysv4.h 2011-06-16 22:08:49.425279473 -0700 | ||
| 22 | @@ -620,6 +620,7 @@ | ||
| 23 | #define CC1_SECURE_PLT_DEFAULT_SPEC "" | ||
| 24 | #endif | ||
| 25 | |||
| 26 | +#undef CC1_SPEC | ||
| 27 | /* Pass -G xxx to the compiler and set correct endian mode. */ | ||
| 28 | #define CC1_SPEC "%{G*} %(cc1_cpu) \ | ||
| 29 | %{mlittle|mlittle-endian: %(cc1_endian_little); \ | ||
| 30 | @@ -903,22 +904,13 @@ | ||
| 31 | #define LINK_START_LINUX_SPEC "" | ||
| 32 | |||
| 33 | #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" | ||
| 34 | -#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
| 35 | -#if DEFAULT_LIBC == LIBC_UCLIBC | ||
| 36 | -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" | ||
| 37 | -#elif DEFAULT_LIBC == LIBC_GLIBC | ||
| 38 | -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" | ||
| 39 | -#else | ||
| 40 | -#error "Unsupported DEFAULT_LIBC" | ||
| 41 | -#endif | ||
| 42 | -#define LINUX_DYNAMIC_LINKER \ | ||
| 43 | - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) | ||
| 44 | |||
| 45 | #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ | ||
| 46 | %{rdynamic:-export-dynamic} \ | ||
| 47 | %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}" | ||
| 48 | |||
| 49 | #if defined(HAVE_LD_EH_FRAME_HDR) | ||
| 50 | +# undef LINK_EH_SPEC | ||
| 51 | # define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} " | ||
| 52 | #endif | ||
| 53 | |||
| 54 | @@ -1113,6 +1105,7 @@ | ||
| 55 | be stacked, so that invocations of #pragma pack(pop)' will return | ||
| 56 | to the previous value. */ | ||
| 57 | |||
| 58 | +#undef HANDLE_PRAGMA_PACK_PUSH_POP | ||
| 59 | #define HANDLE_PRAGMA_PACK_PUSH_POP 1 | ||
| 60 | |||
| 61 | /* Select a format to encode pointers in exception handling data. CODE | ||
| 62 | Index: gcc-4_5-branch/gcc/config/freebsd-spec.h | ||
| 63 | =================================================================== | ||
| 64 | --- gcc-4_5-branch.orig/gcc/config/freebsd-spec.h 2011-06-16 17:59:03.000000000 -0700 | ||
| 65 | +++ gcc-4_5-branch/gcc/config/freebsd-spec.h 2011-06-16 22:11:34.145279435 -0700 | ||
| 66 | @@ -154,6 +154,7 @@ | ||
| 67 | #endif | ||
| 68 | |||
| 69 | #if defined(HAVE_LD_EH_FRAME_HDR) | ||
| 70 | +#undef LINK_EH_SPEC | ||
| 71 | #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " | ||
| 72 | #endif | ||
| 73 | |||
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99530.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99530.patch new file mode 100644 index 0000000000..64d6262d60 --- /dev/null +++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99530.patch | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | 2011-07-21 Richard Sandiford <rdsandiford@googlemail.com> | ||
| 2 | |||
| 3 | gcc/ | ||
| 4 | Backport from mainline: | ||
| 5 | |||
| 6 | 2011-07-21 Richard Sandiford <richard.sandiford@linaro.org> | ||
| 7 | |||
| 8 | * regcprop.c (maybe_mode_change): Check HARD_REGNO_MODE_OK. | ||
| 9 | |||
| 10 | === modified file 'gcc/regcprop.c' | ||
| 11 | --- old/gcc/regcprop.c 2010-08-05 15:28:47 +0000 | ||
| 12 | +++ new/gcc/regcprop.c 2011-07-21 12:40:44 +0000 | ||
| 13 | @@ -418,10 +418,9 @@ | ||
| 14 | |||
| 15 | offset = ((WORDS_BIG_ENDIAN ? wordoffset : 0) | ||
| 16 | + (BYTES_BIG_ENDIAN ? byteoffset : 0)); | ||
| 17 | - return gen_rtx_raw_REG (new_mode, | ||
| 18 | - regno + subreg_regno_offset (regno, orig_mode, | ||
| 19 | - offset, | ||
| 20 | - new_mode)); | ||
| 21 | + regno += subreg_regno_offset (regno, orig_mode, offset, new_mode); | ||
| 22 | + if (HARD_REGNO_MODE_OK (regno, new_mode)) | ||
| 23 | + return gen_rtx_raw_REG (new_mode, regno); | ||
| 24 | } | ||
| 25 | return NULL_RTX; | ||
| 26 | } | ||
| 27 | |||
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/linaro-lp815435.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99531.patch index be71a2f64a..5559dfeda4 100644 --- a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/linaro-lp815435.patch +++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99531.patch | |||
| @@ -2,17 +2,16 @@ | |||
| 2 | 2 | ||
| 3 | gcc/ | 3 | gcc/ |
| 4 | Backport only bits marked as [*] from mainline: | 4 | Backport only bits marked as [*] from mainline: |
| 5 | 2010-12-19 Chung-Lin Tang <cltang@codesourcery.com> | 5 | 2010-12-19 Chung-Lin Tang <cltang@codesourcery.com> |
| 6 | 6 | ||
| 7 | * config/arm/arm.c ([*]arm_legitimate_index_p): Add VFP load/store | 7 | * config/arm/arm.c ([*]arm_legitimate_index_p): Add VFP load/store |
| 8 | index range case. Change to SF/DFmode tests to avoid capturing HFmode. | 8 | index range case. Change to SF/DFmode tests to avoid capturing HFmode. |
| 9 | (thumb2_legitimate_index_p): Same. | 9 | (thumb2_legitimate_index_p): Same. |
| 10 | 10 | ||
| 11 | Index: gcc-4_5-branch/gcc/config/arm/arm.c | 11 | === modified file 'gcc/config/arm/arm.c' |
| 12 | =================================================================== | 12 | --- old/gcc/config/arm/arm.c 2011-06-29 10:46:39 +0000 |
| 13 | --- gcc-4_5-branch.orig/gcc/config/arm/arm.c 2011-07-22 17:56:51.000000000 -0700 | 13 | +++ new/gcc/config/arm/arm.c 2011-07-29 15:01:53 +0000 |
| 14 | +++ gcc-4_5-branch/gcc/config/arm/arm.c 2011-07-29 14:43:42.171610966 -0700 | 14 | @@ -5643,8 +5643,8 @@ |
| 15 | @@ -5631,8 +5631,8 @@ arm_legitimate_index_p (enum machine_mod | ||
| 16 | 15 | ||
| 17 | /* Standard coprocessor addressing modes. */ | 16 | /* Standard coprocessor addressing modes. */ |
| 18 | if (TARGET_HARD_FLOAT | 17 | if (TARGET_HARD_FLOAT |
| @@ -23,3 +22,4 @@ Index: gcc-4_5-branch/gcc/config/arm/arm.c | |||
| 23 | || (TARGET_MAVERICK && mode == DImode))) | 22 | || (TARGET_MAVERICK && mode == DImode))) |
| 24 | return (code == CONST_INT && INTVAL (index) < 1024 | 23 | return (code == CONST_INT && INTVAL (index) < 1024 |
| 25 | && INTVAL (index) > -1024 | 24 | && INTVAL (index) > -1024 |
| 25 | |||
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99532.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99532.patch new file mode 100644 index 0000000000..0c2c02b6fb --- /dev/null +++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99532.patch | |||
| @@ -0,0 +1,456 @@ | |||
| 1 | 2011-08-03 Revital Eres <revital.eres@linaro.org> | ||
| 2 | |||
| 3 | * modulo-sched.c (calculate_stage_count, | ||
| 4 | calculate_must_precede_follow, get_sched_window, | ||
| 5 | try_scheduling_node_in_cycle, remove_node_from_ps): Add | ||
| 6 | declaration. | ||
| 7 | (update_node_sched_params, set_must_precede_follow, optimize_sc): | ||
| 8 | New functions. | ||
| 9 | (reset_sched_times): Call update_node_sched_params. | ||
| 10 | (sms_schedule): Call optimize_sc. | ||
| 11 | (get_sched_window): Change function arguments. | ||
| 12 | (sms_schedule_by_order): Update call to get_sched_window. | ||
| 13 | Call set_must_precede_follow. | ||
| 14 | (calculate_stage_count): Add function argument. | ||
| 15 | |||
| 16 | === modified file 'gcc/modulo-sched.c' | ||
| 17 | --- old/gcc/modulo-sched.c 2011-07-04 11:39:09 +0000 | ||
| 18 | +++ new/gcc/modulo-sched.c 2011-08-03 12:20:38 +0000 | ||
| 19 | @@ -202,7 +202,16 @@ | ||
| 20 | rtx, rtx); | ||
| 21 | static void duplicate_insns_of_cycles (partial_schedule_ptr, | ||
| 22 | int, int, int, rtx); | ||
| 23 | -static int calculate_stage_count (partial_schedule_ptr ps); | ||
| 24 | +static int calculate_stage_count (partial_schedule_ptr, int); | ||
| 25 | +static void calculate_must_precede_follow (ddg_node_ptr, int, int, | ||
| 26 | + int, int, sbitmap, sbitmap, sbitmap); | ||
| 27 | +static int get_sched_window (partial_schedule_ptr, ddg_node_ptr, | ||
| 28 | + sbitmap, int, int *, int *, int *); | ||
| 29 | +static bool try_scheduling_node_in_cycle (partial_schedule_ptr, ddg_node_ptr, | ||
| 30 | + int, int, sbitmap, int *, sbitmap, | ||
| 31 | + sbitmap); | ||
| 32 | +static bool remove_node_from_ps (partial_schedule_ptr, ps_insn_ptr); | ||
| 33 | + | ||
| 34 | #define SCHED_ASAP(x) (((node_sched_params_ptr)(x)->aux.info)->asap) | ||
| 35 | #define SCHED_TIME(x) (((node_sched_params_ptr)(x)->aux.info)->time) | ||
| 36 | #define SCHED_FIRST_REG_MOVE(x) \ | ||
| 37 | @@ -576,6 +585,36 @@ | ||
| 38 | } | ||
| 39 | } | ||
| 40 | |||
| 41 | +/* Update the sched_params (time, row and stage) for node U using the II, | ||
| 42 | + the CYCLE of U and MIN_CYCLE. | ||
| 43 | + We're not simply taking the following | ||
| 44 | + SCHED_STAGE (u) = CALC_STAGE_COUNT (SCHED_TIME (u), min_cycle, ii); | ||
| 45 | + because the stages may not be aligned on cycle 0. */ | ||
| 46 | +static void | ||
| 47 | +update_node_sched_params (ddg_node_ptr u, int ii, int cycle, int min_cycle) | ||
| 48 | +{ | ||
| 49 | + int sc_until_cycle_zero; | ||
| 50 | + int stage; | ||
| 51 | + | ||
| 52 | + SCHED_TIME (u) = cycle; | ||
| 53 | + SCHED_ROW (u) = SMODULO (cycle, ii); | ||
| 54 | + | ||
| 55 | + /* The calculation of stage count is done adding the number | ||
| 56 | + of stages before cycle zero and after cycle zero. */ | ||
| 57 | + sc_until_cycle_zero = CALC_STAGE_COUNT (-1, min_cycle, ii); | ||
| 58 | + | ||
| 59 | + if (SCHED_TIME (u) < 0) | ||
| 60 | + { | ||
| 61 | + stage = CALC_STAGE_COUNT (-1, SCHED_TIME (u), ii); | ||
| 62 | + SCHED_STAGE (u) = sc_until_cycle_zero - stage; | ||
| 63 | + } | ||
| 64 | + else | ||
| 65 | + { | ||
| 66 | + stage = CALC_STAGE_COUNT (SCHED_TIME (u), 0, ii); | ||
| 67 | + SCHED_STAGE (u) = sc_until_cycle_zero + stage - 1; | ||
| 68 | + } | ||
| 69 | +} | ||
| 70 | + | ||
| 71 | /* Bump the SCHED_TIMEs of all nodes by AMOUNT. Set the values of | ||
| 72 | SCHED_ROW and SCHED_STAGE. */ | ||
| 73 | static void | ||
| 74 | @@ -591,7 +630,6 @@ | ||
| 75 | ddg_node_ptr u = crr_insn->node; | ||
| 76 | int normalized_time = SCHED_TIME (u) - amount; | ||
| 77 | int new_min_cycle = PS_MIN_CYCLE (ps) - amount; | ||
| 78 | - int sc_until_cycle_zero, stage; | ||
| 79 | |||
| 80 | if (dump_file) | ||
| 81 | { | ||
| 82 | @@ -607,23 +645,9 @@ | ||
| 83 | |||
| 84 | gcc_assert (SCHED_TIME (u) >= ps->min_cycle); | ||
| 85 | gcc_assert (SCHED_TIME (u) <= ps->max_cycle); | ||
| 86 | - SCHED_TIME (u) = normalized_time; | ||
| 87 | - SCHED_ROW (u) = SMODULO (normalized_time, ii); | ||
| 88 | - | ||
| 89 | - /* The calculation of stage count is done adding the number | ||
| 90 | - of stages before cycle zero and after cycle zero. */ | ||
| 91 | - sc_until_cycle_zero = CALC_STAGE_COUNT (-1, new_min_cycle, ii); | ||
| 92 | - | ||
| 93 | - if (SCHED_TIME (u) < 0) | ||
| 94 | - { | ||
| 95 | - stage = CALC_STAGE_COUNT (-1, SCHED_TIME (u), ii); | ||
| 96 | - SCHED_STAGE (u) = sc_until_cycle_zero - stage; | ||
| 97 | - } | ||
| 98 | - else | ||
| 99 | - { | ||
| 100 | - stage = CALC_STAGE_COUNT (SCHED_TIME (u), 0, ii); | ||
| 101 | - SCHED_STAGE (u) = sc_until_cycle_zero + stage - 1; | ||
| 102 | - } | ||
| 103 | + | ||
| 104 | + crr_insn->cycle = normalized_time; | ||
| 105 | + update_node_sched_params (u, ii, normalized_time, new_min_cycle); | ||
| 106 | } | ||
| 107 | } | ||
| 108 | |||
| 109 | @@ -660,6 +684,206 @@ | ||
| 110 | PREV_INSN (last)); | ||
| 111 | } | ||
| 112 | |||
| 113 | +/* Set bitmaps TMP_FOLLOW and TMP_PRECEDE to MUST_FOLLOW and MUST_PRECEDE | ||
| 114 | + respectively only if cycle C falls on the border of the scheduling | ||
| 115 | + window boundaries marked by START and END cycles. STEP is the | ||
| 116 | + direction of the window. */ | ||
| 117 | +static inline void | ||
| 118 | +set_must_precede_follow (sbitmap *tmp_follow, sbitmap must_follow, | ||
| 119 | + sbitmap *tmp_precede, sbitmap must_precede, int c, | ||
| 120 | + int start, int end, int step) | ||
| 121 | +{ | ||
| 122 | + *tmp_precede = NULL; | ||
| 123 | + *tmp_follow = NULL; | ||
| 124 | + | ||
| 125 | + if (c == start) | ||
| 126 | + { | ||
| 127 | + if (step == 1) | ||
| 128 | + *tmp_precede = must_precede; | ||
| 129 | + else /* step == -1. */ | ||
| 130 | + *tmp_follow = must_follow; | ||
| 131 | + } | ||
| 132 | + if (c == end - step) | ||
| 133 | + { | ||
| 134 | + if (step == 1) | ||
| 135 | + *tmp_follow = must_follow; | ||
| 136 | + else /* step == -1. */ | ||
| 137 | + *tmp_precede = must_precede; | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | +} | ||
| 141 | + | ||
| 142 | +/* Return True if the branch can be moved to row ii-1 while | ||
| 143 | + normalizing the partial schedule PS to start from cycle zero and thus | ||
| 144 | + optimize the SC. Otherwise return False. */ | ||
| 145 | +static bool | ||
| 146 | +optimize_sc (partial_schedule_ptr ps, ddg_ptr g) | ||
| 147 | +{ | ||
| 148 | + int amount = PS_MIN_CYCLE (ps); | ||
| 149 | + sbitmap sched_nodes = sbitmap_alloc (g->num_nodes); | ||
| 150 | + int start, end, step; | ||
| 151 | + int ii = ps->ii; | ||
| 152 | + bool ok = false; | ||
| 153 | + int stage_count, stage_count_curr; | ||
| 154 | + | ||
| 155 | + /* Compare the SC after normalization and SC after bringing the branch | ||
| 156 | + to row ii-1. If they are equal just bail out. */ | ||
| 157 | + stage_count = calculate_stage_count (ps, amount); | ||
| 158 | + stage_count_curr = | ||
| 159 | + calculate_stage_count (ps, SCHED_TIME (g->closing_branch) - (ii - 1)); | ||
| 160 | + | ||
| 161 | + if (stage_count == stage_count_curr) | ||
| 162 | + { | ||
| 163 | + if (dump_file) | ||
| 164 | + fprintf (dump_file, "SMS SC already optimized.\n"); | ||
| 165 | + | ||
| 166 | + ok = false; | ||
| 167 | + goto clear; | ||
| 168 | + } | ||
| 169 | + | ||
| 170 | + if (dump_file) | ||
| 171 | + { | ||
| 172 | + fprintf (dump_file, "SMS Trying to optimize branch location\n"); | ||
| 173 | + fprintf (dump_file, "SMS partial schedule before trial:\n"); | ||
| 174 | + print_partial_schedule (ps, dump_file); | ||
| 175 | + } | ||
| 176 | + | ||
| 177 | + /* First, normalize the partial scheduling. */ | ||
| 178 | + reset_sched_times (ps, amount); | ||
| 179 | + rotate_partial_schedule (ps, amount); | ||
| 180 | + if (dump_file) | ||
| 181 | + { | ||
| 182 | + fprintf (dump_file, | ||
| 183 | + "SMS partial schedule after normalization (ii, %d, SC %d):\n", | ||
| 184 | + ii, stage_count); | ||
| 185 | + print_partial_schedule (ps, dump_file); | ||
| 186 | + } | ||
| 187 | + | ||
| 188 | + if (SMODULO (SCHED_TIME (g->closing_branch), ii) == ii - 1) | ||
| 189 | + { | ||
| 190 | + ok = true; | ||
| 191 | + goto clear; | ||
| 192 | + } | ||
| 193 | + | ||
| 194 | + sbitmap_ones (sched_nodes); | ||
| 195 | + | ||
| 196 | + /* Calculate the new placement of the branch. It should be in row | ||
| 197 | + ii-1 and fall into it's scheduling window. */ | ||
| 198 | + if (get_sched_window (ps, g->closing_branch, sched_nodes, ii, &start, | ||
| 199 | + &step, &end) == 0) | ||
| 200 | + { | ||
| 201 | + bool success; | ||
| 202 | + ps_insn_ptr next_ps_i; | ||
| 203 | + int branch_cycle = SCHED_TIME (g->closing_branch); | ||
| 204 | + int row = SMODULO (branch_cycle, ps->ii); | ||
| 205 | + int num_splits = 0; | ||
| 206 | + sbitmap must_precede, must_follow, tmp_precede, tmp_follow; | ||
| 207 | + int c; | ||
| 208 | + | ||
| 209 | + if (dump_file) | ||
| 210 | + fprintf (dump_file, "\nTrying to schedule node %d " | ||
| 211 | + "INSN = %d in (%d .. %d) step %d\n", | ||
| 212 | + g->closing_branch->cuid, | ||
| 213 | + (INSN_UID (g->closing_branch->insn)), start, end, step); | ||
| 214 | + | ||
| 215 | + gcc_assert ((step > 0 && start < end) || (step < 0 && start > end)); | ||
| 216 | + if (step == 1) | ||
| 217 | + { | ||
| 218 | + c = start + ii - SMODULO (start, ii) - 1; | ||
| 219 | + gcc_assert (c >= start); | ||
| 220 | + if (c >= end) | ||
| 221 | + { | ||
| 222 | + ok = false; | ||
| 223 | + if (dump_file) | ||
| 224 | + fprintf (dump_file, | ||
| 225 | + "SMS failed to schedule branch at cycle: %d\n", c); | ||
| 226 | + goto clear; | ||
| 227 | + } | ||
| 228 | + } | ||
| 229 | + else | ||
| 230 | + { | ||
| 231 | + c = start - SMODULO (start, ii) - 1; | ||
| 232 | + gcc_assert (c <= start); | ||
| 233 | + | ||
| 234 | + if (c <= end) | ||
| 235 | + { | ||
| 236 | + if (dump_file) | ||
| 237 | + fprintf (dump_file, | ||
| 238 | + "SMS failed to schedule branch at cycle: %d\n", c); | ||
| 239 | + ok = false; | ||
| 240 | + goto clear; | ||
| 241 | + } | ||
| 242 | + } | ||
| 243 | + | ||
| 244 | + must_precede = sbitmap_alloc (g->num_nodes); | ||
| 245 | + must_follow = sbitmap_alloc (g->num_nodes); | ||
| 246 | + | ||
| 247 | + /* Try to schedule the branch is it's new cycle. */ | ||
| 248 | + calculate_must_precede_follow (g->closing_branch, start, end, | ||
| 249 | + step, ii, sched_nodes, | ||
| 250 | + must_precede, must_follow); | ||
| 251 | + | ||
| 252 | + set_must_precede_follow (&tmp_follow, must_follow, &tmp_precede, | ||
| 253 | + must_precede, c, start, end, step); | ||
| 254 | + | ||
| 255 | + /* Find the element in the partial schedule related to the closing | ||
| 256 | + branch so we can remove it from it's current cycle. */ | ||
| 257 | + for (next_ps_i = ps->rows[row]; | ||
| 258 | + next_ps_i; next_ps_i = next_ps_i->next_in_row) | ||
| 259 | + if (next_ps_i->node->cuid == g->closing_branch->cuid) | ||
| 260 | + break; | ||
| 261 | + | ||
| 262 | + gcc_assert (next_ps_i); | ||
| 263 | + gcc_assert (remove_node_from_ps (ps, next_ps_i)); | ||
| 264 | + success = | ||
| 265 | + try_scheduling_node_in_cycle (ps, g->closing_branch, | ||
| 266 | + g->closing_branch->cuid, c, | ||
| 267 | + sched_nodes, &num_splits, | ||
| 268 | + tmp_precede, tmp_follow); | ||
| 269 | + gcc_assert (num_splits == 0); | ||
| 270 | + if (!success) | ||
| 271 | + { | ||
| 272 | + if (dump_file) | ||
| 273 | + fprintf (dump_file, | ||
| 274 | + "SMS failed to schedule branch at cycle: %d, " | ||
| 275 | + "bringing it back to cycle %d\n", c, branch_cycle); | ||
| 276 | + | ||
| 277 | + /* The branch was failed to be placed in row ii - 1. | ||
| 278 | + Put it back in it's original place in the partial | ||
| 279 | + schedualing. */ | ||
| 280 | + set_must_precede_follow (&tmp_follow, must_follow, &tmp_precede, | ||
| 281 | + must_precede, branch_cycle, start, end, | ||
| 282 | + step); | ||
| 283 | + success = | ||
| 284 | + try_scheduling_node_in_cycle (ps, g->closing_branch, | ||
| 285 | + g->closing_branch->cuid, | ||
| 286 | + branch_cycle, sched_nodes, | ||
| 287 | + &num_splits, tmp_precede, | ||
| 288 | + tmp_follow); | ||
| 289 | + gcc_assert (success && (num_splits == 0)); | ||
| 290 | + ok = false; | ||
| 291 | + } | ||
| 292 | + else | ||
| 293 | + { | ||
| 294 | + /* The branch is placed in row ii - 1. */ | ||
| 295 | + if (dump_file) | ||
| 296 | + fprintf (dump_file, | ||
| 297 | + "SMS success in moving branch to cycle %d\n", c); | ||
| 298 | + | ||
| 299 | + update_node_sched_params (g->closing_branch, ii, c, | ||
| 300 | + PS_MIN_CYCLE (ps)); | ||
| 301 | + ok = true; | ||
| 302 | + } | ||
| 303 | + | ||
| 304 | + free (must_precede); | ||
| 305 | + free (must_follow); | ||
| 306 | + } | ||
| 307 | + | ||
| 308 | +clear: | ||
| 309 | + free (sched_nodes); | ||
| 310 | + return ok; | ||
| 311 | +} | ||
| 312 | + | ||
| 313 | static void | ||
| 314 | duplicate_insns_of_cycles (partial_schedule_ptr ps, int from_stage, | ||
| 315 | int to_stage, int for_prolog, rtx count_reg) | ||
| 316 | @@ -1115,6 +1339,7 @@ | ||
| 317 | int mii, rec_mii; | ||
| 318 | unsigned stage_count = 0; | ||
| 319 | HOST_WIDEST_INT loop_count = 0; | ||
| 320 | + bool opt_sc_p = false; | ||
| 321 | |||
| 322 | if (! (g = g_arr[loop->num])) | ||
| 323 | continue; | ||
| 324 | @@ -1196,14 +1421,32 @@ | ||
| 325 | set_node_sched_params (g); | ||
| 326 | |||
| 327 | ps = sms_schedule_by_order (g, mii, maxii, node_order); | ||
| 328 | - | ||
| 329 | - if (ps) | ||
| 330 | - { | ||
| 331 | - stage_count = calculate_stage_count (ps); | ||
| 332 | - gcc_assert(stage_count >= 1); | ||
| 333 | - PS_STAGE_COUNT(ps) = stage_count; | ||
| 334 | - } | ||
| 335 | - | ||
| 336 | + | ||
| 337 | + if (ps) | ||
| 338 | + { | ||
| 339 | + /* Try to achieve optimized SC by normalizing the partial | ||
| 340 | + schedule (having the cycles start from cycle zero). | ||
| 341 | + The branch location must be placed in row ii-1 in the | ||
| 342 | + final scheduling. If failed, shift all instructions to | ||
| 343 | + position the branch in row ii-1. */ | ||
| 344 | + opt_sc_p = optimize_sc (ps, g); | ||
| 345 | + if (opt_sc_p) | ||
| 346 | + stage_count = calculate_stage_count (ps, 0); | ||
| 347 | + else | ||
| 348 | + { | ||
| 349 | + /* Bring the branch to cycle ii-1. */ | ||
| 350 | + int amount = SCHED_TIME (g->closing_branch) - (ps->ii - 1); | ||
| 351 | + | ||
| 352 | + if (dump_file) | ||
| 353 | + fprintf (dump_file, "SMS schedule branch at cycle ii-1\n"); | ||
| 354 | + | ||
| 355 | + stage_count = calculate_stage_count (ps, amount); | ||
| 356 | + } | ||
| 357 | + | ||
| 358 | + gcc_assert (stage_count >= 1); | ||
| 359 | + PS_STAGE_COUNT (ps) = stage_count; | ||
| 360 | + } | ||
| 361 | + | ||
| 362 | /* The default value of PARAM_SMS_MIN_SC is 2 as stage count of | ||
| 363 | 1 means that there is no interleaving between iterations thus | ||
| 364 | we let the scheduling passes do the job in this case. */ | ||
| 365 | @@ -1224,12 +1467,16 @@ | ||
| 366 | else | ||
| 367 | { | ||
| 368 | struct undo_replace_buff_elem *reg_move_replaces; | ||
| 369 | - int amount = SCHED_TIME (g->closing_branch) + 1; | ||
| 370 | + | ||
| 371 | + if (!opt_sc_p) | ||
| 372 | + { | ||
| 373 | + /* Rotate the partial schedule to have the branch in row ii-1. */ | ||
| 374 | + int amount = SCHED_TIME (g->closing_branch) - (ps->ii - 1); | ||
| 375 | + | ||
| 376 | + reset_sched_times (ps, amount); | ||
| 377 | + rotate_partial_schedule (ps, amount); | ||
| 378 | + } | ||
| 379 | |||
| 380 | - /* Set the stage boundaries. The closing_branch was scheduled | ||
| 381 | - and should appear in the last (ii-1) row. */ | ||
| 382 | - reset_sched_times (ps, amount); | ||
| 383 | - rotate_partial_schedule (ps, amount); | ||
| 384 | set_columns_for_ps (ps); | ||
| 385 | |||
| 386 | canon_loop (loop); | ||
| 387 | @@ -1381,13 +1628,11 @@ | ||
| 388 | scheduling window is empty and zero otherwise. */ | ||
| 389 | |||
| 390 | static int | ||
| 391 | -get_sched_window (partial_schedule_ptr ps, int *nodes_order, int i, | ||
| 392 | +get_sched_window (partial_schedule_ptr ps, ddg_node_ptr u_node, | ||
| 393 | sbitmap sched_nodes, int ii, int *start_p, int *step_p, int *end_p) | ||
| 394 | { | ||
| 395 | int start, step, end; | ||
| 396 | ddg_edge_ptr e; | ||
| 397 | - int u = nodes_order [i]; | ||
| 398 | - ddg_node_ptr u_node = &ps->g->nodes[u]; | ||
| 399 | sbitmap psp = sbitmap_alloc (ps->g->num_nodes); | ||
| 400 | sbitmap pss = sbitmap_alloc (ps->g->num_nodes); | ||
| 401 | sbitmap u_node_preds = NODE_PREDECESSORS (u_node); | ||
| 402 | @@ -1799,7 +2044,7 @@ | ||
| 403 | |||
| 404 | /* Try to get non-empty scheduling window. */ | ||
| 405 | success = 0; | ||
| 406 | - if (get_sched_window (ps, nodes_order, i, sched_nodes, ii, &start, | ||
| 407 | + if (get_sched_window (ps, u_node, sched_nodes, ii, &start, | ||
| 408 | &step, &end) == 0) | ||
| 409 | { | ||
| 410 | if (dump_file) | ||
| 411 | @@ -1816,24 +2061,11 @@ | ||
| 412 | |||
| 413 | for (c = start; c != end; c += step) | ||
| 414 | { | ||
| 415 | - sbitmap tmp_precede = NULL; | ||
| 416 | - sbitmap tmp_follow = NULL; | ||
| 417 | - | ||
| 418 | - if (c == start) | ||
| 419 | - { | ||
| 420 | - if (step == 1) | ||
| 421 | - tmp_precede = must_precede; | ||
| 422 | - else /* step == -1. */ | ||
| 423 | - tmp_follow = must_follow; | ||
| 424 | - } | ||
| 425 | - if (c == end - step) | ||
| 426 | - { | ||
| 427 | - if (step == 1) | ||
| 428 | - tmp_follow = must_follow; | ||
| 429 | - else /* step == -1. */ | ||
| 430 | - tmp_precede = must_precede; | ||
| 431 | - } | ||
| 432 | - | ||
| 433 | + sbitmap tmp_precede, tmp_follow; | ||
| 434 | + | ||
| 435 | + set_must_precede_follow (&tmp_follow, must_follow, | ||
| 436 | + &tmp_precede, must_precede, | ||
| 437 | + c, start, end, step); | ||
| 438 | success = | ||
| 439 | try_scheduling_node_in_cycle (ps, u_node, u, c, | ||
| 440 | sched_nodes, | ||
| 441 | @@ -2893,12 +3125,10 @@ | ||
| 442 | } | ||
| 443 | |||
| 444 | /* Calculate the stage count of the partial schedule PS. The calculation | ||
| 445 | - takes into account the rotation to bring the closing branch to row | ||
| 446 | - ii-1. */ | ||
| 447 | + takes into account the rotation amount passed in ROTATION_AMOUNT. */ | ||
| 448 | int | ||
| 449 | -calculate_stage_count (partial_schedule_ptr ps) | ||
| 450 | +calculate_stage_count (partial_schedule_ptr ps, int rotation_amount) | ||
| 451 | { | ||
| 452 | - int rotation_amount = (SCHED_TIME (ps->g->closing_branch)) + 1; | ||
| 453 | int new_min_cycle = PS_MIN_CYCLE (ps) - rotation_amount; | ||
| 454 | int new_max_cycle = PS_MAX_CYCLE (ps) - rotation_amount; | ||
| 455 | int stage_count = CALC_STAGE_COUNT (-1, new_min_cycle, ps->ii); | ||
| 456 | |||
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99533.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99533.patch new file mode 100644 index 0000000000..196da9d9d8 --- /dev/null +++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99533.patch | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | 2011-08-09 Revital Eres <revital.eres@linaro.org> | ||
| 2 | |||
| 3 | gcc/ | ||
| 4 | Backport from trunk -r176970: | ||
| 5 | |||
| 6 | * modulo-sched.c: Change comment. | ||
| 7 | (reset_sched_times): Fix print message. | ||
| 8 | (print_partial_schedule): Add print | ||
| 9 | info. | ||
| 10 | |||
| 11 | === modified file 'gcc/modulo-sched.c' | ||
| 12 | --- old/gcc/modulo-sched.c 2011-08-03 12:20:38 +0000 | ||
| 13 | +++ new/gcc/modulo-sched.c 2011-08-09 04:31:10 +0000 | ||
| 14 | @@ -84,13 +84,14 @@ | ||
| 15 | II cycles (i.e. use register copies to prevent a def from overwriting | ||
| 16 | itself before reaching the use). | ||
| 17 | |||
| 18 | - SMS works with countable loops whose loop count can be easily | ||
| 19 | - adjusted. This is because we peel a constant number of iterations | ||
| 20 | - into a prologue and epilogue for which we want to avoid emitting | ||
| 21 | - the control part, and a kernel which is to iterate that constant | ||
| 22 | - number of iterations less than the original loop. So the control | ||
| 23 | - part should be a set of insns clearly identified and having its | ||
| 24 | - own iv, not otherwise used in the loop (at-least for now), which | ||
| 25 | + SMS works with countable loops (1) whose control part can be easily | ||
| 26 | + decoupled from the rest of the loop and (2) whose loop count can | ||
| 27 | + be easily adjusted. This is because we peel a constant number of | ||
| 28 | + iterations into a prologue and epilogue for which we want to avoid | ||
| 29 | + emitting the control part, and a kernel which is to iterate that | ||
| 30 | + constant number of iterations less than the original loop. So the | ||
| 31 | + control part should be a set of insns clearly identified and having | ||
| 32 | + its own iv, not otherwise used in the loop (at-least for now), which | ||
| 33 | initializes a register before the loop to the number of iterations. | ||
| 34 | Currently SMS relies on the do-loop pattern to recognize such loops, | ||
| 35 | where (1) the control part comprises of all insns defining and/or | ||
| 36 | @@ -636,8 +637,8 @@ | ||
| 37 | /* Print the scheduling times after the rotation. */ | ||
| 38 | fprintf (dump_file, "crr_insn->node=%d (insn id %d), " | ||
| 39 | "crr_insn->cycle=%d, min_cycle=%d", crr_insn->node->cuid, | ||
| 40 | - INSN_UID (crr_insn->node->insn), SCHED_TIME (u), | ||
| 41 | - normalized_time); | ||
| 42 | + INSN_UID (crr_insn->node->insn), normalized_time, | ||
| 43 | + new_min_cycle); | ||
| 44 | if (JUMP_P (crr_insn->node->insn)) | ||
| 45 | fprintf (dump_file, " (branch)"); | ||
| 46 | fprintf (dump_file, "\n"); | ||
| 47 | @@ -2782,8 +2783,13 @@ | ||
| 48 | fprintf (dump, "\n[ROW %d ]: ", i); | ||
| 49 | while (ps_i) | ||
| 50 | { | ||
| 51 | - fprintf (dump, "%d, ", | ||
| 52 | - INSN_UID (ps_i->node->insn)); | ||
| 53 | + if (JUMP_P (ps_i->node->insn)) | ||
| 54 | + fprintf (dump, "%d (branch), ", | ||
| 55 | + INSN_UID (ps_i->node->insn)); | ||
| 56 | + else | ||
| 57 | + fprintf (dump, "%d, ", | ||
| 58 | + INSN_UID (ps_i->node->insn)); | ||
| 59 | + | ||
| 60 | ps_i = ps_i->next_in_row; | ||
| 61 | } | ||
| 62 | } | ||
| 63 | |||
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99534.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99534.patch new file mode 100644 index 0000000000..9fa6cf261c --- /dev/null +++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99534.patch | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | 2011-08-09 Revital Eres <revital.eres@linaro.org> | ||
| 2 | |||
| 3 | gcc/ | ||
| 4 | Backport from trunk -r176972: | ||
| 5 | |||
| 6 | * ddg.c (create_ddg_dep_from_intra_loop_link): Remove | ||
| 7 | the creation of anti-dep edge from a branch. | ||
| 8 | add_cross_iteration_register_deps): | ||
| 9 | Create anti-dep edge from a branch. | ||
| 10 | |||
| 11 | === modified file 'gcc/ddg.c' | ||
| 12 | --- old/gcc/ddg.c 2011-07-05 09:02:18 +0000 | ||
| 13 | +++ new/gcc/ddg.c 2011-07-31 13:13:38 +0000 | ||
| 14 | @@ -197,11 +197,6 @@ | ||
| 15 | } | ||
| 16 | } | ||
| 17 | |||
| 18 | - /* If a true dep edge enters the branch create an anti edge in the | ||
| 19 | - opposite direction to prevent the creation of reg-moves. */ | ||
| 20 | - if ((DEP_TYPE (link) == REG_DEP_TRUE) && JUMP_P (dest_node->insn)) | ||
| 21 | - create_ddg_dep_no_link (g, dest_node, src_node, ANTI_DEP, REG_DEP, 1); | ||
| 22 | - | ||
| 23 | latency = dep_cost (link); | ||
| 24 | e = create_ddg_edge (src_node, dest_node, t, dt, latency, distance); | ||
| 25 | add_edge_to_ddg (g, e); | ||
| 26 | @@ -305,8 +300,11 @@ | ||
| 27 | |||
| 28 | gcc_assert (first_def_node); | ||
| 29 | |||
| 30 | + /* Always create the edge if the use node is a branch in | ||
| 31 | + order to prevent the creation of reg-moves. */ | ||
| 32 | if (DF_REF_ID (last_def) != DF_REF_ID (first_def) | ||
| 33 | - || !flag_modulo_sched_allow_regmoves) | ||
| 34 | + || !flag_modulo_sched_allow_regmoves | ||
| 35 | + || JUMP_P (use_node->insn)) | ||
| 36 | create_ddg_dep_no_link (g, use_node, first_def_node, ANTI_DEP, | ||
| 37 | REG_DEP, 1); | ||
| 38 | |||
| 39 | |||
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99536.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99536.patch new file mode 100644 index 0000000000..76798ec1cc --- /dev/null +++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99536.patch | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | 2011-08-15 Richard Sandiford <richard.sandiford@linaro.org> | ||
| 2 | |||
| 3 | gcc/ | ||
| 4 | * config/rs6000/rs6000.c (paired_expand_vector_init): Don't create | ||
| 5 | CONST_VECTORs with symbolic elements. | ||
| 6 | (rs6000_expand_vector_init): Likewise. | ||
| 7 | |||
| 8 | === modified file 'gcc/config/rs6000/rs6000.c' | ||
| 9 | --- old/gcc/config/rs6000/rs6000.c 2011-08-11 11:09:07 +0000 | ||
| 10 | +++ new/gcc/config/rs6000/rs6000.c 2011-08-16 12:42:39 +0000 | ||
| 11 | @@ -4129,7 +4129,9 @@ | ||
| 12 | for (i = 0; i < n_elts; ++i) | ||
| 13 | { | ||
| 14 | x = XVECEXP (vals, 0, i); | ||
| 15 | - if (!CONSTANT_P (x)) | ||
| 16 | + if (!(CONST_INT_P (x) | ||
| 17 | + || GET_CODE (x) == CONST_DOUBLE | ||
| 18 | + || GET_CODE (x) == CONST_FIXED)) | ||
| 19 | ++n_var; | ||
| 20 | } | ||
| 21 | if (n_var == 0) | ||
| 22 | @@ -4281,7 +4283,9 @@ | ||
| 23 | for (i = 0; i < n_elts; ++i) | ||
| 24 | { | ||
| 25 | x = XVECEXP (vals, 0, i); | ||
| 26 | - if (!CONSTANT_P (x)) | ||
| 27 | + if (!(CONST_INT_P (x) | ||
| 28 | + || GET_CODE (x) == CONST_DOUBLE | ||
| 29 | + || GET_CODE (x) == CONST_FIXED)) | ||
| 30 | ++n_var, one_var = i; | ||
| 31 | else if (x != CONST0_RTX (inner_mode)) | ||
| 32 | all_const_zero = false; | ||
| 33 | |||
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99537.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99537.patch new file mode 100644 index 0000000000..b8584334cf --- /dev/null +++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99537.patch | |||
| @@ -0,0 +1,105 @@ | |||
| 1 | 2011-08-16 Matthias Klose <doko@ubuntu.com> | ||
| 2 | |||
| 3 | Backport from FSF: | ||
| 4 | |||
| 5 | 2010-12-20 Joseph Myers <joseph@codesourcery.com> | ||
| 6 | |||
| 7 | * config/rs6000/freebsd.h (SVR4_ASM_SPEC): Don't define. | ||
| 8 | (DBX_REGISTER_NUMBER): Define. | ||
| 9 | * config/rs6000/lynx.h (DBX_REGISTER_NUMBER): Define. | ||
| 10 | * config/rs6000/netbsd.h (DBX_REGISTER_NUMBER): Define. | ||
| 11 | * config/rs6000/sysv4.h (SIZE_TYPE): Define. | ||
| 12 | (ASM_SPEC): Define without using SVR4_ASM_SPEC. | ||
| 13 | (DBX_REGISTER_NUMBER): Undefine. | ||
| 14 | * config.gcc (powerpc-*-eabispe*, powerpc-*-eabisimaltivec*, | ||
| 15 | powerpc-*-eabisim*, powerpc-*-elf*, powerpc-*-eabialtivec*, | ||
| 16 | powerpc-xilinx-eabi*, powerpc-*-eabi*, powerpc-*-rtems*, | ||
| 17 | powerpc-*-linux* | powerpc64-*-linux*, powerpc64-*-gnu*, | ||
| 18 | powerpc-*-gnu-gnualtivec*, powerpc-*-gnu*, | ||
| 19 | powerpc-wrs-vxworks|powerpc-wrs-vxworksae, powerpcle-*-elf*, | ||
| 20 | powerpcle-*-eabisim*, powerpcle-*-eabi*): Don't use svr4.h. | ||
| 21 | |||
| 22 | === modified file 'gcc/config.gcc' | ||
| 23 | Index: gcc-4_5-branch/gcc/config.gcc | ||
| 24 | =================================================================== | ||
| 25 | --- gcc-4_5-branch.orig/gcc/config.gcc 2011-09-16 23:01:43.000000000 -0700 | ||
| 26 | +++ gcc-4_5-branch/gcc/config.gcc 2011-09-17 10:54:32.763299018 -0700 | ||
| 27 | @@ -2028,7 +2028,7 @@ powerpc-*-rtems*) | ||
| 28 | tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-rtems t-rtems rs6000/t-ppccomm" | ||
| 29 | ;; | ||
| 30 | powerpc-*-linux* | powerpc64-*-linux*) | ||
| 31 | - tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h" | ||
| 32 | + tm_file="${tm_file} dbxelf.h elfos.h linux.h freebsd-spec.h rs6000/sysv4.h" | ||
| 33 | extra_options="${extra_options} rs6000/sysv4.opt" | ||
| 34 | tmake_file="t-dfprules rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm" | ||
| 35 | maybe_biarch=yes | ||
| 36 | Index: gcc-4_5-branch/gcc/config/freebsd-spec.h | ||
| 37 | =================================================================== | ||
| 38 | --- gcc-4_5-branch.orig/gcc/config/freebsd-spec.h 2011-06-16 17:59:03.000000000 -0700 | ||
| 39 | +++ gcc-4_5-branch/gcc/config/freebsd-spec.h 2011-09-17 10:54:32.763299018 -0700 | ||
| 40 | @@ -154,6 +154,7 @@ is built with the --enable-threads confi | ||
| 41 | #endif | ||
| 42 | |||
| 43 | #if defined(HAVE_LD_EH_FRAME_HDR) | ||
| 44 | +#undef LINK_EH_SPEC | ||
| 45 | #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " | ||
| 46 | #endif | ||
| 47 | |||
| 48 | Index: gcc-4_5-branch/gcc/config/rs6000/linux64.h | ||
| 49 | =================================================================== | ||
| 50 | --- gcc-4_5-branch.orig/gcc/config/rs6000/linux64.h 2011-09-16 23:01:43.000000000 -0700 | ||
| 51 | +++ gcc-4_5-branch/gcc/config/rs6000/linux64.h 2011-09-17 10:56:01.043298999 -0700 | ||
| 52 | @@ -339,6 +339,9 @@ extern int dot_symbols; | ||
| 53 | |||
| 54 | #undef LINK_OS_DEFAULT_SPEC | ||
| 55 | #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" | ||
| 56 | +#undef LINUX_DYNAMIC_LINKER32 | ||
| 57 | +#undef LINUX_DYNAMIC_LINKER64 | ||
| 58 | +#undef CHOOSE_DYNAMIC_LINKER | ||
| 59 | |||
| 60 | #define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1" | ||
| 61 | #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64.so.1" | ||
| 62 | Index: gcc-4_5-branch/gcc/config/rs6000/sysv4.h | ||
| 63 | =================================================================== | ||
| 64 | --- gcc-4_5-branch.orig/gcc/config/rs6000/sysv4.h 2011-09-16 23:01:44.000000000 -0700 | ||
| 65 | +++ gcc-4_5-branch/gcc/config/rs6000/sysv4.h 2011-09-17 10:54:32.773299018 -0700 | ||
| 66 | @@ -617,6 +617,7 @@ SVR4_ASM_SPEC \ | ||
| 67 | #define CC1_SECURE_PLT_DEFAULT_SPEC "" | ||
| 68 | #endif | ||
| 69 | |||
| 70 | +#undef CC1_SPEC | ||
| 71 | /* Pass -G xxx to the compiler and set correct endian mode. */ | ||
| 72 | #define CC1_SPEC "%{G*} %(cc1_cpu) \ | ||
| 73 | %{mlittle|mlittle-endian: %(cc1_endian_little); \ | ||
| 74 | @@ -900,22 +901,13 @@ SVR4_ASM_SPEC \ | ||
| 75 | #define LINK_START_LINUX_SPEC "" | ||
| 76 | |||
| 77 | #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" | ||
| 78 | -#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
| 79 | -#if DEFAULT_LIBC == LIBC_UCLIBC | ||
| 80 | -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" | ||
| 81 | -#elif DEFAULT_LIBC == LIBC_GLIBC | ||
| 82 | -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" | ||
| 83 | -#else | ||
| 84 | -#error "Unsupported DEFAULT_LIBC" | ||
| 85 | -#endif | ||
| 86 | -#define LINUX_DYNAMIC_LINKER \ | ||
| 87 | - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) | ||
| 88 | |||
| 89 | #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ | ||
| 90 | %{rdynamic:-export-dynamic} \ | ||
| 91 | %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}" | ||
| 92 | |||
| 93 | #if defined(HAVE_LD_EH_FRAME_HDR) | ||
| 94 | +# undef LINK_EH_SPEC | ||
| 95 | # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " | ||
| 96 | #endif | ||
| 97 | |||
| 98 | @@ -1110,6 +1102,7 @@ ncrtn.o%s" | ||
| 99 | be stacked, so that invocations of #pragma pack(pop)' will return | ||
| 100 | to the previous value. */ | ||
| 101 | |||
| 102 | +#undef HANDLE_PRAGMA_PACK_PUSH_POP | ||
| 103 | #define HANDLE_PRAGMA_PACK_PUSH_POP 1 | ||
| 104 | |||
| 105 | /* Select a format to encode pointers in exception handling data. CODE | ||
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99540.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99540.patch new file mode 100644 index 0000000000..b71f6cc5b4 --- /dev/null +++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99540.patch | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | 2011-08-26 Richard Sandiford <richard.sandiford@linaro.org> | ||
| 2 | |||
| 3 | gcc/ | ||
| 4 | Backport from mainline: | ||
| 5 | |||
| 6 | 2011-08-26 Richard Sandiford <richard.sandiford@linaro.org> | ||
| 7 | |||
| 8 | * df-problems.c (df_note_bb_compute): Pass uses rather than defs | ||
| 9 | to df_set_dead_notes_for_mw. | ||
| 10 | |||
| 11 | === modified file 'gcc/df-problems.c' | ||
| 12 | --- old/gcc/df-problems.c 2011-05-05 14:28:53 +0000 | ||
| 13 | +++ new/gcc/df-problems.c 2011-08-26 14:39:38 +0000 | ||
| 14 | @@ -3562,7 +3562,7 @@ | ||
| 15 | while (*mws_rec) | ||
| 16 | { | ||
| 17 | struct df_mw_hardreg *mws = *mws_rec; | ||
| 18 | - if ((DF_MWS_REG_DEF_P (mws)) | ||
| 19 | + if (DF_MWS_REG_USE_P (mws) | ||
| 20 | && !df_ignore_stack_reg (mws->start_regno)) | ||
| 21 | { | ||
| 22 | bool really_add_notes = debug_insn != 0; | ||
| 23 | |||
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99541.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99541.patch new file mode 100644 index 0000000000..ae0e4bcd35 --- /dev/null +++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99541.patch | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | 2011-09-12 Richard Sandiford <richard.sandiford@linaro.org> | ||
| 2 | |||
| 3 | gcc/ | ||
| 4 | Backport from mainline: | ||
| 5 | |||
| 6 | 2010-12-06 Jakub Jelinek <jakub@redhat.com> | ||
| 7 | |||
| 8 | PR debug/46771 | ||
| 9 | * reginfo.c (init_subregs_of_mode): Don't call find_subregs_of_mode | ||
| 10 | on DEBUG_INSNs. | ||
| 11 | |||
| 12 | === modified file 'gcc/reginfo.c' | ||
| 13 | --- old/gcc/reginfo.c 2010-10-04 00:50:43 +0000 | ||
| 14 | +++ new/gcc/reginfo.c 2011-09-12 10:54:51 +0000 | ||
| 15 | @@ -1350,7 +1350,7 @@ | ||
| 16 | |||
| 17 | FOR_EACH_BB (bb) | ||
| 18 | FOR_BB_INSNS (bb, insn) | ||
| 19 | - if (INSN_P (insn)) | ||
| 20 | + if (NONDEBUG_INSN_P (insn)) | ||
| 21 | find_subregs_of_mode (PATTERN (insn)); | ||
| 22 | } | ||
