gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sparc: ld: --relax and -r may not be used together


From: Nicola Pero
Subject: Re: sparc: ld: --relax and -r may not be used together
Date: Sun, 10 Apr 2011 13:51:43 +0200 (CEST)

>> # On Sparc, this is required because otherwise GCC automatically passes
>> # -relax to the linker, which conflicts with the -r passed via -Wl,-r.
>> ifeq ($(findstring sparc, $(GNUSTEP_TARGET_CPU)), sparc)
>>    OBJC_MERGE_CMD += -mno-relax
>> endif
> Since it is machine dependent and from the people having problems it is 
> not OS restricted (I think I have seen also openbsd or solaris 
> mentioned) that would be a good starting fix, to check on most platforms.
> If it works on all sparc OS / compiler compilations... it would be fine.
> In case we discover e.g. ARM needs that too, we can always add it.
>
> We need to know how clang behaves, in case, you can restrict the above 
> to gcc only.

I don't think we have anything in place to differentiate between gcc and clang.

The alternative is to add a configure check.  In configure.ac, we need to try
determining if the compiler supports -mno-relax.  With gcc is not that 
difficult,
as we'd presumably simply grep the output of "gcc --target-help".  But clang
doesn't seem to recognize --target-help.  How do you get the list of 
command-line
compiler options for clang ?

Else, if clang doesn't support printing out the command-line options it 
recognizes,
I guess we'll have to brute force and try linking something with -mno-relax and 
see
if that works ?  (this should be a pure C test, as I'm trying to make 
gnustep-make
independent on the Objective-C runtime so it's easier to install custom 
runtimes)

Thanks




reply via email to

[Prev in Thread] Current Thread [Next in Thread]