[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: allow specific flags through to the linker without modification
From: |
Boehne, Robert |
Subject: |
RE: allow specific flags through to the linker without modification |
Date: |
Fri, 9 May 2003 07:41:11 -0500 |
Howard,
IIRC, -XCompiler will pass an argument directly to the compiler
when mode==compile, if you need to pass something to the compiler
during linking, you might need to use -XCClinker instead.
Example:
I'd like to have "CC -z defs ..." on my link line (not that
this is the way to pass this particular flag):
libtool --mode=link --tag=CXX CC -XCClinker -z -XCClinker defs ...
The mechanism is rather simple, it just plops the argument on
the command line without changes. This should be exactly what
you'd want though.
Rob
-----Original Message-----
From: Howard Chu [mailto:address@hidden
Sent: Thursday, May 08, 2003 10:25 PM
To: Boehne, Robert; 'Peter O'Gorman'; address@hidden
Subject: RE: allow specific flags through to the linker without
modification
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden Behalf Of Boehne, Robert
> Peter,
>
> I think this should be doable with -XCompiler, -Xlinker and
> -XCClinker.
> >From the manual:
> You can pass link specific flags to the compiler driver
> using `-XCClinker flag'
> or pass linker flags with `-Wl,flag' and `-Xlinker flag'.
> You can also pass
> compile specific flags using `-Wc,flag' and `-Xcompiler flag'.
>
> The intent is to allow anything that a user might want to have on the
> compiler driver's invocation to be possible. Can what you want to
> achieve be done this way?
Ah, I missed that "-Xcompiler" option. If I use "-Xcompiler -Wc,DLL" will the
compiler then get invoked as "cc -Wc,DLL" ? If so, this works for me.
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
http://www.symas.com http://highlandsun.com/hyc
Symas: Premier OpenSource Development and Support