Added -fexceptions on compile and link command-line when using ObjC exceptions

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@24873 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2007-03-15 10:05:53 +00:00
parent ba38bbaa97
commit 4728d08c98
4 changed files with 23 additions and 3 deletions

View file

@ -1,3 +1,12 @@
2007-03-15 Nicola Pero <nicola.pero@meta-innovation.com>
* configure.ac: Added -fexceptions as well when trying the
ObjC exception test program. Restore CFLAGS and LIBS after
the ObjC exception test.
* configure: Regenerated.
* common.make (OBJCFLAGS, INTERNAL_LDFLAGS): Add -fexceptions when
ObjC exceptions are enabled.
2007-03-13 Nicola Pero <nicola.pero@meta-innovation.com>
* Instance/framework.make (CURRENT_VERSION_NAME): If no

View file

@ -517,7 +517,8 @@ CFLAGS =
# If the compiler supports native ObjC exceptions and the user wants us to
# use them, turn them on!
ifeq ($(USE_OBJC_EXCEPTIONS), yes)
OBJCFLAGS += -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS
OBJCFLAGS += -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS
INTERNAL_LDFLAGS += -fexceptions
endif
#

7
configure vendored
View file

@ -4555,7 +4555,10 @@ if test x"$USE_OBJC_EXCEPTIONS" = x"yes"; then
echo "$as_me:$LINENO: result: no: compiler isn't gcc" >&5
echo "${ECHO_T}no: compiler isn't gcc" >&6
else
CFLAGS="$CFLAGS -fobjc-exceptions"
CFLAGS_no_exceptions="$CFLAGS"
LIBS_no_exceptions="$LIBS"
CFLAGS="$CFLAGS -fexceptions -fobjc-exceptions"
LIBS="$LIBS -fexceptions"
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
@ -4609,6 +4612,8 @@ rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftes
fi
echo "$as_me:$LINENO: result: $USE_OBJC_EXCEPTIONS" >&5
echo "${ECHO_T}$USE_OBJC_EXCEPTIONS" >&6
CFLAGS="$CFLAGS_no_exceptions"
LIBS="$LIBS_no_exceptions"
fi
if test x$USE_OBJC_EXCEPTIONS = xno; then
{ echo "$as_me:$LINENO: Native objective-c exceptions were requested, but the compiler" >&5

View file

@ -1053,7 +1053,10 @@ if test x"$USE_OBJC_EXCEPTIONS" = x"yes"; then
USE_OBJC_EXCEPTIONS=no
AC_MSG_RESULT(no: compiler isn't gcc)
else
CFLAGS="$CFLAGS -fobjc-exceptions"
CFLAGS_no_exceptions="$CFLAGS"
LIBS_no_exceptions="$LIBS"
CFLAGS="$CFLAGS -fexceptions -fobjc-exceptions"
LIBS="$LIBS -fexceptions"
AC_RUN_IFELSE([[
#include <stdlib.h>
#include <objc/Object.h>
@ -1075,6 +1078,8 @@ int main(int argc, char **argv)
}
]], USE_OBJC_EXCEPTIONS=yes, USE_OBJC_EXCEPTIONS=no)
AC_MSG_RESULT($USE_OBJC_EXCEPTIONS)
CFLAGS="$CFLAGS_no_exceptions"
LIBS="$LIBS_no_exceptions"
fi
if test x$USE_OBJC_EXCEPTIONS = xno; then
AC_MSG_NOTICE([Native objective-c exceptions were requested, but the compiler])