delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/03/08/10:15:33

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <616667.61173.qm@web88303.mail.re4.yahoo.com>
X-RocketYMMF: ilatypov
Date: Mon, 8 Mar 2010 07:15:20 -0800 (PST)
From: Ilguiz Latypov <ilatypov AT infradead DOT org>
Subject: Re: Cygwin build scripts in perl
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
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

>>In particular, mkimport ran objcopy against "ftruncate.o" in a
>>temporary directory, but I believe the expected filename argument was
>>supposed to be "t-ftruncate.o".  This is only my conjecture as I do not
>>know the purpose and the intention of the implementation with these
>>scripts.

>While it is very possible that my code could have bugs, the objcopy
>commands in the code exit on error so, if there were problems with the
>commands no one would be able to build cygwin.  I don't see any objcopy
>errors when I build Cygwin on either linux or Windows.

I suspect that an assumption in mkimport does not always hold true.  It appears that the script assumes existence of <SYMBOL>.o members of the input library cygdll.a for each object symbol <SYMBOL> being replaced.  

    if (!defined($fn = $symfile{$_sym})) {
        $fn = "$sym.o";
        $text{$fn} = $_sym;
    }

My linker created cygdll.a where all *.o members were in the form "d00[0-9]{4}.o"

I guess the difference is in the GNU compiler version.  I am using gcc 4.3.4-3 with --version showing "4.3.4 20090804 (release) 1".  (Just in case, my binutils are 2.19.51-1 with --version showing "2.19.51.20090704").

Let me take my original blind guess back.  It probably resulted in a wrong import library.  I wonder if such mistakes like mine could be caught by checking the contents of the generated import library.

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

- Raw text -


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