meson: portname was set too early

portname is set to host_system, but host_system might still be changed
later in the file.  As a consequence, platforms where host_system is
changed later wouldn't find some of their platform-specific files
(driven by portname), and the build would fail.  Move the assignment
of portname further down after the last change of host_system (but
before further overriding assignments to portname).

Discussion: https://www.postgresql.org/message-id/flat/CAC7zN94TdsHhY88XkroJzSMx7E%3DBQpV9LKKjNSEnTM04ihoWCA%40mail.gmail.com
This commit is contained in:
Peter Eisentraut 2024-01-23 12:15:21 +01:00
parent 21ef4d4d89
commit 4b4b3467ee
1 changed files with 6 additions and 6 deletions

View File

@ -159,12 +159,6 @@ cdata.set_quoted('CONFIGURE_ARGS', '')
# Basic platform specific configuration
###############################################################
# meson's system names don't quite map to our "traditional" names. In some
# places we need the "traditional" name, e.g., for mapping
# src/include/port/$os.h to src/include/pg_config_os.h. Define portname for
# that purpose.
portname = host_system
exesuffix = '' # overridden below where necessary
dlsuffix = '.so' # overridden below where necessary
library_path_var = 'LD_LIBRARY_PATH'
@ -192,6 +186,12 @@ if host_system == 'dragonfly'
host_system = 'netbsd'
endif
# meson's system names don't quite map to our "traditional" names. In some
# places we need the "traditional" name, e.g., for mapping
# src/include/port/$os.h to src/include/pg_config_os.h. Define portname for
# that purpose.
portname = host_system
if host_system == 'aix'
library_path_var = 'LIBPATH'