Author: rfm
Date: Wed Mar  2 13:05:34 2016
New Revision: 39439

URL: http://svn.gna.org/viewcvs/gnustep?rev=39439&view=rev
Log:
If ng runtime is selected, we need clang

Modified:
    tools/make/trunk/configure
    tools/make/trunk/configure.ac
    tools/make/trunk/library-combo.make

Modified: tools/make/trunk/configure
URL: 
http://svn.gna.org/viewcvs/gnustep/tools/make/trunk/configure?rev=39439&r1=39438&r2=39439&view=diff
==============================================================================
--- tools/make/trunk/configure  (original)
+++ tools/make/trunk/configure  Wed Mar  2 13:05:34 2016
@@ -693,8 +693,6 @@
 CYGWIN
 cc_bundle
 cc_cppprecomp
-ac_cv_library_combo
-OBJC_WITH_GC
 target_os
 target_vendor
 target_cpu
@@ -720,6 +718,8 @@
 LDFLAGS
 CFLAGS
 CC
+ac_cv_library_combo
+OBJC_WITH_GC
 target_alias
 host_alias
 build_alias
@@ -2278,10 +2278,84 @@
 # have an Objective-C runtime available yet.
 #
 
+targetArgument=${target}
+
 #--------------------------------------------------------------------
 # Setup the library combination
 #--------------------------------------------------------------------
-targetArgument=${target}
+
+#--------------------------------------------------------------------
+# Check if objc should use garbage collection.
+#--------------------------------------------------------------------
+# Check whether --enable-objc-garbage-collection was given.
+if test "${enable_objc_garbage_collection+set}" = set; then :
+  enableval=$enable_objc_garbage_collection; OBJC_WITH_GC=$enableval
+else
+  OBJC_WITH_GC=""
+fi
+
+
+if test "$OBJC_WITH_GC" = "yes"; then
+  ac_cv_library_combo="gnugc-gnu-gnu"
+elif test "$OBJC_WITH_GC" = "no"; then
+  if test "$ac_cv_library_combo"="gnugc-gnu-gnu"; then
+    ac_cv_library_combo="gnu-gnu-gnu"
+  fi
+else
+  OBJC_WITH_GC=no
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library combo" >&5
+$as_echo_n "checking for library combo... " >&6; }
+
+# Check whether --with-library-combo was given.
+if test "${with_library_combo+set}" = set; then :
+  withval=$with_library_combo; ac_cv_library_combo=$withval
+else
+  ac_cv_library_combo=$ac_cv_library_combo
+
+fi
+
+
+if test "$ac_cv_library_combo" = "" -o "$ac_cv_library_combo" = "no"; then
+  case "$host_os" in
+    darwin*)   ac_cv_library_combo=apple-apple-apple ;;
+    nextstep4) ac_cv_library_combo=nx-nx-nx          ;;
+    openstep4) ac_cv_library_combo=nx-nx-nx          ;;
+    *)         ac_cv_library_combo=gnu-gnu-gnu       ;;
+  esac
+fi
+
+case "$ac_cv_library_combo" in
+  apple) ac_cv_library_combo=apple-apple-apple ;;
+  gnu)   ac_cv_library_combo=gnu-gnu-gnu ;;
+  ng)    ac_cv_library_combo=ng-gnu-gnu ;;
+  nx)    ac_cv_library_combo=nx-nx-nx ;;
+esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_library_combo" >&5
+$as_echo "$ac_cv_library_combo" >&6; }
+
+OBJC_RUNTIME_LIB=`echo $ac_cv_library_combo | awk -F- '{print $1}'`
+
+# The ng runtime library setting requires clang rather than gcc
+if test "$OBJC_RUNTIME_LIB" = "ng"; then
+  if test "$OBJCC" = ""; then
+    OBJCC=clang
+  fi
+  if test "$CC" = ""; then
+    CC=clang
+  fi
+  if test "$OBJCXX" = ""; then
+    OBJCXX=clang++
+  fi
+  if test "$CXX" = ""; then
+    CXX=clang++
+  fi
+fi
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3747,63 +3821,6 @@
   test "$program_prefix$program_suffix$program_transform_name" = \
     NONENONEs,x,x, &&
   program_prefix=${target_alias}-
-
-
-#--------------------------------------------------------------------
-# Check if objc should use garbage collection.
-#--------------------------------------------------------------------
-# Check whether --enable-objc-garbage-collection was given.
-if test "${enable_objc_garbage_collection+set}" = set; then :
-  enableval=$enable_objc_garbage_collection; OBJC_WITH_GC=$enableval
-else
-  OBJC_WITH_GC=""
-fi
-
-
-if test "$OBJC_WITH_GC" = "yes"; then
-  ac_cv_library_combo="gnugc-gnu-gnu"
-elif test "$OBJC_WITH_GC" = "no"; then
-  if test "$ac_cv_library_combo"="gnugc-gnu-gnu"; then
-    ac_cv_library_combo="gnu-gnu-gnu"
-  fi
-else
-  OBJC_WITH_GC=no
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library combo" >&5
-$as_echo_n "checking for library combo... " >&6; }
-
-# Check whether --with-library-combo was given.
-if test "${with_library_combo+set}" = set; then :
-  withval=$with_library_combo; ac_cv_library_combo=$withval
-else
-  ac_cv_library_combo=$ac_cv_library_combo
-
-fi
-
-
-if test "$ac_cv_library_combo" = "" -o "$ac_cv_library_combo" = "no"; then
-  case "$host_os" in
-    darwin*)   ac_cv_library_combo=apple-apple-apple ;;
-    nextstep4) ac_cv_library_combo=nx-nx-nx          ;;
-    openstep4) ac_cv_library_combo=nx-nx-nx          ;;
-    *)         ac_cv_library_combo=gnu-gnu-gnu       ;;
-  esac
-fi
-
-case "$ac_cv_library_combo" in
-  apple) ac_cv_library_combo=apple-apple-apple ;;
-  gnu)   ac_cv_library_combo=gnu-gnu-gnu ;;
-  ng)    ac_cv_library_combo=ng-gnu-gnu ;;
-  nx)    ac_cv_library_combo=nx-nx-nx ;;
-esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_library_combo" >&5
-$as_echo "$ac_cv_library_combo" >&6; }
-
-OBJC_RUNTIME_LIB=`echo $ac_cv_library_combo | awk -F- '{print $1}'`
 
 #--------------------------------------------------------------------
 # Check if we are using Apple cc

Modified: tools/make/trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/gnustep/tools/make/trunk/configure.ac?rev=39439&r1=39438&r2=39439&view=diff
==============================================================================
--- tools/make/trunk/configure.ac       (original)
+++ tools/make/trunk/configure.ac       Wed Mar  2 13:05:34 2016
@@ -39,29 +39,11 @@
 # have an Objective-C runtime available yet.
 #
 
+targetArgument=${target}
+
 #--------------------------------------------------------------------
 # Setup the library combination
 #--------------------------------------------------------------------
-targetArgument=${target}
-AC_PROG_CC
-AC_PROG_CPP
-
-# We also look for a C++ compiler.  While not strictly needed, some
-# people use gnustep-make to compile C++ code.  It's nice to detect a
-# C++ compiler, if we have one, and automatically use it to
-# compile/link C++ code. :-)
-AC_PROG_CXX
-
-# Similarly for the ObjC++ compiler ... but only new versions of autoconf
-# support it, so we pretend by using the C++ compiler
-#AC_PROG_OBJCXX
-OBJCXX="${CXX}"
-
-# We may use egrep for some tests further down below
-AC_PROG_EGREP
-
-AC_CANONICAL_TARGET([])
-
 
 #--------------------------------------------------------------------
 # Check if objc should use garbage collection.
