summaryrefslogtreecommitdiff
path: root/src/template
diff options
context:
space:
mode:
authorAndres Freund2015-08-05 16:19:52 +0000
committerAndres Freund2015-08-05 16:19:52 +0000
commitde6fd1c898f6eca82c2130a9dbb42d00da68d79e (patch)
tree2387db94ee7d19f19ec45dbfc31c3a6c3494a62c /src/template
parenta855118be3f0682a2061448db5a87dec50717af4 (diff)
Rely on inline functions even if that causes warnings in older compilers.
So far we have worked around the fact that some very old compilers do not support 'inline' functions by only using inline functions conditionally (or not at all). Since such compilers are very rare by now, we have decided to rely on inline functions from 9.6 onwards. To avoid breaking these old compilers inline is defined away when not supported. That'll cause "function x defined but not used" type of warnings, but since nobody develops on such compilers anymore that's ok. This change in policy will allow us to more easily employ inline functions. I chose to remove code previously conditional on PG_USE_INLINE as it seemed confusing to have code dependent on a define that's always defined. Blacklisting of compilers, like in c53f73879f, now has to be done differently. A platform template can define PG_FORCE_DISABLE_INLINE to force inline to be defined empty. Discussion: 20150701161447.GB30708@awork2.anarazel.de
Diffstat (limited to 'src/template')
-rw-r--r--src/template/aix8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/template/aix b/src/template/aix
index b566ff129d..414430a22f 100644
--- a/src/template/aix
+++ b/src/template/aix
@@ -12,6 +12,14 @@ if test "$GCC" != yes ; then
esac
fi
+# "IBM XL C/C++ for AIX, V12.1" miscompiles, for 32-bit, some inline
+# expansions of ginCompareItemPointers() "long long" arithmetic. To
+# take advantage of inlining, build a 64-bit PostgreSQL.
+test "$GCC" != yes -a $(getconf HARDWARE_BITMODE) == '32'; then
+ echo "$as_me: WARNING: disabling inlining on 32 bit aix due to a bug in xlc" 2>&1
+ CPPFLAGS="$CPPFLAGS -DPG_FORCE_DISABLE_INLINE"
+fi
+
# Native memset() is faster, tested on:
# AIX 5.1 and 5.2, XLC 6.0 (IBM's cc)
# AIX 5.3 ML3, gcc 4.0.1