[Libguestfs] [libnbd PATCH 4/6] macOS: Do not use --version_script
Richard W.M. Jones
rjones at redhat.com
Mon Jul 19 08:03:46 UTC 2021
On Tue, Jul 13, 2021 at 11:26:06PM +0200, Martin Kletzander wrote:
> The linker does not support this option.
>
> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
> ---
> configure.ac | 10 ++++++++++
> lib/Makefile.am | 2 +-
> 2 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index 9f6ba03a4773..18a66ee9114f 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -513,6 +513,16 @@ AS_IF([test "x$enable_golang" != "xno"],[
> ],[GOLANG=no])
> AM_CONDITIONAL([HAVE_GOLANG],[test "x$GOLANG" != "xno"])
>
> +case $host_os in
> + darwin*)
> + VERSION_SCRIPT=
> + ;;
> + *)
> + VERSION_SCRIPT="-Wl,--version-script=${srcdir}/libnbd.syms"
> + ;;
> +esac
> +AC_SUBST([VERSION_SCRIPT])
> +
> dnl Produce output files.
> AC_CONFIG_HEADERS([config.h])
>
> diff --git a/lib/Makefile.am b/lib/Makefile.am
> index 968e41aa177b..ece50770326e 100644
> --- a/lib/Makefile.am
> +++ b/lib/Makefile.am
> @@ -78,7 +78,7 @@ libnbd_la_LIBADD = \
> $(NULL)
> libnbd_la_LDFLAGS = \
> $(PTHREAD_LIBS) \
> - -Wl,--version-script=$(srcdir)/libnbd.syms \
> + $(VERSION_SCRIPT) \
> -version-info 0:0:0 \
> $(NULL)
ACK
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
More information about the Libguestfs
mailing list