Skip to contentSkip to conversation

xen/lto: if the makefile asks for binary, always build binary

PATCH New Tim Deegan 1 participant 1 message Apr 7, 2011

lore
Share & tools
lore

Tim Deegan

author
#0 lore raw

PATCH 1/1 xen/lto: if the makefile asks for binary, always build binary

# HG changeset patch
# User Tim Deegan <[email protected]>
# Date 1302175153 -3600
# Node ID d07dbbb17473e8b668415b1db96112eaae9f2e09 # Parent a35934cbfca842e8fb43d16eb488d9da3fb3ebe7 xen/lto: if the makefile asks for binary, always build binary

even if the source is a C file.

xen/Rules.mk +3 -0
diff -r a35934cbfca8 -r d07dbbb17473 xen/Rules.mk
@@ -112,6 +112,9 @@ obj-y += $(obj-bin-y)
 obj-bin-y :=
 endif
 
+# Always build obj-bin files as binary even if they come from C source. 
+$(obj-bin-y): CFLAGS := $(filter-out -flto,$(CFLAGS))
+
 built_in.o: $(obj-y)
 ifeq ($(obj-y),)
 	$(CC) $(CFLAGS) -c -x c /dev/null -o $@