Skip to content

Commit

Permalink
configure.py: support for pkg-config before release 0.28
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
nyh authored and avikivity committed Nov 10, 2015
1 parent 016cf94 commit 8eb730a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 8eb730a

Please sign in to comment.