delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/03/17/15:34:25

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <49C00B83.8050302@gmail.com>
Date: Tue, 17 Mar 2009 20:43:47 +0000
From: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
CC: cygwin AT cygwin DOT com
Subject: Re: under cygwin, zsh cannot run when built against ncurses9-5.7-13
References: <20a807210903131414g62e0a53cyefd3938c3fe8af33 AT mail DOT gmail DOT com> <49BADAC1 DOT 80709 AT cwilson DOT fastmail DOT fm> <gpf7kk$2g6$1 AT ger DOT gmane DOT org> <gpfcdo$a30$1 AT ger DOT gmane DOT org> <gpgeu9$iuo$1 AT ger DOT gmane DOT org> <Pine DOT LNX DOT 4 DOT 64 DOT 0903142203230 DOT 9859 AT gremlin DOT fruitbat DOT org> <49BF1770 DOT 9020007 AT gmail DOT com>
In-Reply-To: <49BF1770.9020007@gmail.com>
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

Dave Korn wrote:

>   Anyway, I found that removing "-lm -lc" from the options fixes the build
> problem, and that it makes no difference what version of ld you use.  

  Have looked at this a little further.

  First off: the Cygwin C runtime library is basically the Cygwin DLL, and
what we want in normal use is to link against the Cygwin DLL's import library,
(which is /usr/lib/libcygwin.a).

  The libraries /usr/lib/libm.a and /usr/lib/libc.a are helper libraries, used
to bundle up objects as part of the winsup build.  They are passed to the
final link that builds the Cygwin DLL.  They appear to be some kind of import
library that has been processed by a perl script called speclib that does some
kind of low-level binary munging on them to change symbol names:

-libcygwin/d000078.o:     file format pe-i386
+libc/d000078.o:     file format pe-i386
-[  7](sec  0)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000 __head_cygwin1_dll
+[  7](sec  0)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000 __head_libc

  I don't know what it's all about yet, but as far as I can tell, they aren't
suitable for use outside the actual build system itself and should probably
not need to be installed.  It would probably be better if they were replaced
by symlinks to libcygwin.a, as is done for libg.a.


    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/

- Raw text -


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