This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: libtool: update to 2.4.2?
- From: "Yaakov (Cygwin/X)" <yselkowitz at users dot sourceforge dot net>
- To: cygwin <cygwin at cygwin dot com>
- Date: Wed, 24 Oct 2012 20:49:40 -0500
- Subject: Re: libtool: update to 2.4.2?
- References: <1350847920.1244.61.camel@YAAKOV04>
On Sun, 2012-10-21 at 14:32 -0500, Yaakov (Cygwin/X) wrote:
> Chuck,
>
> Would you be able to update libtool to 2.4.2 soon? 2.4.2 adds support
> for gccgo (new to gcc 4.7) and new systems (FreeBSD 10), and an update
> would save me from having to ship different libtoolizes for each
> affected platform.
And when you do so, could you include the attached patch to ltmain.sh
(or whichever file generates it)? The patch from Gentoo fixes handling
of -Wl,--as-needed when linking libraries by keeping it in argument
order rather than appending it to the end of the link command like other
-Wl, flags (as per the GNU ld manual, this flag only affects -l flags
which *follow* it). This makes a big difference for Linux
cross-toolchains.
Yaakov
>From Portage eclass/ELT-patches/as-needed/2.4.2
--- a/libltdl/config/ltmain.sh 2012-08-19 10:18:57.929178597 +0200
+++ b/libltdl/config/ltmain.sh 2012-08-19 10:31:43.409388998 +0200
@@ -5798,10 +5798,15 @@
IFS="$save_ifs"
func_stripname ' ' '' "$arg"
arg=$func_stripname_result
;;
+ -Wl,--as-needed|-Wl,--no-as-needed)
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
-Wl,*)
func_stripname '-Wl,' '' "$arg"
args=$func_stripname_result
arg=
save_ifs="$IFS"; IFS=','
@@ -6158,10 +6163,19 @@
for deplib in $libs; do
lib=
found=no
case $deplib in
+ -Wl,--as-needed|-Wl,--no-as-needed)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ fi
+ continue
+ ;;
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple