aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2019-08-13 09:11:20 -0700
committerCaroline Tice <ctice@gcc.gnu.org>2019-08-13 09:11:20 -0700
commit65a3896a182c3518f3ba7b5cecaf7d1ca7badf0c (patch)
tree2ff0c7506b5c42c518e72ce1c8047732e14c8c50 /gcc
parent51ad8481b8fe3d47aaa4494deace6153c353dec1 (diff)
downloadgcc-65a3896a182c3518f3ba7b5cecaf7d1ca7badf0c.zip
gcc-65a3896a182c3518f3ba7b5cecaf7d1ca7badf0c.tar.gz
gcc-65a3896a182c3518f3ba7b5cecaf7d1ca7badf0c.tar.bz2
Fix PR other/91396 static linke error with -fvtable-verify
Fix a bug where linking with -fvtable-verify and -static causes the linker to complain about multiple definitions of things in the vtv_end*.o files (once from the .o file and once from libvtv.a). 2019-08-12 Caroline Tice <cmtice@google.com> PR other/91396 * config/gnu-user.h (GNU_USER_TARGET_ENDFILE_SPEC): Only add the vtv_end.o or vtv_end_preinit.o files if !static. From-SVN: r274386
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/gnu-user.h4
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5739f22..573c779 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2019-08-13 Caroline Tice <cmtice@google.com>
+
+ PR other/91396
+ * config/gnu-user.h (GNU_USER_TARGET_ENDFILE_SPEC): Only add the
+ vtv_end.o or vtv_end_preinit.o files if !static.
+
2019-08-13 Olivier Hainque <hainque@adacore.com>
* rtl.h (tablejump_casesi_pattern): Move declaration to proper spot.
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
index 055a4f0..95a3c29 100644
--- a/gcc/config/gnu-user.h
+++ b/gcc/config/gnu-user.h
@@ -73,9 +73,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
GNU userspace "finalizer" file, `crtn.o'. */
#define GNU_USER_TARGET_ENDFILE_SPEC \
- "%{fvtable-verify=none:%s; \
+ "%{!static:%{fvtable-verify=none:%s; \
fvtable-verify=preinit:vtv_end_preinit.o%s; \
- fvtable-verify=std:vtv_end.o%s} \
+ fvtable-verify=std:vtv_end.o%s}} \
%{static:crtend.o%s; \
shared|static-pie|" PIE_SPEC ":crtendS.o%s; \
:crtend.o%s} " \