[PATCH 5/6] Only pass -export-dynamic to linker, not compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 configure.ac    | 4 ++--
 src/Makefile.am | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

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
 
-- 
1.8.2.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]