gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUstep Make still passing -fgnu-runtime


From: Ivan Vučica
Subject: Re: GNUstep Make still passing -fgnu-runtime
Date: Sun, 16 Aug 2015 17:36:42 +0100

Richard has committed revision 38887. Richard, could you comment on my questions regarding this change? 

There's the following ChangeLog entry:

+2015-08-16 Richard Frith-Macdonald <address@hidden>
+
+ * library-combo.make: Use David's suggested runtime flag for the
+ next generation (ng) runtime combo.
+ * configure.ac: Check for compiler blocks support for ng combo.
+ Fix some program source quoting for newer autoconf
+

which however does this:

Index: library-combo.make
===================================================================
--- library-combo.make (revision 38886)
+++ library-combo.make (revision 38887)
@@ -108,8 +108,8 @@
   OBJC_LDFLAGS =
   OBJC_LIB_DIR =
   OBJC_LIBS = $(OBJC_LIB_FLAG) -fobjc-nonfragile-abi
-  RUNTIME_FLAG   = -fobjc-runtime=gnustep -fblocks -fno-objc-legacy-dispatch
-  RUNTIME_DEFINE = -DGNU_RUNTIME=1 -D_NONFRAGILE_ABI=1
+  RUNTIME_FLAG = -fobjc-runtime=gnustep-1.8 -fblocks -fno-objc-legacy-dispatch
+  RUNTIME_DEFINE = -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1
 endif
 
 ifeq ($(OBJC_RUNTIME_LIB), gnugc)


I'm not sure how correct or useful this is. I'm specifying this:
  $ ./configure --with-layout=fhs --enable-debug-by-default --enable-objc-nonfragile-abi --enable-native-objc-exceptions --prefix=/usr

I guess I'm supposed to manually specify the ng-gnu-gnu combo? Otherwise I still get:

configure:5968: checking whether we should use the nonfragile ABI
configure:5998: clang -c  -fobjc-runtime=gnustep-1.7 -x objective-c -I.   -I/usr/include   -L/usr/lib -fgnu-runtime -DGNU_RUNTIME -fobjc-nonfragile-abi  conftest.c >&5

How do I go about that? And should we really be adding a completely new combo? 

I see the new environment variable OBJC_RUNTIME_LIB being used in 38887, which, if used with value of 'ng', seems to be activating 'libobjc2'-specific code. I think this should be documented in INSTALL and announced widely.

--------------------------


Additionally, output of 'svn diff -r 38886:38887' is bizarre and the probable cause of the failure I'm seeing. I think this has actually broken the build, as the diff randomly inserts 'int[newline]main ()[newline]{' into configure. How was 'configure' regenerated?

Failure:

configure:5998: clang -c  -fobjc-runtime=gnustep-1.7 -x objective-c -I.   -I/usr/include   -L/usr/lib -fgnu-runtime -DGNU_RUNTIME -fobjc-nonfragile-abi  conftest.c >&5
clang: warning: argument unused during compilation: '-L/usr/lib'
conftest.c:19:1: error: function definition is not allowed here
{
^
1 error generated.
configure:5998: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| int
| main ()
| {
| /* Note that we never execute this code so it does not really matter
|    what it is.  We are testing that the compiler accepts the
|    '-fobjc-nonfragile-abi' flag.  */
| int
| main()
| {
| #ifndef __has_feature
| #define __has_feature(x) 0
| #endif
| return __has_feature(objc_nonfragile_abi) ? 0 : 1;
| }
|   ;
|   return 0;
| }
configure:6004: result: no
configure:6009: The nonfragile ABI was requested, but the compiler
configure:6011: doesn't support it.
configure:6013: error: compiler doesn't support nonfragile ABI


Example of bizarre diff:

@@ -5824,6 +5923,9 @@
   return 0;
 }
 
+  ;
+  return 0;
+}
 _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
   objcc=yes
@@ -5873,6 +5975,10 @@
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+int
+main ()
+{
+
 /* Note that we never execute this code so it does not really matter
    what it is.  We are testing that the compiler accepts the
    '-fobjc-nonfragile-abi' flag.  */
@@ -5885,6 +5991,9 @@
 return __has_feature(objc_nonfragile_abi) ? 0 : 1;
 }
 
+  ;
+  return 0;
+}
 _ACEOF


Note, when I run 'autoreconf -vfi' or 'rm configure && autoreconf -vfi' I get the same results.

# autoreconf -V | head -n1
autoreconf (GNU Autoconf) 2.69



On Sat, Aug 15, 2015 at 1:45 PM, David Chisnall <address@hidden> wrote:
Hi,

I’ve discovered that GNUstep Make still passes -fgnu-runtime, which means that we default to the old ABI when compiling with clang.  Worse, it puts this after OBJCFLAGS provided on the command line, so it’s hard to override (the last one out of -fobj-runtime=, -fnext-runtime and -fgnu-runtime takes precendence).

Please will someone who understands GNUstep Make change this so that it will pass a more sensible flag (-fobjc-runtime=gnustep-1.8 would be the best option for the latest release of the runtime)?

David

-- Sent from my IBM 1620


_______________________________________________
Gnustep-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/gnustep-dev


reply via email to

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