Summary: base configure script does not detect nonfragile ABI
Submitted by: leeg
Submitted on: Tue 13 Mar 2018 09:34:29 PM UTC
Severity: 3 - Normal
Item Group: Bug
Assigned to: None
Discussion Lock: Any
GNUstep-base configure script, when configured either with no flags or with
--disable-mixedabi, does not detect the nonfragile abi. Then building -base
fails, because I requested the nonfragile ABI but it can't find it. I find
that if I compile the test program:
$ clang config/config.non-fragile-ivars.m
$ echo $?
1 [i.e. no nonfragile ABI detected]
$ clang -fobjc-runtime=gnustep-1.8.1 config/config.non-fragile-ivars.m
$ echo $?
0 [i.e. it was detected!]
If I edit GSConfig.h by hand to change GS_NONFRAGILE=1, then -base builds and
'make check' succeeds.
The expected behaviour is that ./configure correctly detects the nonfragile
I found the issue in the base/configure script that is causing this problem.
the -fobjc-nonfragile-abi flag was removed from the script when it is testing
for non fragile abi support so it always fails. This issue starts on line 8061
and a missing line between 8081 and 8082. I'll try to attach a screen shot of
the file comparison.
Except that ARC requires the -fobjc-nonfragile-abi flag. If you specify
-fobjc-arc without -fobjc-nonfragile-abi flag then the compile will fail with
the message "error: -fobjc-arc is not supported on platforms using the legacy
> Except that ARC requires the -fobjc-nonfragile-abi flag.
It doesn't on my systems (and shouldn't afaik with any version of clang). I
expect the error you got is because you aren't specifying the correct runtime,
not because you aren't specifying the obsolete/broken -fobjc-nonfragile-abi
If you are using current gnustep-make configured to support it (ie
--with-library-combo=ng-gnu-gnu) then it should work because the build system
should be compiling with the correct flags, but if you are specifying compiler
flags manually in environment variables etc you are expected to know what you
are doing and it's not really a gnustep issue.
Try configuring gnustep-make to use the new compiler/runtime features (ng),
and see if there are any problems then.