Skip to content

Commit c2a7753

Browse files
committed
Bump Objective-C runtime version and add installation instructions
1 parent e480e8b commit c2a7753

File tree

5 files changed

+32
-8
lines changed

5 files changed

+32
-8
lines changed

INSTALL

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ particular operating system and CPU. These instructions come with the
2020
GNUstep-HOWTO and are also located at the GNUstep web site at
2121
<http://www.gnustep.org>.
2222

23-
Quick installation instructions:
23+
1.1.1 Quick Installation Instructions
24+
---------------------
25+
26+
To build and install the GNUstep Makefiles, run the following commands:
2427

2528
./configure
2629
make
@@ -44,6 +47,27 @@ filesystem layout).
4447
make
4548
make install
4649

50+
1.1.2 Enabling Modern Objective-C Features
51+
---------------------
52+
53+
GNUstep supports the legacy GCC runtime, and the modern libobjc2 runtime with
54+
Objective-C 2.0 Features such as ARC, Blocks (closures), Synthesised property
55+
accessors, Efficient support for @synchronized() and more.
56+
57+
libobjc2 requires building with clang. If you've installed both clang and libobjc2
58+
you can configure GNUstep Make to use the newer runtime and features.
59+
Here is an example with the runtime version set to 2.2.
60+
(Set it to the last libobjc2 version to benefit from possible changes in Clang CodeGen).
61+
Please note that we explicitly enable some features such as objc-arc that might
62+
be infered from the runtime version.
63+
64+
./configure
65+
--enable-native-objc-exceptions \
66+
--enable-objc-arc \
67+
--with-runtime-abi=gnustep-2.2 \
68+
--with-library-combo=ng-gnu-gnu \
69+
CC="clang" CXX="clang++" CPP="clang -E" LDFLAGS="-fuse-ld=lld"
70+
4771
1.2 Configuration
4872
=================
4973

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ if test x"$USE_ARC" = x"yes"; then
12981298
# What we want to do: set USE_ARC to yes if we can compile
12991299
# something with -fobjc-arc.
13001300
CFLAGS_no_arc="$CFLAGS"
1301-
CFLAGS="$CFLAGS -fobjc-runtime=gnustep-1.8 -fobjc-arc"
1301+
CFLAGS="$CFLAGS -fobjc-runtime=gnustep-2.2 -fobjc-arc"
13021302
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
13031303
/* Note that we never execute this code so it does not really matter
13041304
what it is. We are testing that the compiler accepts the

library-combo.make

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ ifeq ($(OBJC_RUNTIME_LIB), ng)
4747
ifneq ($(DEFAULT_OBJC_RUNTIME_ABI),)
4848
RUNTIME_VERSION=$(DEFAULT_OBJC_RUNTIME_ABI)
4949
else
50-
RUNTIME_VERSION=gnustep-1.8
50+
RUNTIME_VERSION=gnustep-2.2
5151
endif
5252
endif
5353
RUNTIME_FLAG = -fobjc-runtime=$(RUNTIME_VERSION) -fblocks

m4/gs_objc_runtime.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ AC_DEFUN([GS_CHECK_OBJC_RUNTIME], [
254254
])
255255

256256

257-
# Helper macro for checking gnustep-2.0 ABI support in libobjc via the __objc_load macro
257+
# Helper macro for checking gnustep-2.x ABI support in libobjc via the __objc_load macro
258258
AC_DEFUN([_GS_HAVE_OBJC_LOAD], [
259259
AC_REQUIRE([GS_CHECK_OBJC_RUNTIME])
260260
AC_CHECK_FUNC([__objc_load])
@@ -266,11 +266,11 @@ AC_DEFUN([_GS_HAVE_OBJC_LOAD], [
266266
#
267267
# DESCRIPTION
268268
#
269-
# Checks for support for the gnustep-2.0 ABI in the runtime library. Sets the `libobjc_SUPPORTS_ABI20' variable.
269+
# Checks for support for the gnustep-2.x ABI in the runtime library. Sets the `libobjc_SUPPORTS_ABI20' variable.
270270
AC_DEFUN([GS_CHECK_RUNTIME_ABI20_SUPPORT], [
271271
AC_REQUIRE([GS_CHECK_OBJC_RUNTIME])
272272
AC_REQUIRE([_GS_HAVE_OBJC_LOAD])
273-
AC_CACHE_CHECK([whether runtime library supports the gnustep-2.0 ABI],
273+
AC_CACHE_CHECK([whether runtime library supports the gnustep-2.x ABI],
274274
[gs_cv_libobjc_abi_20], [
275275
if test x"$libobjc_SUPPORTS_ABI20" = x""; then
276276
gs_cv_libobjc_abi_20=$ac_cv_func___objc_load

m4/gs_runtime_abi.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ AC_DEFUN([GS_RUNTIME_ABI],dnl
1313
AC_REQUIRE([GS_CHECK_GCC_VERSION])
1414
case "$OBJC_RUNTIME_LIB" in
1515
gnu) default_runtime_abi=gcc ;;
16-
ng) default_runtime_abi=gnustep-1.8 ;;
16+
ng) default_runtime_abi=gnustep-2.2 ;;
1717
*) default_runtime_abi="(unknown)" ;;
1818
esac
1919
if test ! x"$1" = x""; then
2020
default_runtime_abi="$1"
2121
elif test x"$OBJC_RUNTIME_LIB" = x"ng" -a x"$libobjc_SUPPORTS_ABI20" = x"yes" -a x"$CLANG_CC" = x"yes" -a "${gs_cv_gcc_major_version}" -ge "8"; then
22-
default_runtime_abi=gnustep-2.0
22+
default_runtime_abi=gnustep-2.2
2323
fi
2424
AC_ARG_WITH([runtime-abi],
2525
[AS_HELP_STRING([--with-runtime-abi], [

0 commit comments

Comments
 (0)