X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 	tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <49CA46E2.80604@gmail.com>
Date: Wed, 25 Mar 2009 14:59:46 +0000
From: Dave Korn <dave.korn.cygwin@googlemail.com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: [SOLVED] Re: under cygwin, zsh cannot run when built against  	ncurses9-5.7-13
References: <gpgeu9$iuo$1@ger.gmane.org> <Pine.LNX.4.64.0903142203230.9859@gremlin.fruitbat.org> <49BF1770.9020007@gmail.com> <49C00B83.8050302@gmail.com> <20090317222721.GB1505@ednor.casa.cgf.cx> <49C07781.1090702@gmail.com> <20090318053237.GA31643@ednor.casa.cgf.cx> <49C09F09.3040804@gmail.com> <20090319103136.GB26397@calimero.vinschen.de> <49CA2860.4090008@gmail.com> <20090325142928.GC5286@ednor.casa.cgf.cx>
In-Reply-To: <20090325142928.GC5286@ednor.casa.cgf.cx>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Christopher Faylor wrote:
> On Wed, Mar 25, 2009 at 12:49:36PM +0000, Dave Korn wrote:
>>  So the linker is DTRT, the problem has always existed but been masked by the
>> fact that nothing between -lm and -lcygwin used to import anything, the
>> problem has arisen now because now that does happen, and the solution is to
>> mung the symbols in the import top/tail sections in libm so that libm and
>> libcygwin both each add a complete import table entry of their own (there's no
>> problem having two import tables against the same DLL).  Once I've figured out
>> how that perl script works, I'll be able to suggest a patch.
> 
> Don't bother.  I'll look into it.

    Thanks.  As an experiment I tried adding (just after the line "0 while
s/$libdllname/$libname/sog;")

my $orig_iname="_cygwin1_dll_iname";
my $new_iname="_libm_dll_iname";
my $inamepad = length($orig_iname) - length($new_iname);
die "$0: library name too long (" . length($new_iname) . ")\n" if $inamepad < 0;
$new_iname .= "\0" x $inamepad;
0 while s/$orig_iname/$new_iname/sog;

... and although it produced a libm.a with the symbols I was hoping to see,
there's something wrong as the reference to _pow in zsh's math.o that was
previously pulling in libm.a(d0001286.o) fails to pull in anything from a libm
built with the above.  Didn't get as far as figuring out what I did wrong yet,
but if you're looking after it I'll get on with GCC stuff.

    cheers,
      DaveK

--
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/

