delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/12/16/21:54:57

X-Spam-Check-By: sourceware.org
Mime-Version: 1.0 (Apple Message framework v746.2)
In-Reply-To: <20051217021452.GB1758@trixie.casa.cgf.cx>
References: <20051130171137 DOT GE2999 AT calimero DOT vinschen DOT de> <AC82CFF8-184B-4D72-BA08-3775AC126680 AT rehley DOT net> <20051216234128 DOT GB26243 AT trixie DOT casa DOT cgf DOT cx> <61A3944E-814C-459E-992C-6F6878A7EF83 AT rehley DOT net> <20051217021452 DOT GB1758 AT trixie DOT casa DOT cgf DOT cx>
Message-Id: <CA3C0F07-C5E4-4D09-99F7-897791F02774@rehley.net>
From: Peter Rehley <peter AT rehley DOT net>
Subject: Re: Call for testing Cygwin snapshot (getopt and -liberty don't mix..binutils issue)
Date: Fri, 16 Dec 2005 18:54:48 -0800
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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

On Dec 16, 2005, at 6:14 PM, Christopher Faylor wrote:

> On Fri, Dec 16, 2005 at 05:50:01PM -0800, Peter Rehley wrote:
>> On Dec 16, 2005, at 3:41 PM, Christopher Faylor wrote:
>>> On Fri, Dec 16, 2005 at 02:41:54PM -0800, Peter Rehley wrote:
>>>> I just noticed something else that may or may not be a problem  
>>>> (noticed
>>>> when working on tftpd).  When I link with iberty (-liberty), the  
>>>> getopt
>>>> function doesn't return the correct value for the option argument.
>>>> Here is a sample program
>>>
>>> libiberty has its own implementation of getopt.  This is not a  
>>> cygwin
>>> problem.
>> hmmm, ok.  it's binutils then.  But when I do a build of cygwin using
>> the snapshot, it builds libiberty.a.  The libiberty directory in the
>> snapshot source has a getopt.c file that is nearly identical to the
>> binutils version.  I've tried out the version of libiberty.a that
>> cygwin builds (replaced the binutils version), and it has the same
>> problem as the binutils version.  Why does cygwin need to build it's
>> own version of libiberty?  and where does the libiberty in the cygwin
>> source come from?
>>
>> I'll look at binutils at little closer to track the problem further.
>
> I don't know why you're using libiberty but if it you are using the  
> one
> that comes from binutils then it still isn't a cygwin problem  
> regardless
> of the fact that you found a libiberty in cygwin's build area.  Cygwin
> has its own version of getopt and it is not the version that comes  
> from
> libiberty.  There are no guarantees that cygwin's getopt header will
> match whatever is in libiberty.a.

libiberty.a is being used because the tftpd (tftpd-hpa) package we  
are using uses xmalloc and the configure script that comes with that  
package determined that libiberty.a contains xmalloc.

I know that the cygwin getopt and libiberty getopt are different, but  
I was just wondering why there is a liberty directory in the cygwin src.

And finally for now, is there a way to use the cygwin version of  
getopt and not the libiberty version even if we need to link to  
libiberty?
Peter

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