On my machine I can't find any relax option anywhere with either GCC 4.1.2
or GCC 4.7.0. Both "gcc --target-help | grep relax" and
"gcc -dumpspecs | grep relax" return nothing.
It makes sense; since it's an "-m" option, it is a machine-dependent option.
So, it is supported on some target machines, but not on others. I think
GCC 4.6.0+ became more strict/accurate in checking target flags.
The simple solution would be to only add -mno-relax on Sparc, if you're having
the problem on Sparc. We don't even need a configure check; in target.make,
simply find the right location for it, and add a make conditional to add
-mno-relax on the target CPU that requires it. Something like (untested
pseudo-code, to give you something to start with) --
# 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