Hi,
Of course, we now need testing with various compilers
on various platforms. We switched from -r to -Wl,-r
to have it work properly on both GCC and clang. Hopefully
-mno-relax works with clang too.
-Wl,-r is I think more correct. When looking at "others" who had the
problem on the net, they used it too. I have seen some new posts too,
but probably none included gcc 4.6 ? I don't know about clang. --relax
and --wno-relax appear to enable some kind of optimization I could not
even fond exactly what it is.
Apparently the default of "relax" is there for everybody, but since on
x86 it does nothing, the majority of people never noticed, because if it
does nothing it does not cause errors :)
It actually doesn't even seem to work with GCC 4.6. When building
gnustep-base with GCC 4.6.0 on Linux i386, I now get --
Making all for subproject Additions...
gcc -nostdlib -Wl,-r -mno-relax -shared-libgcc -fexceptions -o
./obj/subproject.o obj/Additions.obj/GSObjCRuntime.m.o
obj/Additions.obj/GCObject.m.o obj/Additions.obj/GCArray.m.o
obj/Additions.obj/GCDictionary.m.o obj/Additions.obj/GSLock.m.o
obj/Additions.obj/GSMime.m.o obj/Additions.obj/GSXML.m.o
obj/Additions.obj/GSFunctions.m.o obj/Additions.obj/GSInsensitiveDictionary.m.o
obj/Additions.obj/NSArray+GNUstepBase.m.o
obj/Additions.obj/NSAttributedString+GNUstepBase.m.o
obj/Additions.obj/NSBundle+GNUstepBase.m.o
obj/Additions.obj/NSCalendarDate+GNUstepBase.m.o
obj/Additions.obj/NSData+GNUstepBase.m.o
obj/Additions.obj/NSDebug+GNUstepBase.m.o
obj/Additions.obj/NSError+GNUstepBase.m.o
obj/Additions.obj/NSFileHandle+GNUstepBase.m.o
obj/Additions.obj/NSLock+GNUstepBase.m.o
obj/Additions.obj/NSMutableString+GNUstepBase.m.o
obj/Additions.obj/NSNumber+GNUstepBase.m.o
obj/Additions.obj/NSObject+GNUstepBase.m.o
obj/Additions.obj/NSPropertyList+GNUstepBase.m.o
obj/Additions.obj/NSProcessInfo+GNUstepBase.m.o
obj/Additions.obj/NSStream+GNUstepBase.m.o
obj/Additions.obj/NSString+GNUstepBase.m.o
obj/Additions.obj/NSTask+GNUstepBase.m.o
obj/Additions.obj/NSThread+GNUstepBase.m.o
obj/Additions.obj/NSURL+GNUstepBase.m.o obj/Additions.obj/Unicode.m.o ;
gcc: error: unrecognized command line option ‘-mno-relax’
So, more sophistication is needed ...
That's strange... gcc must have dropped that option? Or perhaps it is
present only if gcc is compiled to issue automatically --relax to the
linker? That would make no sense: an options needs to be there and in
case "do nothing". With gcc 4.5.2 it works. -dumpspecs should tell you
if it has the relax option built in.
I don't know about clang, but if gcc stopped supporting it, we need some
more magic. Do you think it you can detect this via configure?
Riccardo
_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev