Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7319c05

Browse files
committed
AIX: Test the -qlonglong option before use.
xlc provides "long long" unconditionally at C99-compatible language levels, and this option provokes a warning. The warning interferes with "configure" tests that fail in response to any warning. Notably, before commit 85a2a89, it interfered with the test for -qnoansialias. Back-patch to 9.0 (all supported versions).
1 parent 730089d commit 7319c05

File tree

3 files changed

+62
-1
lines changed

3 files changed

+62
-1
lines changed

configure

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4756,6 +4756,66 @@ if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
47564756
CFLAGS="$CFLAGS -qnoansialias"
47574757
fi
47584758

4759+
{ $as_echo "$as_me:$LINENO: checking whether $CC supports -qlonglong" >&5
4760+
$as_echo_n "checking whether $CC supports -qlonglong... " >&6; }
4761+
if test "${pgac_cv_prog_cc_cflags__qlonglong+set}" = set; then
4762+
$as_echo_n "(cached) " >&6
4763+
else
4764+
pgac_save_CFLAGS=$CFLAGS
4765+
CFLAGS="$pgac_save_CFLAGS -qlonglong"
4766+
ac_save_c_werror_flag=$ac_c_werror_flag
4767+
ac_c_werror_flag=yes
4768+
cat >conftest.$ac_ext <<_ACEOF
4769+
/* confdefs.h. */
4770+
_ACEOF
4771+
cat confdefs.h >>conftest.$ac_ext
4772+
cat >>conftest.$ac_ext <<_ACEOF
4773+
/* end confdefs.h. */
4774+
4775+
int
4776+
main ()
4777+
{
4778+
4779+
;
4780+
return 0;
4781+
}
4782+
_ACEOF
4783+
rm -f conftest.$ac_objext
4784+
if { (ac_try="$ac_compile"
4785+
case "(($ac_try" in
4786+
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4787+
*) ac_try_echo=$ac_try;;
4788+
esac
4789+
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4790+
$as_echo "$ac_try_echo") >&5
4791+
(eval "$ac_compile") 2>conftest.er1
4792+
ac_status=$?
4793+
grep -v '^ *+' conftest.er1 >conftest.err
4794+
rm -f conftest.er1
4795+
cat conftest.err >&5
4796+
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4797+
(exit $ac_status); } && {
4798+
test -z "$ac_c_werror_flag" ||
4799+
test ! -s conftest.err
4800+
} && test -s conftest.$ac_objext; then
4801+
pgac_cv_prog_cc_cflags__qlonglong=yes
4802+
else
4803+
$as_echo "$as_me: failed program was:" >&5
4804+
sed 's/^/| /' conftest.$ac_ext >&5
4805+
4806+
pgac_cv_prog_cc_cflags__qlonglong=no
4807+
fi
4808+
4809+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4810+
ac_c_werror_flag=$ac_save_c_werror_flag
4811+
CFLAGS="$pgac_save_CFLAGS"
4812+
fi
4813+
{ $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__qlonglong" >&5
4814+
$as_echo "$pgac_cv_prog_cc_cflags__qlonglong" >&6; }
4815+
if test x"$pgac_cv_prog_cc_cflags__qlonglong" = x"yes"; then
4816+
CFLAGS="$CFLAGS -qlonglong"
4817+
fi
4818+
47594819
elif test "$PORTNAME" = "hpux"; then
47604820
# On some versions of HP-UX, libm functions do not set errno by default.
47614821
# Fix that by using +Olibmerrno if the compiler recognizes it.

configure.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ elif test "$ICC" = yes; then
443443
elif test "$PORTNAME" = "aix"; then
444444
# AIX's xlc has to have strict aliasing turned off too
445445
PGAC_PROG_CC_CFLAGS_OPT([-qnoansialias])
446+
PGAC_PROG_CC_CFLAGS_OPT([-qlonglong])
446447
elif test "$PORTNAME" = "hpux"; then
447448
# On some versions of HP-UX, libm functions do not set errno by default.
448449
# Fix that by using +Olibmerrno if the compiler recognizes it.

src/template/aix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if test "$GCC" != yes ; then
77
CFLAGS="-O -qmaxmem=16384 -qsrcmsg"
88
;;
99
*)
10-
CFLAGS="-O2 -qmaxmem=16384 -qsrcmsg -qlonglong"
10+
CFLAGS="-O2 -qmaxmem=16384 -qsrcmsg"
1111
;;
1212
esac
1313
fi

0 commit comments

Comments
 (0)