diff options
-rw-r--r-- | src/include/c.h | 27 | ||||
-rw-r--r-- | src/include/port/aix.h | 9 | ||||
-rw-r--r-- | src/template/aix | 8 |
3 files changed, 22 insertions, 22 deletions
diff --git a/src/include/c.h b/src/include/c.h index e84c77460c0..b719eb95e14 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -54,20 +54,6 @@ #include "pg_config_manual.h" /* must be after pg_config.h */ /* - * Force disable inlining if PG_FORCE_DISABLE_INLINE is defined. This is used - * to work around compiler bugs and might also be useful for investigatory - * purposes. - * - * This is done early (in slightly the wrong section) for two reasons: a) we - * don't want to include headers with different settings of this b) - * functionality later in this file might want to rely on inline functions. - */ -#ifdef PG_FORCE_DISABLE_INLINE -#undef inline -#define inline -#endif - -/* * We always rely on the WIN32 macro being set by our build system, * but _WIN32 is the compiler pre-defined macro. So make sure we define * WIN32 whenever _WIN32 is set, to facilitate standalone building. @@ -115,6 +101,19 @@ #include "pg_config_os.h" #endif +/* + * Force disable inlining if PG_FORCE_DISABLE_INLINE is defined. This is used + * to work around compiler bugs and might also be useful for investigatory + * purposes by defining the symbol in the platform's header.. + * + * This is done early (in slightly the wrong section) as functionality later + * in this file might want to rely on inline functions. + */ +#ifdef PG_FORCE_DISABLE_INLINE +#undef inline +#define inline +#endif + /* Must be before gettext() games below */ #include <locale.h> diff --git a/src/include/port/aix.h b/src/include/port/aix.h index dc4013e46e2..5b1159c5785 100644 --- a/src/include/port/aix.h +++ b/src/include/port/aix.h @@ -3,3 +3,12 @@ */ #define CLASS_CONFLICT #define DISABLE_XOPEN_NLS + +/* + * "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. + */ +#if defined(__ILP32__) && defined(__IBMC__) +#define PG_FORCE_DISABLE_INLINE +#endif diff --git a/src/template/aix b/src/template/aix index f12023d7316..b566ff129df 100644 --- a/src/template/aix +++ b/src/template/aix @@ -12,14 +12,6 @@ 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. -if 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 |