summaryrefslogtreecommitdiffstats
path: root/src/corelib/CMakeLists.txt
diff options
context:
space:
mode:
authorNiclas Rosenvik <nros@netbsd.org>2021-04-08 12:14:31 +0000
committerNiclas Rosenvik <nros@netbsd.org>2021-04-08 15:17:28 +0000
commit7d3434f9702b44dbfd39eecc44db889f802caf0e (patch)
tree2b768de84f77c85067ffa1c385493e6472398b54 /src/corelib/CMakeLists.txt
parent5c969aeab17b9c0668e2d1d19ccbfc94df3b05dd (diff)
Fix environ build break on FreeBSD
QMAKE_LFLAGS_NOUNDEF = <EMPTY> for FreeBSD did not get converted to CMakeLists.txt. This breaks the build on FreeBSD since environ is missing from libc, it is available at runtime. Turn -Wl,-no-undefined into warnings on FreeBSD to fix the build. Also add a comment based on the one from corelib.pro . Change-Id: I3835884a2682af0f68a4d65dede3e4e5d4104ac8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/corelib/CMakeLists.txt')
-rw-r--r--src/corelib/CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt
index af6bba2dbe..467827b1c6 100644
--- a/src/corelib/CMakeLists.txt
+++ b/src/corelib/CMakeLists.txt
@@ -430,8 +430,13 @@ qt_internal_extend_target(Core CONDITION MSVC AND (TEST_architecture_arch STREQU
"/BASE:0x67000000"
)
-#### Keys ignored in scope 6:.:.:corelib.pro:FREEBSD OR OPENBSD:
-# QMAKE_LFLAGS_NOUNDEF = <EMPTY>
+# QtCore can't be compiled with -Wl,-no-undefined because it uses the
+# "environ" variable and FreeBSD does not include a weak symbol for it
+# in libc.
+qt_internal_extend_target(Core CONDITION FREEBSD
+ LINK_OPTIONS
+ "LINKER:--warn-unresolved-symbols"
+)
qt_internal_extend_target(Core CONDITION QT_FEATURE_animation
SOURCES