This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Building with AIX gcc 3.3
- From: "Frank Patz" <fp at contact dot de>
- To: "'David Edelsohn'" <dje at watson dot ibm dot com>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Thu, 7 Aug 2003 20:17:26 +0200
- Subject: RE: Building with AIX gcc 3.3
- Organization: CONTACT Software GmbH
David wrote:
> >> nm -BCpg *.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2
> >> == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort
> >> -u > icu.exp
> >>
> >> Also, you need to use -Wl,-G when creating the shared object and
> >> -Wl,-brtl when linking the final application.
>
> Frank> Doesn't the GCC frontend do all this automatically?
> collect2 generates
> Frank> an export file and adds it to the linker command, and
> -brtl is added
> Frank> automatically, when -shared is used. The frontend does
> not add -G
> Frank> automatically when linking shared libraries, however.
> On the other hand
> Frank> this doesn't seem to make a difference.
>
> collect2 creates an export file for symbols that collect2
> generates -- static constructors and destructors, and frames.
> collect2
> cannot make assumptions about how user symbols will be used and cannot
> generate an export file for those.
You're right, David. How could I doubt that. I was just to lazy to
look at the .x-file contents.
> Also, GCC does not invoke the linker with "-brtl" under any
> circumstances. GCC "-shared" invokes the linker with "-bM:SRE", which
> creates a shared object. GCC does not make any assumptions
> about the user expecting System-V semantics.
Your point also: someone modified the specs file at our site. Don't
know why ...
Sorry,
- frank