diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6/gcc-with-linker-hash-style.patch')
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6/gcc-with-linker-hash-style.patch | 196 |
1 files changed, 0 insertions, 196 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6/gcc-with-linker-hash-style.patch b/meta/recipes-devtools/gcc/gcc-4.6/gcc-with-linker-hash-style.patch deleted file mode 100644 index 94b61cdcc9..0000000000 --- a/meta/recipes-devtools/gcc/gcc-4.6/gcc-with-linker-hash-style.patch +++ /dev/null | |||
| @@ -1,196 +0,0 @@ | |||
| 1 | Upstream-Status: Backport | ||
| 2 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 3 | |||
| 4 | commit 3cb9bbfa927aa187048534f9069202c017a78e38 | ||
| 5 | Author: ppluzhnikov <ppluzhnikov@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
| 6 | Date: Wed May 11 18:28:14 2011 +0000 | ||
| 7 | |||
| 8 | 2011-05-11 Satoru Takabayashi <satorux@google.com> | ||
| 9 | Paul Pluzhnikov <ppluzhnikov@google.com> | ||
| 10 | |||
| 11 | * gcc/doc/install.texi (Configuration): Document | ||
| 12 | --with-linker-hash-style. | ||
| 13 | * gcc/gcc.c (init_spec): Handle LINKER_HASH_STYLE. | ||
| 14 | * gcc/config.in: Add LINKER_HASH_STYLE. | ||
| 15 | * gcc/configure.ac: Add --with-linker-hash-style. | ||
| 16 | * gcc/configure: Regenerate. | ||
| 17 | |||
| 18 | |||
| 19 | |||
| 20 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173668 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
| 21 | |||
| 22 | Index: gcc-4_6-branch/gcc/config.in | ||
| 23 | =================================================================== | ||
| 24 | --- gcc-4_6-branch.orig/gcc/config.in 2012-03-04 09:30:04.000000000 -0800 | ||
| 25 | +++ gcc-4_6-branch/gcc/config.in 2012-03-04 09:32:30.878646575 -0800 | ||
| 26 | @@ -1583,6 +1583,12 @@ | ||
| 27 | #endif | ||
| 28 | |||
| 29 | |||
| 30 | +/* The linker hash style */ | ||
| 31 | +#ifndef USED_FOR_TARGET | ||
| 32 | +#undef LINKER_HASH_STYLE | ||
| 33 | +#endif | ||
| 34 | + | ||
| 35 | + | ||
| 36 | /* Define to the name of the LTO plugin DSO that must be passed to the | ||
| 37 | linker's -plugin=LIB option. */ | ||
| 38 | #ifndef USED_FOR_TARGET | ||
| 39 | Index: gcc-4_6-branch/gcc/configure | ||
| 40 | =================================================================== | ||
| 41 | --- gcc-4_6-branch.orig/gcc/configure 2012-03-04 09:30:05.000000000 -0800 | ||
| 42 | +++ gcc-4_6-branch/gcc/configure 2012-03-04 09:32:39.918647011 -0800 | ||
| 43 | @@ -915,6 +915,7 @@ | ||
| 44 | enable_poison_system_directories | ||
| 45 | enable_plugin | ||
| 46 | enable_libquadmath_support | ||
| 47 | +with_linker_hash_style | ||
| 48 | ' | ||
| 49 | ac_precious_vars='build_alias | ||
| 50 | host_alias | ||
| 51 | @@ -1667,6 +1668,8 @@ | ||
| 52 | with the compiler | ||
| 53 | --with-system-zlib use installed libz | ||
| 54 | --with-slibdir=DIR shared libraries in DIR [LIBDIR] | ||
| 55 | + --with-linker-hash-style={sysv,gnu,both} | ||
| 56 | + specify the linker hash style | ||
| 57 | |||
| 58 | Some influential environment variables: | ||
| 59 | CC C compiler command | ||
| 60 | @@ -17501,7 +17504,7 @@ | ||
| 61 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||
| 62 | lt_status=$lt_dlunknown | ||
| 63 | cat > conftest.$ac_ext <<_LT_EOF | ||
| 64 | -#line 17504 "configure" | ||
| 65 | +#line 17507 "configure" | ||
| 66 | #include "confdefs.h" | ||
| 67 | |||
| 68 | #if HAVE_DLFCN_H | ||
| 69 | @@ -17607,7 +17610,7 @@ | ||
| 70 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||
| 71 | lt_status=$lt_dlunknown | ||
| 72 | cat > conftest.$ac_ext <<_LT_EOF | ||
| 73 | -#line 17610 "configure" | ||
| 74 | +#line 17613 "configure" | ||
| 75 | #include "confdefs.h" | ||
| 76 | |||
| 77 | #if HAVE_DLFCN_H | ||
| 78 | @@ -26432,6 +26435,36 @@ | ||
| 79 | fi | ||
| 80 | |||
| 81 | |||
| 82 | +# Specify what hash style to use by default. | ||
| 83 | + | ||
| 84 | +# Check whether --with-linker-hash-style was given. | ||
| 85 | +if test "${with_linker_hash_style+set}" = set; then : | ||
| 86 | + withval=$with_linker_hash_style; case x"$withval" in | ||
| 87 | + xsysv) | ||
| 88 | + LINKER_HASH_STYLE=sysv | ||
| 89 | + ;; | ||
| 90 | + xgnu) | ||
| 91 | + LINKER_HASH_STYLE=gnu | ||
| 92 | + ;; | ||
| 93 | + xboth) | ||
| 94 | + LINKER_HASH_STYLE=both | ||
| 95 | + ;; | ||
| 96 | + *) | ||
| 97 | + as_fn_error "$withval is an invalid option to --with-linker-hash-style" "$LINENO" 5 | ||
| 98 | + ;; | ||
| 99 | + esac | ||
| 100 | +else | ||
| 101 | + LINKER_HASH_STYLE='' | ||
| 102 | +fi | ||
| 103 | + | ||
| 104 | +if test x"${LINKER_HASH_STYLE}" != x; then | ||
| 105 | + | ||
| 106 | +cat >>confdefs.h <<_ACEOF | ||
| 107 | +#define LINKER_HASH_STYLE "$LINKER_HASH_STYLE" | ||
| 108 | +_ACEOF | ||
| 109 | + | ||
| 110 | +fi | ||
| 111 | + | ||
| 112 | # Configure the subdirectories | ||
| 113 | # AC_CONFIG_SUBDIRS($subdirs) | ||
| 114 | |||
| 115 | Index: gcc-4_6-branch/gcc/configure.ac | ||
| 116 | =================================================================== | ||
| 117 | --- gcc-4_6-branch.orig/gcc/configure.ac 2012-03-04 09:30:05.000000000 -0800 | ||
| 118 | +++ gcc-4_6-branch/gcc/configure.ac 2012-03-04 09:32:30.890646574 -0800 | ||
| 119 | @@ -4905,6 +4905,30 @@ | ||
| 120 | fi | ||
| 121 | |||
| 122 | |||
| 123 | +# Specify what hash style to use by default. | ||
| 124 | +AC_ARG_WITH([linker-hash-style], | ||
| 125 | +[AC_HELP_STRING([--with-linker-hash-style={sysv,gnu,both}], | ||
| 126 | + [specify the linker hash style])], | ||
| 127 | +[case x"$withval" in | ||
| 128 | + xsysv) | ||
| 129 | + LINKER_HASH_STYLE=sysv | ||
| 130 | + ;; | ||
| 131 | + xgnu) | ||
| 132 | + LINKER_HASH_STYLE=gnu | ||
| 133 | + ;; | ||
| 134 | + xboth) | ||
| 135 | + LINKER_HASH_STYLE=both | ||
| 136 | + ;; | ||
| 137 | + *) | ||
| 138 | + AC_MSG_ERROR([$withval is an invalid option to --with-linker-hash-style]) | ||
| 139 | + ;; | ||
| 140 | + esac], | ||
| 141 | +[LINKER_HASH_STYLE='']) | ||
| 142 | +if test x"${LINKER_HASH_STYLE}" != x; then | ||
| 143 | + AC_DEFINE_UNQUOTED(LINKER_HASH_STYLE, "$LINKER_HASH_STYLE", | ||
| 144 | + [The linker hash style]) | ||
| 145 | +fi | ||
| 146 | + | ||
| 147 | # Configure the subdirectories | ||
| 148 | # AC_CONFIG_SUBDIRS($subdirs) | ||
| 149 | |||
| 150 | Index: gcc-4_6-branch/gcc/doc/install.texi | ||
| 151 | =================================================================== | ||
| 152 | --- gcc-4_6-branch.orig/gcc/doc/install.texi 2012-03-03 00:46:39.000000000 -0800 | ||
| 153 | +++ gcc-4_6-branch/gcc/doc/install.texi 2012-03-04 09:32:30.894646574 -0800 | ||
| 154 | @@ -1665,6 +1665,11 @@ | ||
| 155 | support @option{--build-id} option, a warning is issued and the | ||
| 156 | @option{--enable-linker-build-id} option is ignored. The default is off. | ||
| 157 | |||
| 158 | +@item --with-linker-hash-style=@var{choice} | ||
| 159 | +Tells GCC to pass @option{--hash-style=@var{choice}} option to the | ||
| 160 | +linker for all final links. @var{choice} can be one of | ||
| 161 | +@samp{sysv}, @samp{gnu}, and @samp{both} where @samp{sysv} is the default. | ||
| 162 | + | ||
| 163 | @item --enable-gnu-unique-object | ||
| 164 | @itemx --disable-gnu-unique-object | ||
| 165 | Tells GCC to use the gnu_unique_object relocation for C++ template | ||
| 166 | Index: gcc-4_6-branch/gcc/gcc.c | ||
| 167 | =================================================================== | ||
| 168 | --- gcc-4_6-branch.orig/gcc/gcc.c 2012-03-04 09:30:04.000000000 -0800 | ||
| 169 | +++ gcc-4_6-branch/gcc/gcc.c 2012-03-04 09:32:30.894646574 -0800 | ||
| 170 | @@ -1427,7 +1427,8 @@ | ||
| 171 | } | ||
| 172 | #endif | ||
| 173 | |||
| 174 | -#if defined LINK_EH_SPEC || defined LINK_BUILDID_SPEC | ||
| 175 | +#if defined LINK_EH_SPEC || defined LINK_BUILDID_SPEC || \ | ||
| 176 | + defined LINKER_HASH_STYLE | ||
| 177 | # ifdef LINK_BUILDID_SPEC | ||
| 178 | /* Prepend LINK_BUILDID_SPEC to whatever link_spec we had before. */ | ||
| 179 | obstack_grow (&obstack, LINK_BUILDID_SPEC, sizeof(LINK_BUILDID_SPEC) - 1); | ||
| 180 | @@ -1436,6 +1437,16 @@ | ||
| 181 | /* Prepend LINK_EH_SPEC to whatever link_spec we had before. */ | ||
| 182 | obstack_grow (&obstack, LINK_EH_SPEC, sizeof(LINK_EH_SPEC) - 1); | ||
| 183 | # endif | ||
| 184 | +# ifdef LINKER_HASH_STYLE | ||
| 185 | + /* Prepend --hash-style=LINKER_HASH_STYLE to whatever link_spec we had | ||
| 186 | + before. */ | ||
| 187 | + { | ||
| 188 | + static const char hash_style[] = "--hash-style="; | ||
| 189 | + obstack_grow (&obstack, hash_style, sizeof(hash_style) - 1); | ||
| 190 | + obstack_grow (&obstack, LINKER_HASH_STYLE, sizeof(LINKER_HASH_STYLE) - 1); | ||
| 191 | + obstack_1grow (&obstack, ' '); | ||
| 192 | + } | ||
| 193 | +# endif | ||
| 194 | obstack_grow0 (&obstack, link_spec, strlen (link_spec)); | ||
| 195 | link_spec = XOBFINISH (&obstack, const char *); | ||
| 196 | #endif | ||
