From 8eb730a3deaaf523938d0e4dbaa2f8f11e15a639 Mon Sep 17 00:00:00 2001 From: Nadav Har'El Date: Tue, 10 Nov 2015 23:27:49 +0200 Subject: [PATCH] configure.py: support for pkg-config before release 0.28 Older versions of pkg-config, before release 0.28 (see http://lists.freedesktop.org/archives/pkg-config/2013-January/000912.html) had a bug where duplicate compilation flags were deleted. This included our use of -Wl,--whole-archive, which can apprear twice on our "Libs" list, and one was removed. But one set of these flags surrounds the Seastar libraries and one surrounds the DPDK libraries, and with these flags dropped or reordered, compilation of a Seastar app using pkg-config will not work. So this patch replaces the construct -Wl,--whole-archive -lseastar -Wl,--no-whole-archive With the equivalent but space-free one: -Wl,--whole-archive,-lseastar,--no-whole-archive pkg-config will now treat this whole thing as one single parameter, so it will not remove any part of it as "duplicate" of anything else. Signed-off-by: Nadav Har'El --- configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.py b/configure.py index e7bdf5c97..1cbfed156 100755 --- a/configure.py +++ b/configure.py @@ -573,7 +573,7 @@ def have_hwloc(): URL: http://seastar-project.org/ Description: Advanced C++ framework for high-performance server applications on modern hardware. Version: 1.0 - Libs: -L{srcdir}/{builddir} -Wl,--whole-archive -lseastar -Wl,--no-whole-archive {dbgflag} -Wl,--no-as-needed {static} {pie} -fvisibility=hidden -pthread {user_ldflags} {libs} {sanitize_libs} + Libs: -L{srcdir}/{builddir} -Wl,--whole-archive,-lseastar,--no-whole-archive {dbgflag} -Wl,--no-as-needed {static} {pie} -fvisibility=hidden -pthread {user_ldflags} {libs} {sanitize_libs} Cflags: -std=gnu++1y {dbgflag} {fpie} -Wall -Werror -fvisibility=hidden -pthread -I{srcdir} -I{srcdir}/{builddir}/gen {user_cflags} {warnings} {defines} {sanitize} {opt} ''').format(builddir = 'build/' + mode, srcdir = os.getcwd(), **vars) f.write('build $builddir/{}/{}: gen\n text = {}\n'.format(mode, binary, repr(pc)))