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: Riccardo Mottola
Subject: Re: sparc: ld: --relax and -r may not be used together
Date: Tue, 12 Apr 2011 22:56:42 +0200
User-agent: Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.9.2.13) Gecko/20110301 Lightning/1.0b3pre Lanikai/3.1.7

Hi,

yes, those are the linker options which GCC invokes. The problem here is that apparently the relax option is on some architectures / compile versions passed directly to the linker, without we specifying it and for the linker -r and --relax are incompatible.

Riccardo

On 04/12/11 18:05, address@hidden wrote:
Hi,

Am Sun, 10 Apr 2011 17:31:43 +0200
schrieb Riccardo Mottola<address@hidden>:

Hi,

indeed... it is very strange..

http://hackage.haskell.org/trac/ghc/ticket/3791

is detailed and it even worked. I have seen several similar posts...

however according to
http://gcc.gnu.org/onlinedocs/gcc-3.2.3/gcc/Option-Summary.html#Option%20Summary

neither in it or in the 4.4/4.5 series I can find this option. The
closest is no-relax-immediate but not for sparc. What is this, black
magic? The quest for the hidden undocumented GCC option?
Might you be looking for this one?

`--relax'
`--no-relax'
      An option with machine dependent effects.  This option is only
      supported on a few targets.  *Note `ld' and the H8/300: H8/300.
      *Note `ld' and the Intel 960 family: i960.  *Note `ld' and Xtensa
      Processors: Xtensa.  *Note `ld' and the 68HC11 and 68HC12:
      M68HC11/68HC12.  *Note `ld' and PowerPC 32-bit ELF Support:
      PowerPC ELF32.
      [...]

That's a linker option. GNU ld seems to accept it on every target, but
usually it doesn't do anything.

GCC 4.1 for example does have -mrelax on at least some targets on which
--relax does something, but not everywhere, so the portable version
would seem to be -Wl,--relax.

I can't find a -r option for GCC, but GNU ld has

`-r'
`--relocatable'
      Generate relocatable output--i.e., generate an output file that
      can in turn serve as input to `ld'.  [...]

Again, use -Wl,-r.

Hope this helps.

Kai




reply via email to

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