[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Base --disable-mixedabi broken with recent GNUstep Make
From: |
Quentin Mathé |
Subject: |
Base --disable-mixedabi broken with recent GNUstep Make |
Date: |
Mon, 14 Nov 2016 12:59:36 +0100 |
Hi,
I'm trying to compile GNUstep Base trunk on Debian 8 x64 with libobjc2 1.8,
clang 3.8.1 and GNUstep Make trunk (configured with --enable-debug-by-default
--enable-objc-nonfragile-abi --enable-objc-arc).
Compiling Base fails after configuring it with --disable-mixedabi:
"Your gnustep-base was configured for the objc-nonfragile-abi but you are not
using it now."
This error is printed by the following code from GSVersionMacros.h:
#if GS_MIXEDABI
# undef GS_NONFRAGILE
# define GS_NONFRAGILE 0 /* Mixed is treated as fragile */
#else
# if (__has_feature(objc_nonfragile_abi))
# if !GS_NONFRAGILE
# if defined(GNUSTEP_BASE_INTERNAL)
# error "You are building gnustep-base using the objc-nonfragile-abi but
your gnustep-base was not configured to use it."
# endif
# endif
# else
# if GS_NONFRAGILE
# error "Your gnustep-base was configured for the objc-nonfragile-abi but
you are not using it now."
# endif
# endif
#endif
Here is a compiler invocation example:
clang GSObjCRuntime.m -c \
-MMD -MP -Wall -Wdeclaration-after-statement -DNO_GNUSTEP=1 -DGNUSTEP
-DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1
-DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing -fexceptions -fobjc-exceptions
-D_NATIVE_OBJC_EXCEPTIONS -D_NONFRAGILE_ABI -pthread -fPIC -DDEBUG
-fno-omit-frame-pointer -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -g
-fgnu-runtime -fgnu-runtime -fconstant-string-class=NSConstantString -I../.
-I../ -I../../Headers -I. -I/home/vagrant/GNUstep/Library/Headers
-I/usr/local/include -I/usr/local/include -I/usr/local/include
-I/usr/local/include -I/usr/local/include -I/usr/include/libxml2
-I/usr/include/p11-kit-1 \
-o obj/Additions.obj/GSObjCRuntime.m.o
The problem comes from (__has_feature(objc_nonfragile_abi)) returning false,
even when --enable-objc-nonfragile-abi has been passed to GNUstep Make.
In March, -fobjc-nonfragile-abi was removed from common.make with this commit
https://github.com/gnustep/make/commit/9e519435a719163986a2bdede5c9b60b8db9fdd1
If I add it back, (__has_feature(objc_nonfragile_abi)) evaluates to true as
expected. I tried to replace -fobjc-nonfragile-abi by
-fobjc-runtime=gnustep-1.8 in INTERNAL_OBJCFLAGS, but
(__has_feature(objc_nonfragile_abi)) still evaluates to false in this case. Is
this a bug in clang?
Looks like we should keep adding -fobjc-nonfragile-abi to INTERNAL_OBJCFLAGS in
common.make, unless there is a better fix.
As a side note, what is the purpose of passing --enable-objc-arc to GNUstep
Make configure? This doesn't add -fobjc-arc to INTERNAL_OBJC_FLAGS and USE_ARC
doesn't seem to be used either in GNUstep Make or Base.
Cheers,
Quentin.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Base --disable-mixedabi broken with recent GNUstep Make,
Quentin Mathé <=