Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0a6990e

Browse files
committed
Turn off strict aliasing when using AIX xlc compiler.
autoconf run.
1 parent203592d commit0a6990e

File tree

2 files changed

+60
-3
lines changed

2 files changed

+60
-3
lines changed

‎configure

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2715,8 +2715,7 @@ fi
27152715

27162716
# The Intel compiler on Linux supports most gcc options, but not
27172717
# all of them, so only add these options if we are really using
2718-
# gcc. Intel compiler has a bug in checking for division by NAN
2719-
# (NaN == 0), -mp1 fixes it, so someday we might way to add it.
2718+
# gcc.
27202719

27212720
if test "$GCC" = yes; then
27222721

@@ -2934,6 +2933,61 @@ echo "${ECHO_T}no" >&6
29342933
fi
29352934
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
29362935

2936+
elif test ${CC} = "xlc"; then
2937+
# AIX xlc has to have strict aliasing turned off too
2938+
echo "$as_me:$LINENO: checking if $CC supports -qnoansialias" >&5
2939+
echo $ECHO_N "checking if $CC supports -qnoansialias... $ECHO_C" >&6
2940+
pgac_save_CFLAGS=$CFLAGS
2941+
CFLAGS="$pgac_save_CFLAGS -qnoansialias"
2942+
cat >conftest.$ac_ext <<_ACEOF
2943+
/* confdefs.h. */
2944+
_ACEOF
2945+
cat confdefs.h >>conftest.$ac_ext
2946+
cat >>conftest.$ac_ext <<_ACEOF
2947+
/* end confdefs.h. */
2948+
2949+
int
2950+
main ()
2951+
{
2952+
2953+
;
2954+
return 0;
2955+
}
2956+
_ACEOF
2957+
rm -f conftest.$ac_objext
2958+
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2959+
(eval $ac_compile) 2>conftest.er1
2960+
ac_status=$?
2961+
grep -v '^ *+' conftest.er1 >conftest.err
2962+
rm -f conftest.er1
2963+
cat conftest.err >&5
2964+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2965+
(exit $ac_status); } &&
2966+
{ ac_try='test -z "$ac_c_werror_flag"
2967+
|| test ! -s conftest.err'
2968+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2969+
(eval $ac_try) 2>&5
2970+
ac_status=$?
2971+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2972+
(exit $ac_status); }; } &&
2973+
{ ac_try='test -s conftest.$ac_objext'
2974+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2975+
(eval $ac_try) 2>&5
2976+
ac_status=$?
2977+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2978+
(exit $ac_status); }; }; then
2979+
echo "$as_me:$LINENO: result: yes" >&5
2980+
echo "${ECHO_T}yes" >&6
2981+
else
2982+
echo "$as_me: failed program was:" >&5
2983+
sed 's/^/| /' conftest.$ac_ext >&5
2984+
2985+
CFLAGS="$pgac_save_CFLAGS"
2986+
echo "$as_me:$LINENO: result: no" >&5
2987+
echo "${ECHO_T}no" >&6
2988+
fi
2989+
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2990+
29372991
fi
29382992

29392993
# supply -g if --enable-debug

‎configure.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.460 2006/04/22 00:29:41 momjian Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.461 2006/04/27 14:27:04 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -267,6 +267,9 @@ choke me
267267

268268
# Disable strict-aliasing rules; needed for gcc 3.3+
269269
PGAC_PROG_CC_CFLAGS_OPT([-fno-strict-aliasing])
270+
elif test ${CC} = "xlc"; then
271+
# AIX xlc has to have strict aliasing turned off too
272+
PGAC_PROG_CC_CFLAGS_OPT([-qnoansialias])
270273
fi
271274

272275
# supply -g if --enable-debug

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp