mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 17:10:48 +00:00
experimental configure option
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29994 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3c17e185e9
commit
7c3da88196
5 changed files with 111 additions and 39 deletions
18
ChangeLog
18
ChangeLog
|
@ -1,11 +1,21 @@
|
|||
2010-03-17 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* configure:
|
||||
* configure.ac:
|
||||
* Headers/Additions/GNUstepBase/GSConfig.h.in:
|
||||
* Headers/Additions/GNUstepBase/GSVersionMacros.h:
|
||||
Add experimental --enable-mixedabi configure option for building
|
||||
with the nonfragile abi, but able to link with other code which
|
||||
is built with the fragile abi.
|
||||
|
||||
2010-03-17 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSConnection.m: Fix for memory leak ... autorelease
|
||||
objects returned by method in remote process because the invocation
|
||||
won't do it for us (we call -setReturnValue: which will have the invocation
|
||||
retain the object, so when it releases it again later the retain count is
|
||||
the same as at the point when we decoded the object, and another release
|
||||
is needed).
|
||||
won't do it for us (we call -setReturnValue: which will have the
|
||||
invocation retain the object, so when it releases it again later
|
||||
the retain count is the same as at the point when we decoded the
|
||||
object, and another release is needed).
|
||||
I'm not certain this fix is right, but it seems ok.
|
||||
|
||||
2010-03-13 Yavor Doganov <yavor@gnu.org> (tiny change)
|
||||
|
|
|
@ -221,6 +221,7 @@ typedef struct {
|
|||
#define OBJC2RUNTIME @OBJC2RUNTIME@
|
||||
#define BASE_NATIVE_OBJC_EXCEPTIONS @BASE_NATIVE_OBJC_EXCEPTIONS@
|
||||
#define GS_NONFRAGILE @GS_NONFRAGILE@
|
||||
#define GS_MIXEDABI @GS_MIXEDABI@
|
||||
|
||||
#import <GNUstepBase/preface.h>
|
||||
|
||||
|
|
|
@ -193,6 +193,10 @@
|
|||
#import <GNUstepBase/GSConfig.h>
|
||||
#endif
|
||||
|
||||
#ifndef __has_feature
|
||||
#define __has_feature(x) 0
|
||||
#endif
|
||||
|
||||
/* The following is for deciding whether private instance variables
|
||||
* should be visible ... if we are building with a compiler which
|
||||
* does not define __has_feature then we know we don't have non-fragile
|
||||
|
@ -204,18 +208,20 @@
|
|||
* before including the header, so that the ivars are always available
|
||||
* in the class source itsself
|
||||
*/
|
||||
#ifndef __has_feature
|
||||
#define __has_feature(x) 0
|
||||
#endif
|
||||
|
||||
#if (__has_feature(objc_nonfragile_abi) || __has_feature(objc_nonfragile_abi2))
|
||||
#if !GS_NONFRAGILE
|
||||
#error "You are now using the objc-nonfragile-abi but your gnustep-base was not configured to use it."
|
||||
#endif
|
||||
#if GS_MIXEDABI
|
||||
# undef GS_NONFRAGILE
|
||||
# define GS_NONFRAGILE 0 /* Mixed is treated as fragile */
|
||||
#else
|
||||
#if GS_NONFRAGILE
|
||||
#error "Your gnustep-base was configured for the objc-nonfragile-abi but you are not using it now."
|
||||
#endif
|
||||
# if (__has_feature(objc_nonfragile_abi)||__has_feature(objc_nonfragile_abi2))
|
||||
# if !GS_NONFRAGILE
|
||||
# error "You are now using the objc-nonfragile-abi but your gnustep-base was not configured to use it."
|
||||
# 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
|
||||
|
||||
#define GS_EXPOSE(X) (!GS_NONFRAGILE || defined(EXPOSE_##X##_IVARS))
|
||||
|
|
56
configure
vendored
56
configure
vendored
|
@ -651,6 +651,7 @@ build_alias
|
|||
host_alias
|
||||
target_alias
|
||||
BASE_NATIVE_OBJC_EXCEPTIONS
|
||||
BASE_NONFRAGILE_ABI
|
||||
build
|
||||
build_cpu
|
||||
build_vendor
|
||||
|
@ -709,6 +710,7 @@ NX_CONST_STRING_CLASS
|
|||
OBJC2RUNTIME
|
||||
OBJCFLAGS
|
||||
GS_NONFRAGILE
|
||||
GS_MIXEDABI
|
||||
HAVE_OBJC_SYNC_ENTER
|
||||
GS_SIZEOF_MUTEX_T
|
||||
GS_SIZEOF_COND_T
|
||||
|
@ -1336,6 +1338,10 @@ if test -n "$ac_init_help"; then
|
|||
Optional Features:
|
||||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||
--enable-mixedabi
|
||||
Enables the use both fragile and nonfragile ABI (base built using
|
||||
the nonfragile ABI, but in a way permitting linking with other
|
||||
modules built using the fragile ABI.
|
||||
--enable-bfd
|
||||
Enables the use of libbfd to provide symbolic stack traces.
|
||||
Enabling this option provides support for symbolic stack traces
|
||||
|
@ -1889,6 +1895,16 @@ else
|
|||
fi
|
||||
|
||||
|
||||
nonfragile=`gnustep-config --objc-flags | grep _NONFRAGILE_ABI 2>&5`
|
||||
if test -z "$nonfragile"; then
|
||||
nonfragile=no
|
||||
BASE_NONFRAGILE_ABI=0
|
||||
else
|
||||
nonfragile=yes
|
||||
BASE_NONFRAGILE_ABI=1
|
||||
fi
|
||||
|
||||
|
||||
if test -z "$GNUSTEP_MAKEFILES"; then
|
||||
{ { echo "$as_me:$LINENO: error: You must have the gnustep-make package installed and set up the GNUSTEP_MAKEFILES environment variable to contain the path to the makefiles directory before configuring!" >&5
|
||||
echo "$as_me: error: You must have the gnustep-make package installed and set up the GNUSTEP_MAKEFILES environment variable to contain the path to the makefiles directory before configuring!" >&2;}
|
||||
|
@ -9282,11 +9298,14 @@ else
|
|||
fi
|
||||
|
||||
|
||||
saved_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $OBJCFLAGS -fobjc-nonfragile-abi -x objective-c"
|
||||
{ echo "$as_me:$LINENO: checking for non-fragile-abi support" >&5
|
||||
GS_NONFRAGILE=0
|
||||
GS_MIXEDABI=0
|
||||
if test "$nonfragile" = "yes"; then
|
||||
saved_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $OBJCFLAGS -fobjc-nonfragile-abi -x objective-c"
|
||||
{ echo "$as_me:$LINENO: checking for non-fragile-abi support" >&5
|
||||
echo $ECHO_N "checking for non-fragile-abi support... $ECHO_C" >&6; }
|
||||
if test "$cross_compiling" = yes; then
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: cannot run test program while cross compiling
|
||||
|
@ -9329,17 +9348,28 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$a
|
|||
fi
|
||||
|
||||
|
||||
CPPFLAGS="$saved_CPPFLAGS"
|
||||
if test $non_fragile = yes; then
|
||||
OBJCFLAGS="$OBJCFLAGS -fobjc-nonfragile-abi"
|
||||
CPPFLAGS="$saved_CPPFLAGS"
|
||||
if test $non_fragile = yes; then
|
||||
OBJCFLAGS="$OBJCFLAGS -fobjc-nonfragile-abi"
|
||||
|
||||
GS_NONFRAGILE=1
|
||||
GS_NONFRAGILE=1
|
||||
# Check whether --enable-mixedabi was given.
|
||||
if test "${enable_mixedabi+set}" = set; then
|
||||
enableval=$enable_mixedabi;
|
||||
else
|
||||
GS_NONFRAGILE=0
|
||||
enable_mixedabi=$PASS_ARG
|
||||
fi
|
||||
|
||||
{ echo "$as_me:$LINENO: result: $non_fragile" >&5
|
||||
if test $enable_mixedabi = yes; then
|
||||
GS_MIXEDABI=1
|
||||
fi
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $non_fragile" >&5
|
||||
echo "${ECHO_T}$non_fragile" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# Don't revert any Objective-C flags as they are used in the next test
|
||||
|
||||
|
@ -21942,6 +21972,7 @@ build_alias!$build_alias$ac_delim
|
|||
host_alias!$host_alias$ac_delim
|
||||
target_alias!$target_alias$ac_delim
|
||||
BASE_NATIVE_OBJC_EXCEPTIONS!$BASE_NATIVE_OBJC_EXCEPTIONS$ac_delim
|
||||
BASE_NONFRAGILE_ABI!$BASE_NONFRAGILE_ABI$ac_delim
|
||||
build!$build$ac_delim
|
||||
build_cpu!$build_cpu$ac_delim
|
||||
build_vendor!$build_vendor$ac_delim
|
||||
|
@ -22000,7 +22031,6 @@ NX_CONST_STRING_CLASS!$NX_CONST_STRING_CLASS$ac_delim
|
|||
OBJC2RUNTIME!$OBJC2RUNTIME$ac_delim
|
||||
OBJCFLAGS!$OBJCFLAGS$ac_delim
|
||||
GS_NONFRAGILE!$GS_NONFRAGILE$ac_delim
|
||||
HAVE_OBJC_SYNC_ENTER!$HAVE_OBJC_SYNC_ENTER$ac_delim
|
||||
_ACEOF
|
||||
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
|
||||
|
@ -22042,6 +22072,8 @@ _ACEOF
|
|||
ac_delim='%!_!# '
|
||||
for ac_last_try in false false false false false :; do
|
||||
cat >conf$$subs.sed <<_ACEOF
|
||||
GS_MIXEDABI!$GS_MIXEDABI$ac_delim
|
||||
HAVE_OBJC_SYNC_ENTER!$HAVE_OBJC_SYNC_ENTER$ac_delim
|
||||
GS_SIZEOF_MUTEX_T!$GS_SIZEOF_MUTEX_T$ac_delim
|
||||
GS_SIZEOF_COND_T!$GS_SIZEOF_COND_T$ac_delim
|
||||
HAVE_PTS_STREAM_MODULES!$HAVE_PTS_STREAM_MODULES$ac_delim
|
||||
|
@ -22087,7 +22119,7 @@ LIBOBJS!$LIBOBJS$ac_delim
|
|||
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
||||
_ACEOF
|
||||
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 43; then
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 45; then
|
||||
break
|
||||
elif $ac_last_try; then
|
||||
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
||||
|
|
49
configure.ac
49
configure.ac
|
@ -54,6 +54,16 @@ else
|
|||
fi
|
||||
AC_SUBST(BASE_NATIVE_OBJC_EXCEPTIONS)
|
||||
|
||||
nonfragile=`gnustep-config --objc-flags | grep _NONFRAGILE_ABI 2>&5`
|
||||
if test -z "$nonfragile"; then
|
||||
nonfragile=no
|
||||
BASE_NONFRAGILE_ABI=0
|
||||
else
|
||||
nonfragile=yes
|
||||
BASE_NONFRAGILE_ABI=1
|
||||
fi
|
||||
AC_SUBST(BASE_NONFRAGILE_ABI)
|
||||
|
||||
if test -z "$GNUSTEP_MAKEFILES"; then
|
||||
AC_MSG_ERROR([You must have the gnustep-make package installed and set up the GNUSTEP_MAKEFILES environment variable to contain the path to the makefiles directory before configuring!])
|
||||
fi
|
||||
|
@ -672,21 +682,34 @@ else
|
|||
fi
|
||||
AC_SUBST(OBJC2RUNTIME)
|
||||
|
||||
saved_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $OBJCFLAGS -fobjc-nonfragile-abi -x objective-c"
|
||||
AC_MSG_CHECKING(for non-fragile-abi support)
|
||||
AC_RUN_IFELSE([#include "$srcdir/config/config.non-fragile-ivars.m"],
|
||||
non_fragile=yes, non_fragile=no)
|
||||
CPPFLAGS="$saved_CPPFLAGS"
|
||||
if test $non_fragile = yes; then
|
||||
OBJCFLAGS="$OBJCFLAGS -fobjc-nonfragile-abi"
|
||||
AC_SUBST(OBJCFLAGS)
|
||||
GS_NONFRAGILE=1
|
||||
else
|
||||
GS_NONFRAGILE=0
|
||||
GS_NONFRAGILE=0
|
||||
GS_MIXEDABI=0
|
||||
if test "$nonfragile" = "yes"; then
|
||||
saved_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $OBJCFLAGS -fobjc-nonfragile-abi -x objective-c"
|
||||
AC_MSG_CHECKING(for non-fragile-abi support)
|
||||
AC_RUN_IFELSE([#include "$srcdir/config/config.non-fragile-ivars.m"],
|
||||
non_fragile=yes, non_fragile=no)
|
||||
CPPFLAGS="$saved_CPPFLAGS"
|
||||
if test $non_fragile = yes; then
|
||||
OBJCFLAGS="$OBJCFLAGS -fobjc-nonfragile-abi"
|
||||
AC_SUBST(OBJCFLAGS)
|
||||
GS_NONFRAGILE=1
|
||||
AC_ARG_ENABLE(mixedabi,
|
||||
[ --enable-mixedabi
|
||||
Enables the use both fragile and nonfragile ABI (base built using
|
||||
the nonfragile ABI, but in a way permitting linking with other
|
||||
modules built using the fragile ABI.],,
|
||||
enable_mixedabi=$PASS_ARG)
|
||||
if test $enable_mixedabi = yes; then
|
||||
GS_MIXEDABI=1
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT($non_fragile)
|
||||
fi
|
||||
AC_SUBST(GS_NONFRAGILE)
|
||||
AC_MSG_RESULT($non_fragile)
|
||||
AC_SUBST(GS_MIXEDABI)
|
||||
|
||||
|
||||
# Don't revert any Objective-C flags as they are used in the next test
|
||||
|
||||
|
|
Loading…
Reference in a new issue