]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc: xtensa: don't force PIC for uclinux target releases/gcc-6
authorMax Filippov <jcmvbkbc@gmail.com>
Wed, 7 Nov 2018 20:52:55 +0000 (20:52 +0000)
committerMax Filippov <jcmvbkbc@gcc.gnu.org>
Wed, 7 Nov 2018 20:52:55 +0000 (20:52 +0000)
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.

From-SVN: r265890

gcc/ChangeLog
gcc/config/xtensa/uclinux.h

index 6d1036d23b63043c8d4864776e818bcd50c4baac..df94dfda70b3e1fd4faface632c51be51bb875c0 100644 (file)
@@ -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.
index 6279a9934ae433a56e9d02a97e436f0391deab60..82ec2602f41cabce1d851948023c28de1c00ff84 100644 (file)
@@ -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