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)" To: cygwin 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> Content-Type: multipart/mixed; boundary="=-Z5Lpp9riVpcTlbb1NgzA" Mime-Version: 1.0 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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--