summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-11-08 16:02:17 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-11-11 10:08:12 +0000
commit19d9a1915c8ebc33c861d613e2510910487bad35 (patch)
tree1a0297f3866f21ecb6dcf6d6e1e7451fdc0dd6ca /meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch
parentd3598e429be3902338b90e410d196b71270cc881 (diff)
downloadpoky-19d9a1915c8ebc33c861d613e2510910487bad35.tar.gz
gcc: Handle duplicate names for variables
PREFIXVAR is defined in cppdefaults.c as well which shows up as error when LTO is enabled to build gcc, therefore rename the one instance to PREFIXVAR1 (From OE-Core rev: 984da023a595a10ae62d4fc2a1f2fe96c4701223) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch13
1 files changed, 8 insertions, 5 deletions
diff --git a/meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch b/meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch
index 1a65ece7bf..dc3e6da65a 100644
--- a/meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch
+++ b/meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch
@@ -1,4 +1,4 @@
1From bb1f359e34649516e61305e9748534cce7e0ee70 Mon Sep 17 00:00:00 2001 1From 702daf2e9cb97337e0e594fcd435b1b61a917d14 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 7 Dec 2015 23:39:54 +0000 3Date: Mon, 7 Dec 2015 23:39:54 +0000
4Subject: [PATCH] handle sysroot support for nativesdk-gcc 4Subject: [PATCH] handle sysroot support for nativesdk-gcc
@@ -321,7 +321,7 @@ index 9098ab044ab..bfad4ebe382 100644
321 str = update_path (ostr, p->component); 321 str = update_path (ostr, p->component);
322 free (ostr); 322 free (ostr);
323diff --git a/gcc/prefix.c b/gcc/prefix.c 323diff --git a/gcc/prefix.c b/gcc/prefix.c
324index 1a403e535bd..3257ed3cd3e 100644 324index 1a403e535bd..c26d07bde12 100644
325--- a/gcc/prefix.c 325--- a/gcc/prefix.c
326+++ b/gcc/prefix.c 326+++ b/gcc/prefix.c
327@@ -72,7 +72,9 @@ License along with GCC; see the file COPYING3. If not see 327@@ -72,7 +72,9 @@ License along with GCC; see the file COPYING3. If not see
@@ -329,9 +329,9 @@ index 1a403e535bd..3257ed3cd3e 100644
329 #include "common/common-target.h" 329 #include "common/common-target.h"
330 330
331-static const char *std_prefix = PREFIX; 331-static const char *std_prefix = PREFIX;
332+static const char PREFIXVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX; 332+char PREFIXVAR1[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX;
333+ 333+
334+static const char *std_prefix = PREFIXVAR; 334+static const char *std_prefix = PREFIXVAR1;
335 335
336 static const char *get_key_value (char *); 336 static const char *get_key_value (char *);
337 static char *translate_name (char *); 337 static char *translate_name (char *);
@@ -340,7 +340,10 @@ index 1a403e535bd..3257ed3cd3e 100644
340 340
341 if (prefix == 0) 341 if (prefix == 0)
342- prefix = PREFIX; 342- prefix = PREFIX;
343+ prefix = PREFIXVAR; 343+ prefix = PREFIXVAR1;
344 344
345 /* We used to strip trailing DIR_SEPARATORs here, but that can 345 /* We used to strip trailing DIR_SEPARATORs here, but that can
346 sometimes yield a result with no separator when one was coded 346 sometimes yield a result with no separator when one was coded
347--
3482.29.2
349