- Notifications
You must be signed in to change notification settings - Fork5.2k
Commitc1984be
committed
Fix ./configure checks with __cpuidex() and __cpuid()
The configure checks used two incorrect functions when checking thepresence of some routines in an environment:- __get_cpuidex() for the check of __cpuidex().- __get_cpuid() for the check of __cpuid().This means that Postgres has never been able to detect the presence ofthese functions, impacting environments where these exist, like Windows.Simply fixing the function name does not work. For example, usingconfigure with MinGW on Windows causes the checks to detect all four of__get_cpuid(), __get_cpuid_count(), __cpuidex() and __cpuid() to beavailable, causing a compilation failure as this messes up with theMinGW headers as we would include both <intrin.h> and <cpuid.h>.The Postgres code expects only one in { __get_cpuid() , __cpuid() } andone in { __get_cpuid_count() , __cpuidex() } to exist. This commitreshapes the configure checks to do exactly what meson is doing, whichhas been working well for us: check one, then the other, but never allowboth to be detected in a given build.The logic is wrong since3dc2d62 and792752a where thesechecks have been introduced (the second case is most likely a copy-pastocoming from the first case), with meson documenting that the configurechecks were broken. As far as I can see, they are not once appliedconsistently with what the code expects, but let's see if the buildfarmhas different something to say. The comment in meson.build is adjustedas well, to reflect the new reality.Author: Lukas Fittl <lukas@fittl.com>Co-authored-by: Michael Paquier <michael@paquier.xyz>Discussion:https://postgr.es/m/aIgwNYGVt5aRAqTJ@paquier.xyzBackpatch-through: 131 parentbbc20c8 commitc1984be
2 files changed
+20
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17897 | 17897 | | |
17898 | 17898 | | |
17899 | 17899 | | |
17900 | | - | |
| 17900 | + | |
17901 | 17901 | | |
17902 | 17902 | | |
17903 | 17903 | | |
| |||
17930 | 17930 | | |
17931 | 17931 | | |
17932 | 17932 | | |
17933 | | - | |
17934 | | - | |
17935 | | - | |
| 17933 | + | |
| 17934 | + | |
| 17935 | + | |
17936 | 17936 | | |
17937 | 17937 | | |
17938 | 17938 | | |
| |||
17944 | 17944 | | |
17945 | 17945 | | |
17946 | 17946 | | |
17947 | | - | |
| 17947 | + | |
17948 | 17948 | | |
17949 | 17949 | | |
17950 | 17950 | | |
| |||
17960 | 17960 | | |
17961 | 17961 | | |
17962 | 17962 | | |
17963 | | - | |
| 17963 | + | |
17964 | 17964 | | |
17965 | 17965 | | |
17966 | 17966 | | |
| 17967 | + | |
17967 | 17968 | | |
17968 | 17969 | | |
17969 | 17970 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2081 | 2081 | | |
2082 | 2082 | | |
2083 | 2083 | | |
2084 | | - | |
| 2084 | + | |
2085 | 2085 | | |
2086 | 2086 | | |
2087 | 2087 | | |
| |||
2091 | 2091 | | |
2092 | 2092 | | |
2093 | 2093 | | |
2094 | | - | |
2095 | | - | |
2096 | | - | |
2097 | | - | |
2098 | | - | |
2099 | | - | |
2100 | | - | |
2101 | | - | |
2102 | | - | |
2103 | | - | |
2104 | | - | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
2105 | 2106 | | |
2106 | 2107 | | |
2107 | 2108 | | |
| |||
0 commit comments
Comments
(0)