This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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: .opt file help


Hi Jonathan,

On 09/04/12 21:54, Jonathan Wakely wrote:
On 9 April 2012 10:59, Paul Smedley wrote:
Hi All,

As part of updating the OS/2 port of GCC from v4.4.x to v4.6.x I've hit a
snag where the passing of options to the linker is no longer working.

Previous OS/2 builds of gcc have supported -Zlinker zzzz on the command line
to pass the option zzzz to the linker.

With previous gcc versions this worked, however with 4.6 I get an error
about gcc not recognising the option.

I added:
-Zlinker
driver separate

Can you simply make it an alias of the existing -Xlinker option?


-Zlinker
Driver Separate Alias(-Xlinker)

I discovered the above shortly after posting last night. I tried it this morning and it doesn't work :(


Looking at emx.h again - the previous code that worked with GCC <= 4.5 had as part of GCC_DRIVER_HOST_INITIALIZATION:


else if (!strcmp (argv [i], "-Zlinker")) \
{ \
if (i + 1 >= argc) \
fatal_error ("argument to `-Zlinker' is missing");\
arg [0] = "-Xlinker"; \
arg [1] = "-O"; \
arg [2] = "-Xlinker"; \
arg [3] = argv [++i]; \
arg_count = 4; \
} \


So it looks like it was rewriting a gcc option of (for example)
-Zlinker /PM:PM
to -Xlinker -O -Xlinker /PM:PM

whereas alias's Zlinker to -xlinker just results in -Xlinker /PM:PM which fails :(



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