This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: gcc: .rdata problem


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

> Dave Korn wrote:

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]