From: Max Filippov Date: Mon, 5 Nov 2018 23:58:13 +0000 (+0000) Subject: gcc: xtensa: don't force PIC for uclinux target X-Git-Tag: basepoints/gcc-10~3300 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3cd732e5065dcc45968bf8837d3901c8717abbc2;p=thirdparty%2Fgcc.git 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 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0. From-SVN: r265823 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0e4794ce36f9..c5988a3ca73a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2018-11-05 Max Filippov + + * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0. + 2018-11-05 Segher Boessenkool PR rtl-optimization/87871 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