delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/07/12/14:12:24

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: gcc: .rdata problem
Date: Tue, 12 Jul 2005 19:12:08 +0100
MIME-Version: 1.0
In-Reply-To: <42D403FC.2060402@familiehaase.de>
Message-ID: <SERRANOtpe0RVPANMMQ000004e1@SERRANO.CAM.ARTIMI.COM>

----Original Message----
>From: Gerrit P. Haase
>Sent: 12 July 2005 18:55

> Dave Korn wrote:

>> dk AT mace /artimi/firmware> grep 3.3.3 /bin/libtool
>> predep_objects="/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/crtbegin.o"
>> postdep_objects="/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/crtend.o"
>> compiler_lib_search_path="-L/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3
>> -L/usr/lib/gcc
>> -lib/i686-pc-cygwin/3.3.3/../../.."
>> dk AT mace /artimi/firmware>
>> 
>>   Hey, why not extract that stuff from gcc somehow?  The
>> -print-search-dirs output could be manipulated to give you that stuff,
>> couldn't it? 
> 
> Why wasn't this included in the specs?

  I don't know.  It seems like a sensible enough place for it at first
glance.
 
> Anyway, since crt* .o object files are no longer present in 3.4,
> simply checking which version is used should do it:
> 
> $ gcc --version | grep 3.3 && echo true
> 
> $ gcc --version | grep 3.4 && echo true
> gcc (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
> true
> 
> Depending on the result, define *dep_objects or leave it undefined.


  Or if you want to be really flexible about it, grep out the full path and
test if the files exist in that path....

gcc_install_dir="`gcc -print-search-dirs | grep install | cut -d ' ' -f 2`"
predep_objects="`ls -1 ${gcc_install_dir}crtbegin.o 2>/dev/null`"
postdep_objects="`ls -1 ${gcc_install_dir}crtend.o 2>/dev/null`"


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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