From d5bdea59e789662071017ff119f99cd55a4a6425 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Fri, 8 Apr 2016 00:03:43 +0200 Subject: [PATCH] build: fix build with Clang 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 Acked-by: Jan Beulich --- xen/Rules.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index d4dffde179..7183d6938c 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -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 -- 2.30.2