This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: crosscompiler x86->solaris2.8


Kai Ruottu wrote:
> 
> Per Fransson wrote:
> > -Wl,-h,libgcc_s.so.1 -Wl,-z,text -Wl,-z,defs -Wl,-M,libgcc.map -o libgcc_s.so
>                                                #################
> > foo/myGCC//sparc-sun-solaris2.8/bin/ld:libgcc.map: file format not recognized;
> > treating as linker script
> > foo/myGCC//sparc-sun-solaris2.8/bin/ld:libgcc.map:1: parse error
> 
>  If we see the GCC-option '-Wl,-M,libgcc.map', which gives the options/parameters
> '-M libgcc.map' to the linker, the '-M' will be understood as an option, while the
> 'libgcc.map' will be understood as a parameter for the linker, not to the option
> '-M'. The '-M' uses no parameter while the '-m' has the 'EMULATION', the '-o' the
> 'FILE' and so on...
> 
>  So this is clearly a bug in the GCC sources, please report it...

 Maybe this is not the case... The native linker has the '-M mapfile', "Invoke ld
directives from 'mapfile'"...

 Your 'configure' command didn't at all tell that you are using the GNU ld :

> % ../gcc-3.0.4/configure --prefix=foo/myGCC/ --target=sparc-sun-solaris2.8 \
> --without-newlib -v

 Believe me or not, but computers are stupid ;-) Although you may know that using
the native Sun-Sparc 'ld' for cross-tools under Linux/x86 is impossible, this has
been assumed now by 'configure'...

 On the native environment it is common to use the native 'as' and 'ld' and not
the GNU ones, so using the '--with-gnu-as --with-gnu-ld' in 'configure' may be
quite obligatory when the possibility about any native tools being in the
native environment exists...

 So for 'learning this lesson', I would suggest you to do a 'make distclean',
reconfigure with the added options and see what happens. There can be other
problems resulting from this mistake too...

Cheers, Kai


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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