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

Commit 43d89a2

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 9d6077a commit 43d89a2

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
@@ -4877,6 +4877,41 @@ if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
48774877
CFLAGS="$CFLAGS -qnoansialias"
48784878
fi
48794879

4880+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qlonglong" >&5
4881+
$as_echo_n "checking whether $CC supports -qlonglong... " >&6; }
4882+
if ${pgac_cv_prog_cc_cflags__qlonglong+:} false; then :
4883+
$as_echo_n "(cached) " >&6
4884+
else
4885+
pgac_save_CFLAGS=$CFLAGS
4886+
CFLAGS="$pgac_save_CFLAGS -qlonglong"
4887+
ac_save_c_werror_flag=$ac_c_werror_flag
4888+
ac_c_werror_flag=yes
4889+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4890+
/* end confdefs.h. */
4891+
4892+
int
4893+
main ()
4894+
{
4895+
4896+
;
4897+
return 0;
4898+
}
4899+
_ACEOF
4900+
if ac_fn_c_try_compile "$LINENO"; then :
4901+
pgac_cv_prog_cc_cflags__qlonglong=yes
4902+
else
4903+
pgac_cv_prog_cc_cflags__qlonglong=no
4904+
fi
4905+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4906+
ac_c_werror_flag=$ac_save_c_werror_flag
4907+
CFLAGS="$pgac_save_CFLAGS"
4908+
fi
4909+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qlonglong" >&5
4910+
$as_echo "$pgac_cv_prog_cc_cflags__qlonglong" >&6; }
4911+
if test x"$pgac_cv_prog_cc_cflags__qlonglong" = x"yes"; then
4912+
CFLAGS="$CFLAGS -qlonglong"
4913+
fi
4914+
48804915
elif test "$PORTNAME" = "hpux"; then
48814916
# On some versions of HP-UX, libm functions do not set errno by default.
48824917
# Fix that by using +Olibmerrno if the compiler recognizes it.

configure.in

+1
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ elif test "$ICC" = yes; then
461461
elif test "$PORTNAME" = "aix"; then
462462
# AIX's xlc has to have strict aliasing turned off too
463463
PGAC_PROG_CC_CFLAGS_OPT([-qnoansialias])
464+
PGAC_PROG_CC_CFLAGS_OPT([-qlonglong])
464465
elif test "$PORTNAME" = "hpux"; then
465466
# On some versions of HP-UX, libm functions do not set errno by default.
466467
# 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)