[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GCC_NO_EXECUTABLES and Libtool
From: |
Ralf Wildenhues |
Subject: |
Re: GCC_NO_EXECUTABLES and Libtool |
Date: |
Thu, 18 Dec 2008 21:05:14 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello Paolo, Peter,
* Peter O'Gorman wrote on Tue, Dec 16, 2008 at 07:15:06AM CET:
> On 13-Dec-08, at 7:45 AM, Ralf Wildenhues wrote:
>> Add cache variables to link tests.
>> * libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER)
>> (_LT_LINKER_SHLIBS): Add cache variables to tests that
>> require the linker to work. For shlibpath_overrides_runpath,
>> this also changes the semantics to let the result from the C
>> compiler take precedence.
[...]
> I have not had the chance to apply this to test it, but it reads ok to
> me. Please apply.
* Paolo Bonzini wrote on Sat, Dec 13, 2008 at 07:20:08PM CET:
> Ralf Wildenhues wrote:
> > [ gcc-patches: OK to pull the libtool.m4 bits over to the GCC tree
> > once they are applied upstream? ]
>
> Yes.
Thanks to both of you. Pushed to git Libtool as shown, applied to GCC
trunk as follows. Patch for src coming up on the binutils list.
Cheers,
Ralf
ChangeLog:
2008-12-18 Ralf Wildenhues <address@hidden>
Backport from upstream Libtool:
* libltdl.m4 (_LT_SYS_DYNAMIC_LINKER)
(_LT_LINKER_SHLIBS): Add cache variables to tests that
require the linker to work. For shlibpath_overrides_runpath,
this also changes the semantics to let the result from the C
compiler take precedence.
boehm-gc/ChangeLog:
2008-12-18 Ralf Wildenhues <address@hidden>
* configure: Regenerate.
fixincludes/ChangeLog:
2008-12-18 Ralf Wildenhues <address@hidden>
* configure: Regenerate.
gcc/ChangeLog:
2008-12-18 Ralf Wildenhues <address@hidden>
* configure: Regenerate.
libffi/ChangeLog:
2008-12-18 Ralf Wildenhues <address@hidden>
* configure: Regenerate.
libgfortran/ChangeLog:
2008-12-18 Ralf Wildenhues <address@hidden>
* configure: Regenerate.
libgomp/ChangeLog:
2008-12-18 Ralf Wildenhues <address@hidden>
* configure: Regenerate.
libjava/classpath/ChangeLog:
2008-12-18 Ralf Wildenhues <address@hidden>
* configure: Regenerate.
libjava/ChangeLog:
2008-12-18 Ralf Wildenhues <address@hidden>
* configure: Regenerate.
libmudflap/ChangeLog:
2008-12-18 Ralf Wildenhues <address@hidden>
* configure: Regenerate.
libobjc/ChangeLog:
2008-12-18 Ralf Wildenhues <address@hidden>
* configure: Regenerate.
libssp/ChangeLog:
2008-12-18 Ralf Wildenhues <address@hidden>
* configure: Regenerate.
libstdc++-v3/ChangeLog:
2008-12-18 Ralf Wildenhues <address@hidden>
* configure: Regenerate.
zlib/ChangeLog.gcj:
2008-12-18 Ralf Wildenhues <address@hidden>
* configure: Regenerate.
diff --git a/libtool.m4 b/libtool.m4
index 39ba996..66b1a3f 100644
--- a/libtool.m4
+++ b/libtool.m4
@@ -2454,16 +2454,21 @@ linux* | k*bsd*-gnu)
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
+
# Some binutils ld are patched to set DT_RUNPATH
- save_LDFLAGS=$LDFLAGS
- save_libdir=$libdir
- eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
- LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
- [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep
"RUNPATH.*$libdir" >/dev/null],
- [shlibpath_overrides_runpath=yes])])
- LDFLAGS=$save_LDFLAGS
- libdir=$save_libdir
+ AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+ [lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep
"RUNPATH.*$libdir" >/dev/null],
+ [lt_cv_shlibpath_overrides_runpath=yes])])
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+ ])
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
# This implies no fast_install, which is unacceptable.
# Some rework will be needed to allow for fast_install
@@ -5111,36 +5116,38 @@ x|xyes)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
- AC_MSG_CHECKING([whether -lc should be explicitly linked in])
- $RM conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
- pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
- _LT_TAGVAR(allow_undefined_flag, $1)=
- if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \"
\>/dev/null 2\>\&1)
- then
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- else
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- fi
- _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
- AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+ AC_CACHE_CHECK([whether -lc should be explicitly linked in],
+ [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+ [$RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \"
\>/dev/null 2\>\&1)
+ then
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ ])
+ _LT_TAGVAR(archive_cmds_need_lc,
$1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
;;
esac
fi