[Libosinfo] [PATCH] build: Fix "--no-undefined" linker's flag for OSX

Fabiano Fidêncio fidencio at redhat.com
Wed May 11 06:43:52 UTC 2016


Apple's linker doesn't have support to "--no-undefined" and we must use
something equivalent, like: "-undefined,error".

The patch was test by Programmingkid and his positive feedback can be
seen here:
https://www.redhat.com/archives/libosinfo/2016-May/msg00164.html

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1305016

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 configure.ac | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure.ac b/configure.ac
index ad38464..f7ecb8f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,6 +97,10 @@ case "$host" in
     NO_UNDEFINED_LDFLAGS="-no-undefined"
     ;;
 
+  darwin*)
+    NO_UNDEFINED_LDFLAGS="-Wl,-undefined,error"
+    ;;
+
   *)
     NO_UNDEFINED_FLAGS="-Wl,--no-undefined"
     VERSION_SCRIPT_FLAGS=-Wl,--version-script=
-- 
2.7.4




More information about the Libosinfo mailing list