diff mbox series

gcc: xtensa: don't force PIC for uclinux target

Message ID 20181105190442.4346-1-jcmvbkbc@gmail.com
State New
Headers show
Series gcc: xtensa: don't force PIC for uclinux target | expand

Commit Message

Max Filippov Nov. 5, 2018, 7:04 p.m. UTC
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 mbox series

Patch

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