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>
This commit is contained in:
Niclas Rosenvik 2021-04-08 12:14:31 +00:00
parent 5c969aeab1
commit 7d3434f970

View File

@ -430,8 +430,13 @@ qt_internal_extend_target(Core CONDITION MSVC AND (TEST_architecture_arch STREQU
"/BASE:0x67000000" "/BASE:0x67000000"
) )
#### Keys ignored in scope 6:.:.:corelib.pro:FREEBSD OR OPENBSD: # QtCore can't be compiled with -Wl,-no-undefined because it uses the
# QMAKE_LFLAGS_NOUNDEF = <EMPTY> # "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 qt_internal_extend_target(Core CONDITION QT_FEATURE_animation
SOURCES SOURCES