build: fix build with Clang
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 7 Apr 2016 22:03:43 +0000 (00:03 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 7 Apr 2016 22:03:43 +0000 (00:03 +0200)
c/s 607044bf9 "build: avoid putting local absolute symbols in symbol tables"
breaks the build with Clang, as the command line argument isn't understood.

Clang does not appear to have any equivielent option, and already has
outstanding issues with duplicate symbols.  Excluding this option makes the
problem no worse.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/Rules.mk

index d4dffde179491ed529723e2d60a086705958968b..7183d6938c221f9e8e63f5d8ad8dc61d2e23340f 100644 (file)
@@ -50,9 +50,15 @@ ALL_OBJS-$(CONFIG_X86)   += $(BASEDIR)/crypto/built_in.o
 CFLAGS += -nostdinc -fno-builtin -fno-common
 CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
 CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
-CFLAGS += -Wa,--strip-local-absolute
 CFLAGS += '-D__OBJECT_FILE__="$@"'
 
+ifneq ($(clang),y)
+# Clang doesn't understand this command line argument, and doesn't appear to
+# have an suitable alternative.  The resulting compiled binary does function,
+# but has an excessively large symbol table.
+CFLAGS += -Wa,--strip-local-absolute
+endif
+
 CFLAGS-$(verbose)       += -DVERBOSE
 CFLAGS-$(crash_debug)   += -DCRASH_DEBUG
 CFLAGS-$(perfc)         += -DPERF_COUNTERS