delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/10/24/21:49:48

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-5.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_CC
X-Spam-Check-By: sourceware.org
Message-ID: <1351129780.3692.12.camel@YAAKOV04>
Subject: 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
In-Reply-To: <1350847920.1244.61.camel@YAAKOV04>
References: <1350847920 DOT 1244 DOT 61 DOT camel AT YAAKOV04>
Mime-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

--=-Z5Lpp9riVpcTlbb1NgzA
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

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


--=-Z5Lpp9riVpcTlbb1NgzA
Content-Disposition: attachment; filename="libtool-as-needed.patch"
Content-Type: text/x-patch; name="libtool-as-needed.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit

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"


--=-Z5Lpp9riVpcTlbb1NgzA
Content-Type: text/plain; charset=us-ascii

--
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
--=-Z5Lpp9riVpcTlbb1NgzA--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019