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

Commit5a33650

Browse files
committed
Attempt to work around a 32bit xlc compiler bug from a different place.
Inde6fd1c I moved the the work around from 53f73879 into the aixtemplate. The previous location was removed in the former commit, and Ithought that it would be nice to emit a warning when running configure.That didn't turn out to work because at the point the template isincluded we don't know whether we're compiling a 32/64 bit binary andit's possible to install compilers for both on a 64 bit kernel/OS.So go back to a less ambitious approach and definePG_FORCE_DISABLE_INLINE in port/aix.h, without emitting a warning. Wecould try a more fancy approach, but it doesn't seem worth it.This requires moving the check for PG_FORCE_DISABLE_INLINE in c.h toafter including the system headers included from therein which isn'tperfect, as it seems slightly more robust to include all system headersin a similar environment. Oh well.Discussion: 20150807132000.GC13310@awork2.anarazel.de
1 parentc250994 commit5a33650

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

‎src/include/c.h

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,6 @@
5353
#include"pg_config.h"
5454
#include"pg_config_manual.h"/* must be after pg_config.h */
5555

56-
/*
57-
* Force disable inlining if PG_FORCE_DISABLE_INLINE is defined. This is used
58-
* to work around compiler bugs and might also be useful for investigatory
59-
* purposes.
60-
*
61-
* This is done early (in slightly the wrong section) for two reasons: a) we
62-
* don't want to include headers with different settings of this b)
63-
* functionality later in this file might want to rely on inline functions.
64-
*/
65-
#ifdefPG_FORCE_DISABLE_INLINE
66-
#undef inline
67-
#defineinline
68-
#endif
69-
7056
/*
7157
* We always rely on the WIN32 macro being set by our build system,
7258
* but _WIN32 is the compiler pre-defined macro. So make sure we define
@@ -115,6 +101,19 @@
115101
#include"pg_config_os.h"
116102
#endif
117103

104+
/*
105+
* Force disable inlining if PG_FORCE_DISABLE_INLINE is defined. This is used
106+
* to work around compiler bugs and might also be useful for investigatory
107+
* purposes by defining the symbol in the platform's header..
108+
*
109+
* This is done early (in slightly the wrong section) as functionality later
110+
* in this file might want to rely on inline functions.
111+
*/
112+
#ifdefPG_FORCE_DISABLE_INLINE
113+
#undef inline
114+
#defineinline
115+
#endif
116+
118117
/* Must be before gettext() games below */
119118
#include<locale.h>
120119

‎src/include/port/aix.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,12 @@
33
*/
44
#defineCLASS_CONFLICT
55
#defineDISABLE_XOPEN_NLS
6+
7+
/*
8+
* "IBM XL C/C++ for AIX, V12.1" miscompiles, for 32-bit, some inline
9+
* expansions of ginCompareItemPointers() "long long" arithmetic. To take
10+
* advantage of inlining, build a 64-bit PostgreSQL.
11+
*/
12+
#if defined(__ILP32__)&& defined(__IBMC__)
13+
#definePG_FORCE_DISABLE_INLINE
14+
#endif

‎src/template/aix

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@ if test "$GCC" != yes ; then
1212
esac
1313
fi
1414

15-
# "IBM XL C/C++ for AIX, V12.1" miscompiles, for 32-bit, some inline
16-
# expansions of ginCompareItemPointers() "long long" arithmetic. To
17-
# take advantage of inlining, build a 64-bit PostgreSQL.
18-
if test "$GCC" != yes -a $(getconf HARDWARE_BITMODE) == '32'; then
19-
echo "$as_me: WARNING: disabling inlining on 32 bit aix due to a bug in xlc" 2>&1
20-
CPPFLAGS="$CPPFLAGS -DPG_FORCE_DISABLE_INLINE"
21-
fi
22-
2315
# Native memset() is faster, tested on:
2416
# AIX 5.1 and 5.2, XLC 6.0 (IBM's cc)
2517
# AIX 5.3 ML3, gcc 4.0.1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp