www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/02/09/20:10:19

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4990D3E3.7060101@cwilson.fastmail.fm>
Date: Mon, 09 Feb 2009 20:09:55 -0500
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: libtool 2.2.6a: LDFLAGS ignored when building a shared lib?
References: <20090209120543 DOT GD5416 AT calimero DOT vinschen DOT de>
In-Reply-To: <20090209120543.GD5416@calimero.vinschen.de>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

Corinna Vinschen wrote:
> I have a problem using libtool 2.2.6a.  I've just tried to build the
> latest file(1) for Cygwin 1.7 using gcc-4.  Since gcc-4 is still in flux
> I decided to build with a static libgcc.  First I reconfed the file
> source tree so that the latest libtool is used.  This worked fine,
> configure and make succeeded.  However, here's the one puzzeling problem
> I have.  I'm unable to build using the -static-libgcc flag.  I tried to
> add it to LDFLAGS, then to CFLAGS, then to both.  For some reason this
> flag is filtered out when gcc gets called to link the shared lib.
[snip]
> So there's the `-static-libgcc' twice in the libtool comamnd line when
> called from make.  But when libtool calls gcc, nothing's left of it.  I
> understand why CFLAGS is missing, but why did it filter out LDFLAGS as
> well?  And, if that's normal, why, and how do I workaround that?

I believe it is a long-standing bug, mentioned here:
http://lists.gnu.org/archive/html/bug-libtool/2005-10/msg00004.html
but IIRC the promised patch was never produced.

Try Ralf's suggested workaround, configuring your entire package with
CC='gcc -static-libcc' and/or CXX='g++ -static-libgcc'.

If that works, then I'll ping Ralf on fixing this bug.

--
Chuck

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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