From 763d68308dc69d069cc90e186c303ca46c760076 Mon Sep 17 00:00:00 2001 From: Andrei Pavel Date: Mon, 10 Feb 2025 09:53:14 +0200 Subject: [PATCH] [#3729] Always check ENVIRON_SHLIB_FLAGS --- meson.build | 22 +++++++++---------- src/bin/dhcp4/tests/dhcp4_process_tests.sh.in | 2 +- .../tests/meson-dhcp4_process_tests.sh.in | 2 +- src/bin/dhcp4/tests/meson-test_libraries.h.in | 2 +- src/bin/keactrl/keactrl.in | 2 +- src/bin/shell/kea-shell.in | 2 +- src/lib/testutils/meson-dhcp_test_lib.sh.in | 2 +- 7 files changed, 16 insertions(+), 18 deletions(-) diff --git a/meson.build b/meson.build index 76689f0172..ad51e6f37e 100644 --- a/meson.build +++ b/meson.build @@ -269,6 +269,16 @@ result = cpp.run( ) conf_data.set('CHRONO_SAME_DURATION', result.returncode() == 0) +ENVIRON_SHLIB_FLAGS = [] +result = cpp.links( + fs.read('compiler-checks/environ-in-shlib.cc'), + name: 'ENVIRON_SHLIB_FLAGS', + args: ['--shared', '-fPIC', '-Wl,--no-undefined'], +) +if not result + ENVIRON_SHLIB_FLAGS += ['b_lundef=false'] +endif + result = cpp.run( fs.read('compiler-checks/have-generic-tls-method.cc'), name: 'HAVE_GENERIC_TLS_METHOD', @@ -295,18 +305,6 @@ result = cpp.run( ) conf_data.set('HAVE_STREAM_TRUNCATED_ERROR', result.returncode() == 0) -ENVIRON_SHLIB_FLAGS = [] -if cpp.has_link_argument('-Wl,--no-undefined') - result = cpp.links( - fs.read('compiler-checks/environ-in-shlib.cc'), - name: 'ENVIRON_SHLIB_FLAGS', - args: ['--shared', '-fPIC', '-Wl,--no-undefined'], - ) - if not result - ENVIRON_SHLIB_FLAGS += ['b_lundef=false'] - endif -endif - #### System-specific Variables SYSTEM = build_machine.system() diff --git a/src/bin/dhcp4/tests/dhcp4_process_tests.sh.in b/src/bin/dhcp4/tests/dhcp4_process_tests.sh.in index 4680da8476..65122167d4 100755 --- a/src/bin/dhcp4/tests/dhcp4_process_tests.sh.in +++ b/src/bin/dhcp4/tests/dhcp4_process_tests.sh.in @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2014-2024 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2014-2025 Internet Systems Consortium, Inc. ("ISC") # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/bin/dhcp4/tests/meson-dhcp4_process_tests.sh.in b/src/bin/dhcp4/tests/meson-dhcp4_process_tests.sh.in index f380286464..1cf48b0366 100755 --- a/src/bin/dhcp4/tests/meson-dhcp4_process_tests.sh.in +++ b/src/bin/dhcp4/tests/meson-dhcp4_process_tests.sh.in @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2014-2024 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2014-2025 Internet Systems Consortium, Inc. ("ISC") # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/bin/dhcp4/tests/meson-test_libraries.h.in b/src/bin/dhcp4/tests/meson-test_libraries.h.in index 287178b015..358787cf26 100644 --- a/src/bin/dhcp4/tests/meson-test_libraries.h.in +++ b/src/bin/dhcp4/tests/meson-test_libraries.h.in @@ -1,4 +1,4 @@ -// Copyright (C) 2013-2024 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2013-2025 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/bin/keactrl/keactrl.in b/src/bin/keactrl/keactrl.in index 78922929ea..ec84b0c645 100755 --- a/src/bin/keactrl/keactrl.in +++ b/src/bin/keactrl/keactrl.in @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2014-2024 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2014-2025 Internet Systems Consortium, Inc. ("ISC") # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/bin/shell/kea-shell.in b/src/bin/shell/kea-shell.in index c0007cfd9d..e83eb38e53 100755 --- a/src/bin/shell/kea-shell.in +++ b/src/bin/shell/kea-shell.in @@ -1,6 +1,6 @@ #!@PYTHON@ -# Copyright (C) 2017-2024 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2017-2025 Internet Systems Consortium, Inc. ("ISC") # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/lib/testutils/meson-dhcp_test_lib.sh.in b/src/lib/testutils/meson-dhcp_test_lib.sh.in index 4375bf8b53..65edb299a2 100755 --- a/src/lib/testutils/meson-dhcp_test_lib.sh.in +++ b/src/lib/testutils/meson-dhcp_test_lib.sh.in @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2014-2024 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2014-2025 Internet Systems Consortium, Inc. ("ISC") # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this -- 2.47.3