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

Lines changed: 35 additions & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy