* [PATCH] gcc: xtensa: don't force PIC for uclinux target
@ 2018-11-05 19:04 Max Filippov
0 siblings, 0 replies; only message in thread
From: Max Filippov @ 2018-11-05 19:04 UTC (permalink / raw)
To: gcc-patches; +Cc: linux-xtensa, Sterling Augustine, Max Filippov
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-04 Max Filippov <jcmvbkbc@gmail.com>
* config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
---
gcc/config/xtensa/uclinux.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/xtensa/uclinux.h b/gcc/config/xtensa/uclinux.h
index ba26187c8f7a..1cb334919c7c 100644
--- a/gcc/config/xtensa/uclinux.h
+++ b/gcc/config/xtensa/uclinux.h
@@ -60,7 +60,7 @@ along with GCC; see the file COPYING3. If not see
#define LOCAL_LABEL_PREFIX "."
/* Always enable "-fpic" for Xtensa Linux. */
-#define XTENSA_ALWAYS_PIC 1
+#define XTENSA_ALWAYS_PIC 0
#undef TARGET_LIBC_HAS_FUNCTION
#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function
--
2.11.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-11-05 19:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-05 19:04 [PATCH] gcc: xtensa: don't force PIC for uclinux target Max Filippov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).