aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-02-26 22:03:46 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-02-27 12:17:46 +0300
commit9d3bd240f51205acd7f92da5ba14cf844b846979 (patch)
treeb7a725f080f62c24c8f0c720cf3a09feca15ced8
parentd4af9d35ae7099529697467c9b298f031bed1c93 (diff)
Fix .pc files-based static linkage failing on macos
Note that this is achieved by using the PKGCONF_PKG_PKGF_DONT_MERGE_SPECIAL_FRAGMENTS that we invented in the libpkgconf library.
-rw-r--r--libbuild2/cc/pkgconfig.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/libbuild2/cc/pkgconfig.cxx b/libbuild2/cc/pkgconfig.cxx
index 2dd0925..e71e585 100644
--- a/libbuild2/cc/pkgconfig.cxx
+++ b/libbuild2/cc/pkgconfig.cxx
@@ -175,7 +175,16 @@ namespace build2
//
// Package 'foo', required by 'bar', not found\n
//
+ // Also disable merging options like -framework into a single fragment, if
+ // possible.
+ //
+#ifdef PKGCONF_PKG_PKGF_DONT_MERGE_SPECIAL_FRAGMENTS
+ static const int pkgconf_flags =
+ PKGCONF_PKG_PKGF_SIMPLIFY_ERRORS |
+ PKGCONF_PKG_PKGF_DONT_MERGE_SPECIAL_FRAGMENTS;
+#else
static const int pkgconf_flags = PKGCONF_PKG_PKGF_SIMPLIFY_ERRORS;
+#endif
static bool
pkgconf_error_handler (const char* msg, const pkgconf_client_t*, const void*)