kumquat-buildroot/package/gcc/6.5.0/0004-gcc-xtensa-don-t-force-PIC-for-uclinux-target.patch
Romain Naour 7f283452c8 package/gcc: bump to version 6.5.0
Remove upstream patches:

0002-fix-building-on-ppc64.patch
765527ad37

0003-libsanitizer-Use-pre-computed-size.patch
61f38c64c0

942-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch
b685411208

943-sanitizer-linux.patch
8937b94d1a

870-xtensa-fix-PR-target-82181.patch
dbbb835381

871-xtensa-fix-PR-target-65416.patch
36f42654cb

872-gcc-xtensa-fix-NAND-code-in-xtensa_expand_atomic.patch using patch
9f149a1a92

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-12-08 20:54:47 +01:00

42 lines
1.3 KiB
Diff

From 960a2552f7b418134cdf7a31e96023a3811b98dd Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Sun, 4 Nov 2018 23:55:59 -0800
Subject: [PATCH] gcc: xtensa: don't force PIC for uclinux target
xtensa-uclinux uses bFLT executable file format that cannot relocate
fields representing offsets from data to code. C++ objects built as PIC
use offsets to encode FDE structures. As a result C++ exception handling
doesn't work correctly on xtensa-uclinux. Don't use PIC by default on
xtensa-uclinux.
gcc/
2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
* config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
Backported from: r265823
gcc/config/xtensa/uclinux.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/config/xtensa/uclinux.h b/gcc/config/xtensa/uclinux.h
index ba26187c8f7a..c7743df9d97c 100644
--- a/gcc/config/xtensa/uclinux.h
+++ b/gcc/config/xtensa/uclinux.h
@@ -59,8 +59,8 @@ along with GCC; see the file COPYING3. If not see
#undef LOCAL_LABEL_PREFIX
#define LOCAL_LABEL_PREFIX "."
-/* Always enable "-fpic" for Xtensa Linux. */
-#define XTENSA_ALWAYS_PIC 1
+/* Don't enable "-fpic" for Xtensa uclinux. */
+#define XTENSA_ALWAYS_PIC 0
#undef TARGET_LIBC_HAS_FUNCTION
#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function
--
2.11.0