@@ -132,6 +114,41 @@
 AC_MSG_RESULT($ac_cv_library_combo)
 
 OBJC_RUNTIME_LIB=`echo $ac_cv_library_combo | awk -F- '{print $1}'`
+
+# The ng runtime library setting requires clang rather than gcc
+if test "$OBJC_RUNTIME_LIB" = "ng"; then
+  if test "$OBJCC" = ""; then
+    OBJCC=clang
+  fi
+  if test "$CC" = ""; then
+    CC=clang
+  fi
+  if test "$OBJCXX" = ""; then
+    OBJCXX=clang++
+  fi
+  if test "$CXX" = ""; then
+    CXX=clang++
+  fi
+fi
+
+AC_PROG_CC
+AC_PROG_CPP
+
+# We also look for a C++ compiler.  While not strictly needed, some
+# people use gnustep-make to compile C++ code.  It's nice to detect a
+# C++ compiler, if we have one, and automatically use it to
+# compile/link C++ code. :-)
+AC_PROG_CXX
+
+# Similarly for the ObjC++ compiler ... but only new versions of autoconf
+# support it, so we pretend by using the C++ compiler
+#AC_PROG_OBJCXX
+OBJCXX="${CXX}"
+
+# We may use egrep for some tests further down below
+AC_PROG_EGREP
+
+AC_CANONICAL_TARGET([])
 
 #--------------------------------------------------------------------
 # Check if we are using Apple cc

Modified: tools/make/trunk/library-combo.make
URL: 
http://svn.gna.org/viewcvs/gnustep/tools/make/trunk/library-combo.make?rev=39439&r1=39438&r2=39439&view=diff
==============================================================================
--- tools/make/trunk/library-combo.make (original)
+++ tools/make/trunk/library-combo.make Wed Mar  2 13:05:34 2016
@@ -110,6 +110,15 @@
   OBJC_LIBS = $(OBJC_LIB_FLAG) -fobjc-nonfragile-abi
   RUNTIME_FLAG = -fobjc-runtime=gnustep-1.8 -fblocks -fno-objc-legacy-dispatch
   RUNTIME_DEFINE = -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1
+  # By default we enable ARC for ng code, but projects may disable it
+  # by defining GS_WITH_ARC=0 at the start of their GNUmakefile
+  ifeq ($(GS_WITH_ARC),)
+    GS_WITH_ARC = 1
+  endif
+  ifeq ($(GS_WITH_ARC), 1)
+    RUNTIME_FLAG += -fobjc-arc
+    RUNTIME_DEFINE += -DGS_WITH_ARC=1
+  endif
 endif
 
 ifeq ($(OBJC_RUNTIME_LIB), gnugc)
@@ -118,7 +127,7 @@
   OBJC_LIBS = $(OBJC_LIB_FLAG) -ldl -lgc
   RUNTIME_FLAG   = -fgnu-runtime
   RUNTIME_DEFINE = -DGNU_RUNTIME=1 -DGS_WITH_GC=1
-  ifeq ($(debug),yes)
+  ifeq ($(debug), yes)
     RUNTIME_DEFINE += -DGC_DEBUG
   endif
 endif
@@ -146,7 +155,7 @@
 #
 # Set the appropriate Foundation library
 #
-ifeq ($(FOUNDATION_LIB),gnu)
+ifeq ($(FOUNDATION_LIB), gnu)
   FOUNDATION_LIBRARY_NAME   = gnustep-base
   FOUNDATION_LIBRARY_DEFINE = -DGNUSTEP_BASE_LIBRARY=1
 endif
@@ -180,7 +189,7 @@
 # FIXME - Ask Helge to move this inside his libFoundation, and have 
 # it installed as a $(GNUSTEP_MAKEFILES)/Additional/libFoundation.make
 #
-ifeq ($(FOUNDATION_LIB),fd)
+ifeq ($(FOUNDATION_LIB), fd)
   -include $(GNUSTEP_MAKEFILES)/libFoundation.make
 
   FND_DEFINE = -DLIB_FOUNDATION_LIBRARY=1


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to