Skip to content

Commit dfefa0e

Browse files
committed
meson: pg_regress: Define a HOST_TUPLE sufficient to make resultmap work
This doesn't end up with a triple that's exactly the same as config.guess - it'd be hard to achieve that and it doesn't seem required. We can't rely on config.guess as we don't necessarily have a /bin/sh on windows, e.g., when building on windows with msvc. This isn't perfect, e.g., clang works on windows as well. But I suspect we'd need a bunch of other changes to make clang on windows work, and we haven't supported it historically. Discussion: http://postgr.es/m/20220928022724.erzuk5v4ai4b53do@awork3.anarazel.de
1 parent e3a8925 commit dfefa0e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/test/regress/meson.build

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@ regress_sources = pg_regress_c + files(
66
'pg_regress_main.c'
77
)
88

9-
pg_regress_cflags = ['-DHOST_TUPLE="frak"', '-DSHELLPROG="/bin/sh"']
9+
# Need make up something roughly like x86_64-pc-mingw64. resultmap matches on
10+
# patterns like ".*-.*-mingw.*". We probably can do better, but for now just
11+
# replace 'gcc' with 'mingw' on windows.
12+
host_tuple_cc = cc.get_id()
13+
if host_system == 'windows' and host_tuple_cc == 'gcc'
14+
host_tuple_cc = 'mingw'
15+
endif
16+
host_tuple = '@0@-@1@-@2@'.format(host_cpu, host_system, host_tuple_cc)
17+
18+
pg_regress_cflags = ['-DHOST_TUPLE="@0@"'.format(host_tuple), '-DSHELLPROG="/bin/sh"']
1019

1120
pg_regress = executable('pg_regress',
1221
regress_sources,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy