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]

Re: How to make a portable toolchain?


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

Attachment: specs-2.8-x86
Description: Binary data

Attachment: specs-2.7-sparc
Description: Binary data

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

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