mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Use AC_COMPILE_IFELSE, not AC_RUN_IFELSE, when checking for -fobjc-nonfragile-abi
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@32818 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
94dd631867
commit
8fe523795e
3 changed files with 29 additions and 21 deletions
|
@ -1,8 +1,14 @@
|
|||
2011-04-09 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* configure.ac: Use AC_COMPILE_IFELSE instead of AC_TRY_IFELSE
|
||||
when checking for -fobjc-nonfragile-abi support in the compiler.
|
||||
* configure: Updated.
|
||||
|
||||
2011-04-09 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* configure.ac: Use AC_COMPILE_IFELSE instead of AC_TRY_IFELSE
|
||||
when checking for ObjC++ support in the compiler.
|
||||
* configure: Updated comments.
|
||||
* configure: Updated.
|
||||
|
||||
2011-04-09 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
|
|
33
configure
vendored
33
configure
vendored
|
@ -5413,13 +5413,6 @@ if test x"$USE_NONFRAGILE_ABI" = x"yes"; then
|
|||
LIBS_nonfragile="$LIBS"
|
||||
CFLAGS="$CFLAGS -fobjc-nonfragile-abi"
|
||||
LIBS="$LIBS -shared-libgcc -fobjc-nonfragile-abi"
|
||||
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
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
|
||||
int
|
||||
|
@ -5432,12 +5425,23 @@ return __has_feature(objc_nonfragile_abi) ? 0 : 1;
|
|||
}
|
||||
|
||||
_ACEOF
|
||||
rm -f conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>&5
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -5445,15 +5449,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|||
(exit $ac_status); }; }; then
|
||||
USE_NONFRAGILE_ABI=yes
|
||||
else
|
||||
echo "$as_me: program exited with status $ac_status" >&5
|
||||
echo "$as_me: failed program was:" >&5
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
( exit $ac_status )
|
||||
USE_NONFRAGILE_ABI=no
|
||||
fi
|
||||
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
echo "$as_me:$LINENO: result: $USE_NONFRAGILE_ABI" >&5
|
||||
echo "${ECHO_T}$USE_NONFRAGILE_ABI" >&6
|
||||
CFLAGS="$CFLAGS_no_nonfragile"
|
||||
|
|
|
@ -1309,6 +1309,7 @@ AC_LANG_POP(C++)
|
|||
# Check if GCC supports -fobjc-nonfragile-abi, and if so, turn it on!
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
# TODO: Enable it by default if the compiler supports it :-)
|
||||
AC_ARG_ENABLE(objc-nonfragile-abi, [
|
||||
--enable-objc-nonfragile-abi
|
||||
Use the non-fragile ABI for Objective-C. Use this option if you want
|
||||
|
@ -1322,10 +1323,11 @@ if test x"$USE_NONFRAGILE_ABI" = x"yes"; then
|
|||
# What we want to do: set USE_NONFRAGILE_ABI to yes if we can compile
|
||||
# something with -fobjc-nonfragile-abi.
|
||||
CFLAGS_nonfragile="$CFLAGS"
|
||||
LIBS_nonfragile="$LIBS"
|
||||
CFLAGS="$CFLAGS -fobjc-nonfragile-abi"
|
||||
LIBS="$LIBS -shared-libgcc -fobjc-nonfragile-abi"
|
||||
AC_RUN_IFELSE([[
|
||||
AC_COMPILE_IFELSE([[
|
||||
/* Note that we never execute this code so it does not really matter
|
||||
what it is. We are testing that the compiler accepts the
|
||||
'-fobjc-nonfragile-abi' flag. */
|
||||
int
|
||||
main()
|
||||
{
|
||||
|
@ -1337,7 +1339,6 @@ return __has_feature(objc_nonfragile_abi) ? 0 : 1;
|
|||
]], USE_NONFRAGILE_ABI=yes, USE_NONFRAGILE_ABI=no)
|
||||
AC_MSG_RESULT($USE_NONFRAGILE_ABI)
|
||||
CFLAGS="$CFLAGS_no_nonfragile"
|
||||
LIBS="$LIBS_no_nonfragile"
|
||||
|
||||
if test x$USE_NONFRAGILE_ABI = xno; then
|
||||
AC_MSG_NOTICE([The nonfragile ABI was requested, but the compiler])
|
||||
|
|
Loading…
Reference in a new issue