How to make a portable toolchain?

Bin Zhou binzhou@pop-star.net.cn
Fri Nov 2 05:20:00 GMT 2001


Hi Kai,

My application has to support both Solaris2.8 and 2.7. The way you suggested
works great on my Solaris2.8/x86, but I got following error on my
Solaris2.7/sparc:

"ld: fatal: -dn and -Bdynamic incompitable."

I checked the 'specs' file, the '-dn' option is in 'link' specification
entry.

Attached are the two specs files I am using. The specs-2.8-x86 works(for gcc
on Solaris2.8/x86), but specs-2.7-sparc got above error(with gcc on
Solaris2.7/sparc).

Thanks in advance for your help.
-Bin


----- Original Message -----
From: "Bin Zhou" <binzhou@pop-star.net.cn>
To: <kai.ruottu@luukku.com>
Cc: "Rodney Smith" <rodney.smith@watchguard.com>;
<crossgcc@sourceware.cygnus.com>; <binzhou@tgivan.com>
Sent: Tuesday, November 06, 2001 7:38 PM
Subject: Re: How to make a portable toolchain?


> Hi Kai,
>
> >  Ok, my new suggestion would however to be to add the following:
> >
> >    %{static:-Bdynamic -ldl -Bstatic} %{!static:-ldl}
> >
> > after the '-lc' in the '*lib:'-spec in the 'specs'-file (The old one
> suggested only
> > the latter part)... Then the '-ldl' will be 'wrapped' between
'-Bdynamic'
> and
> > '-Bstatic' on the command line for the linker.
> >
>
> This works. "objdump -p" shows that my target only needs the libdl.so.1 at
> running time.
> Thanks a lot.
>
> -Bin
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: specs-2.8-x86
Type: application/octet-stream
Size: 2659 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20011102/69583cf0/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: specs-2.7-sparc
Type: application/octet-stream
Size: 3790 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20011102/69583cf0/attachment-0001.obj>
-------------- next part --------------
------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


More information about the crossgcc mailing list