From 421846e4a38302484638e80988addd6d7e87bb70 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Mon, 13 May 2013 12:48:06 +0100 Subject: [PATCH] Only pass -export-dynamic to linker, not compiler 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 --- configure.ac | 4 ++-- src/Makefile.am | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 4a813cc13c..3f3f11e1bf 100644 --- a/configure.ac +++ b/configure.ac @@ -2158,7 +2158,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 ;; @@ -2166,7 +2166,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 4312c3c17d..9b9f9f2d28 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