Skip to content

Commit eb3b93b

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 fd415ff commit eb3b93b

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

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