[libvirt] [PATCH 5/6] Only pass -export-dynamic to linker, not compiler
Eric Blake
eblake at redhat.com
Mon May 13 19:29:32 UTC 2013
On 05/13/2013 06:17 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> Clang does not like the -export-dynamic flag. The compiler does
> not need it in the first place, so we can avoid the problem by
> only setting it for the linker
>
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
> configure.ac | 4 ++--
> src/Makefile.am | 6 +++---
> 2 files changed, 5 insertions(+), 5 deletions(-)
ACK.
>
> diff --git a/configure.ac b/configure.ac
> index 53f78de..9e31c39 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2154,7 +2154,7 @@ if test "$with_driver_modules" = "yes" || test "$with_driver_modules" = "check";
> fi
>
> if test "$with_driver_modules" = "yes" ; then
> - DRIVER_MODULE_CFLAGS="-export-dynamic"
> + DRIVER_MODULE_LDFLAGS="-export-dynamic"
> case $ac_cv_search_dlopen in
> no*) DRIVER_MODULE_LIBS= ;;
> *) DRIVER_MODULE_LIBS=$ac_cv_search_dlopen ;;
> @@ -2162,7 +2162,7 @@ if test "$with_driver_modules" = "yes" ; then
> AC_DEFINE_UNQUOTED([WITH_DRIVER_MODULES], 1, [whether to build drivers as modules])
> fi
> AM_CONDITIONAL([WITH_DRIVER_MODULES], [test "$with_driver_modules" != "no"])
> -AC_SUBST([DRIVER_MODULE_CFLAGS])
> +AC_SUBST([DRIVER_MODULE_LDFLAGS])
> AC_SUBST([DRIVER_MODULE_LIBS])
>
>
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 4312c3c..9b9f9f2 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -14,13 +14,13 @@ INCLUDES = -I../gnulib/lib \
> -DIN_LIBVIRT \
> $(GETTEXT_CPPFLAGS)
>
> -AM_CFLAGS = $(DRIVER_MODULE_CFLAGS) \
> - $(LIBXML_CFLAGS) \
> +AM_CFLAGS = $(LIBXML_CFLAGS) \
> $(WARN_CFLAGS) \
> $(LOCK_CHECKING_CFLAGS) \
> $(WIN32_EXTRA_CFLAGS) \
> $(COVERAGE_CFLAGS)
> -AM_LDFLAGS = $(COVERAGE_LDFLAGS)
> +AM_LDFLAGS = $(DRIVER_MODULE_LDFLAGS) \
> + $(COVERAGE_LDFLAGS)
>
> EXTRA_DIST = $(conf_DATA) util/keymaps.csv
>
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130513/67b1eefe/attachment-0001.sig>
More information about the libvir-list
mailing list