]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Only pass -export-dynamic to linker, not compiler
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 13 May 2013 11:48:06 +0000 (12:48 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 14 May 2013 14:00:22 +0000 (15:00 +0100)
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@redhat.com>
configure.ac
src/Makefile.am

index 4a813cc13caf241357c81116d86503e358999817..3f3f11e1bf465a2c8b74e2fa5bdc15b1b087af19 100644 (file)
@@ -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])
 
 
index 4312c3c17d21d562a63141d6b46e054c6d1456c8..9b9f9f2d284d872501f876b70dd65b693ba9ed78 100644 (file)
@@ -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