[Libosinfo] [PATCH] build: Fix "--no-undefined" linker's flag for OSX
Christophe Fergeau
cfergeau at redhat.com
Wed May 11 12:29:17 UTC 2016
Hey,
On Wed, May 11, 2016 at 08:43:52AM +0200, Fabiano Fidêncio wrote:
> 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"
> + ;;
> +
I was initially wondering if this is a difference of toolchain (clang vs
gcc) or of OS, but I haven't been able to hit this issue when building
libosinfo with clang on my linux machine. So ACK to this patch, even
though it might need some more refinements in the future (eg what
happens if someone built gcc on osx and is building libosinfo with it,
do we get everything right?) We can deal with that when someone reports
it ;)
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libosinfo/attachments/20160511/6003741b/attachment.sig>
More information about the Libosinfo
mailing list