summaryrefslogtreecommitdiff
path: root/libtool.m4
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-21 16:49:17 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-21 16:49:17 +0000
commit4e8a08d4ad626912106f6fbad06dfc2c7d367498 (patch)
tree3364939b477d67777a875590d7ac3f1e2790a947 /libtool.m4
parent289880911174fffc3ce709f192a49becdbdc1d29 (diff)
Always use PIC option with -shared in libtool
Libtool needs to pass PIC option -shared when creating shared object to link regular object files with slim-lto archive. PR bootstrap/63784 * libtool.m4: Add $pic_flag with -shared. boehm-gc/ PR bootstrap/63784 * configure: Regenerated. gcc/ PR bootstrap/63784 * configure: Regenerated. libatomic/ PR bootstrap/63784 * configure: Regenerated. libbacktrace/ PR bootstrap/63784 * configure: Regenerated. libcc1/ PR bootstrap/63784 * configure: Regenerated. libcilkrts/ PR bootstrap/63784 * configure: Regenerated. libffi/ PR bootstrap/63784 * configure: Regenerated. libgfortran/ PR bootstrap/63784 * configure: Regenerated. libgomp/ PR bootstrap/63784 * configure: Regenerated. libitm/ PR bootstrap/63784 * configure: Regenerated. libjava/ PR bootstrap/63784 * configure: Regenerated. libjava/classpath/ PR bootstrap/63784 * configure: Regenerated. libobjc/ PR bootstrap/63784 * configure: Regenerated. libquadmath/ PR bootstrap/63784 * configure: Regenerated. libsanitizer/ PR bootstrap/63784 * configure: Regenerated. libssp/ PR bootstrap/63784 * configure: Regenerated. libstdc++-v3/ PR bootstrap/63784 * configure: Regenerated. libvtv/ PR bootstrap/63784 * configure: Regenerated. lto-plugin/ PR bootstrap/63784 * configure: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217937 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libtool.m4')
-rw-r--r--libtool.m46
1 files changed, 3 insertions, 3 deletions
diff --git a/libtool.m4 b/libtool.m4
index c96d80cde8d5..4b2d30a15583 100644
--- a/libtool.m4
+++ b/libtool.m4
@@ -4459,7 +4459,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@@ -5525,8 +5525,8 @@ if test "$_lt_caught_CXX_error" != yes; then
# Check if GNU C++ uses GNU ld as the underlying linker, since the
# archiving commands below assume that GNU ld is being used.
if test "$with_gnu_ld" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'