Skip to content

Commit f3f037e

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 b8f3682 commit f3f037e

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

configure

+35
Original file line numberDiff line numberDiff line change
@@ -4847,6 +4847,41 @@ if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
48474847
CFLAGS="$CFLAGS -qnoansialias"
48484848
fi
48494849

4850+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qlonglong" >&5
4851+
$as_echo_n "checking whether $CC supports -qlonglong... " >&6; }
4852+
if ${pgac_cv_prog_cc_cflags__qlonglong+:} false; then :
4853+
$as_echo_n "(cached) " >&6
4854+
else
4855+
pgac_save_CFLAGS=$CFLAGS
4856+
CFLAGS="$pgac_save_CFLAGS -qlonglong"
4857+
ac_save_c_werror_flag=$ac_c_werror_flag
4858+
ac_c_werror_flag=yes
4859+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4860+
/* end confdefs.h. */
4861+
4862+
int
4863+
main ()
4864+
{
4865+
4866+
;
4867+
return 0;
4868+
}
4869+
_ACEOF
4870+
if ac_fn_c_try_compile "$LINENO"; then :
4871+
pgac_cv_prog_cc_cflags__qlonglong=yes
4872+
else
4873+
pgac_cv_prog_cc_cflags__qlonglong=no
4874+
fi
4875+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4876+
ac_c_werror_flag=$ac_save_c_werror_flag
4877+
CFLAGS="$pgac_save_CFLAGS"
4878+
fi
4879+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qlonglong" >&5
4880+
$as_echo "$pgac_cv_prog_cc_cflags__qlonglong" >&6; }
4881+
if test x"$pgac_cv_prog_cc_cflags__qlonglong" = x"yes"; then
4882+
CFLAGS="$CFLAGS -qlonglong"
4883+
fi
4884+
48504885
elif test "$PORTNAME" = "hpux"; then
48514886
# On some versions of HP-UX, libm functions do not set errno by default.
48524887
# Fix that by using +Olibmerrno if the compiler recognizes it.

configure.in

+1
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ elif test "$ICC" = yes; then
456456
elif test "$PORTNAME" = "aix"; then
457457
# AIX's xlc has to have strict aliasing turned off too
458458
PGAC_PROG_CC_CFLAGS_OPT([-qnoansialias])
459+
PGAC_PROG_CC_CFLAGS_OPT([-qlonglong])
459460
elif test "$PORTNAME" = "hpux"; then
460461
# On some versions of HP-UX, libm functions do not set errno by default.
461462
# Fix that by using +Olibmerrno if the compiler recognizes it.

src/template/aix

+1-1
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)