From 7c374c6ab43fe2afdd368fc6091b64c00ef93f9b Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 11 Jan 2019 12:57:24 -0500 Subject: [PATCH] test_app_server: Fix linking when --no-undefined is in default LINKFLAGS. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We now remove it manually for one library to break the dependency loop. Change-Id: I24061705b4656d444bbe7b4a6af836303f44c020 Reviewed-on: https://review.haiku-os.org/c/873 Reviewed-by: Stephan Aßmus --- src/tests/servers/app/Jamfile | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/tests/servers/app/Jamfile b/src/tests/servers/app/Jamfile index 4b2b678dc7..b31dbbe303 100644 --- a/src/tests/servers/app/Jamfile +++ b/src/tests/servers/app/Jamfile @@ -55,13 +55,24 @@ SharedLibrary libhwinterface.so : RGBColor.cpp UpdateQueue.cpp - : libtestappserver.so + : # will depend on libtestappserver.so ; +# We include --no-undefined in LINKFLAGS by default, which we can't use here +# because otherwise we would be trapped in a circular dependency. +local hwinterfaceLinkFlags ; +for flag in [ on libhwinterface.so return $(LINKFLAGS) ] { + if $(flag) = "--no-undefined" { + hwinterfaceLinkFlags += "--allow-shlib-undefined" ; + continue ; + } + hwinterfaceLinkFlags += $(flag) ; +} +LINKFLAGS on libhwinterface.so = $(hwinterfaceLinkFlags) ; -# The reason for this is that libhwinterfaceimpl.so needs to link against -# libbe *first*, but simply adding it to the library list would add it to -# LINKLIBS which is always appended after NEEDLIBS in the command line. +# libhwinterfaceimpl.so needs to link against libbe *first*, but simply +# adding it to the library list would add it to LINKLIBS which is always +# appended after NEEDLIBS in the command line. LINKFLAGS on libhwinterfaceimpl.so ?= $(LINKFLAGS) ; LINKFLAGS on libhwinterfaceimpl.so += -lbe ; @@ -174,7 +185,7 @@ SharedLibrary libtestappserver.so : # libraries : be libpainter.a libagg.a libtextencoding.so shared libstackandtile.a - liblinprog.a + liblinprog.a libhwinterface.so libhwinterfaceimpl.so [ BuildFeatureAttribute freetype : library ] ;