diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2018-11-07 20:52:55 +0000 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2018-11-07 20:52:55 +0000 |
commit | 71076eb95220a2ae5fb0759a1324ef5997f6df49 (patch) | |
tree | 2eb38110b3c11d6de8c83badd844672d33bc201b | |
parent | 1032f74bf57973d8d04299f2356ac50de88392ce (diff) |
gcc: xtensa: don't force PIC for uclinux targetgcc-6-branch
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-07 Max Filippov <jcmvbkbc@gmail.com>
Backport from mainline
2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
* config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@265890 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/xtensa/uclinux.h | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6d1036d23b6..df94dfda70b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-11-07 Max Filippov <jcmvbkbc@gmail.com> + + Backport from mainline + 2018-11-05 Max Filippov <jcmvbkbc@gmail.com> + + * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0. + 2018-10-26 Release Manager * GCC 6.5.0 released. diff --git a/gcc/config/xtensa/uclinux.h b/gcc/config/xtensa/uclinux.h index 6279a9934ae..82ec2602f41 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 |