mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Bump Objective-C runtime version and add installation instructions
This commit is contained in:
parent
e480e8b3bc
commit
4df1b96ebb
5 changed files with 32 additions and 8 deletions
26
INSTALL
26
INSTALL
|
@ -20,7 +20,10 @@ particular operating system and CPU. These instructions come with the
|
|||
GNUstep-HOWTO and are also located at the GNUstep web site at
|
||||
<http://www.gnustep.org>.
|
||||
|
||||
Quick installation instructions:
|
||||
1.1.1 Quick Installation Instructions
|
||||
---------------------
|
||||
|
||||
To build and install the GNUstep Makefiles, run the following commands:
|
||||
|
||||
./configure
|
||||
make
|
||||
|
@ -44,6 +47,27 @@ filesystem layout).
|
|||
make
|
||||
make install
|
||||
|
||||
1.1.2 Enabling Modern Objective-C Features
|
||||
---------------------
|
||||
|
||||
GNUstep supports the legacy GCC runtime, and the modern libobjc2 runtime with
|
||||
Objective-C 2.0 Features such as ARC, Blocks (closures), Synthesised property
|
||||
accessors, Efficient support for @synchronized() and more.
|
||||
|
||||
libobjc2 requires building with clang. If you've installed both clang and libobjc2
|
||||
you can configure GNUstep Make to use the newer runtime and features.
|
||||
Here is an example with the runtime version set to 2.2.
|
||||
(Set it to the last libobjc2 version to benefit from possible changes in Clang CodeGen).
|
||||
Please note that we explicitly enable some features such as objc-arc that might
|
||||
be infered from the runtime version.
|
||||
|
||||
./configure
|
||||
--enable-native-objc-exceptions \
|
||||
--enable-objc-arc \
|
||||
--with-runtime-abi=gnustep-2.2 \
|
||||
--with-library-combo=ng-gnu-gnu \
|
||||
CC="clang" CXX="clang++" CPP="clang -E" LDFLAGS="-fuse-ld=lld"
|
||||
|
||||
1.2 Configuration
|
||||
=================
|
||||
|
||||
|
|
|
@ -1298,7 +1298,7 @@ if test x"$USE_ARC" = x"yes"; then
|
|||
# What we want to do: set USE_ARC to yes if we can compile
|
||||
# something with -fobjc-arc.
|
||||
CFLAGS_no_arc="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -fobjc-runtime=gnustep-1.8 -fobjc-arc"
|
||||
CFLAGS="$CFLAGS -fobjc-runtime=gnustep-2.2 -fobjc-arc"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
/* Note that we never execute this code so it does not really matter
|
||||
what it is. We are testing that the compiler accepts the
|
||||
|
|
|
@ -47,7 +47,7 @@ ifeq ($(OBJC_RUNTIME_LIB), ng)
|
|||
ifneq ($(DEFAULT_OBJC_RUNTIME_ABI),)
|
||||
RUNTIME_VERSION=$(DEFAULT_OBJC_RUNTIME_ABI)
|
||||
else
|
||||
RUNTIME_VERSION=gnustep-1.8
|
||||
RUNTIME_VERSION=gnustep-2.2
|
||||
endif
|
||||
endif
|
||||
RUNTIME_FLAG = -fobjc-runtime=$(RUNTIME_VERSION) -fblocks
|
||||
|
|
|
@ -254,7 +254,7 @@ AC_DEFUN([GS_CHECK_OBJC_RUNTIME], [
|
|||
])
|
||||
|
||||
|
||||
# Helper macro for checking gnustep-2.0 ABI support in libobjc via the __objc_load macro
|
||||
# Helper macro for checking gnustep-2.x ABI support in libobjc via the __objc_load macro
|
||||
AC_DEFUN([_GS_HAVE_OBJC_LOAD], [
|
||||
AC_REQUIRE([GS_CHECK_OBJC_RUNTIME])
|
||||
AC_CHECK_FUNC([__objc_load])
|
||||
|
@ -266,11 +266,11 @@ AC_DEFUN([_GS_HAVE_OBJC_LOAD], [
|
|||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Checks for support for the gnustep-2.0 ABI in the runtime library. Sets the `libobjc_SUPPORTS_ABI20' variable.
|
||||
# Checks for support for the gnustep-2.x ABI in the runtime library. Sets the `libobjc_SUPPORTS_ABI20' variable.
|
||||
AC_DEFUN([GS_CHECK_RUNTIME_ABI20_SUPPORT], [
|
||||
AC_REQUIRE([GS_CHECK_OBJC_RUNTIME])
|
||||
AC_REQUIRE([_GS_HAVE_OBJC_LOAD])
|
||||
AC_CACHE_CHECK([whether runtime library supports the gnustep-2.0 ABI],
|
||||
AC_CACHE_CHECK([whether runtime library supports the gnustep-2.x ABI],
|
||||
[gs_cv_libobjc_abi_20], [
|
||||
if test x"$libobjc_SUPPORTS_ABI20" = x""; then
|
||||
gs_cv_libobjc_abi_20=$ac_cv_func___objc_load
|
||||
|
|
|
@ -13,13 +13,13 @@ AC_DEFUN([GS_RUNTIME_ABI],dnl
|
|||
AC_REQUIRE([GS_CHECK_GCC_VERSION])
|
||||
case "$OBJC_RUNTIME_LIB" in
|
||||
gnu) default_runtime_abi=gcc ;;
|
||||
ng) default_runtime_abi=gnustep-1.8 ;;
|
||||
ng) default_runtime_abi=gnustep-2.2 ;;
|
||||
*) default_runtime_abi="(unknown)" ;;
|
||||
esac
|
||||
if test ! x"$1" = x""; then
|
||||
default_runtime_abi="$1"
|
||||
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
|
||||
default_runtime_abi=gnustep-2.0
|
||||
default_runtime_abi=gnustep-2.2
|
||||
fi
|
||||
AC_ARG_WITH([runtime-abi],
|
||||
[AS_HELP_STRING([--with-runtime-abi], [
|
||||
|
|
Loading…
Reference in a new issue