diff options
author | Jere Leppänen <jere.leppanen@nokia.com> | 2022-09-20 17:19:02 +0300 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2022-10-19 13:29:08 +0300 |
commit | e924ab56a026b584aab1c10f7e7210a77d51bb9f (patch) | |
tree | 02e6a7cd5f3868fe343cae05b2e54ee6f73e8db7 /test | |
parent | b00b8c06310602cc34bdebf6f3eed978ea95864d (diff) |
test: misc: in installcheck, work around bug in legacy pkgconfig
pkgconfig-0.27 returns linker option in the wrong order. Detect
pkgconfig version and add the static libraries explicitly to the
compiler command.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/miscellaneous/Makefile.am | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/miscellaneous/Makefile.am b/test/miscellaneous/Makefile.am index 9f9038f87..7d7e13fe0 100644 --- a/test/miscellaneous/Makefile.am +++ b/test/miscellaneous/Makefile.am @@ -33,8 +33,13 @@ PROGRAM_static = odp_api_headers_static installcheck-local: $(PROGRAM_static) +# pkgconfig-0.27 (centos-7) returns linker options in the wrong order +if PKGCONFIG_WORKAROUND +WA_FLAGS = -l:libodphelper.a -l:lib@ODP_LIB_NAME@.a +endif + $(PROGRAM_static): $(srcdir)/$(odp_api_headers_SOURCES) - $(CC) $(AM_CFLAGS) $(CFLAGS) $^ -o $@ \ + $(CC) $(AM_CFLAGS) $(CFLAGS) $^ -o $@ $(WA_FLAGS) \ `$(PKGCONFIG) --static libodphelper` `$(PKGCONFIG) --static lib$(ODP_LIB_NAME)` if ! cross_compile ./$@ |