]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
shim: allow building of just the shim with build-ID-incapable linker
authorJan Beulich <jbeulich@suse.com>
Tue, 20 Feb 2018 09:10:59 +0000 (10:10 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 20 Feb 2018 09:10:59 +0000 (10:10 +0100)
The ELF note the shim build inserts causes mkelf32 to choke on the
second program header. However, the output of mkelf32 isn't really
needed when building inside tools/firmware/ - an attempt to build it is
made solely because of a wrong dependency.

Further changes to the make logic will be needed to also allow building
a shim-enabled "normal" xen with such a linker (as it looks the --notes
option will need passing not just when the linker support build ID
generation).

Also drop a stray variable setting from the x86 Makefile.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
xen/Makefile
xen/arch/x86/Makefile

index 027c5adfdd22771a2cdf2ee7ce11c5271b84fb8d..290dc93ddd7ff6af5eeb1ce5bbeeecbff547c7dc 100644 (file)
@@ -139,7 +139,8 @@ $(TARGET).gz: $(TARGET)
        gzip -n -f -9 < $< > $@.new
        mv $@.new $@
 
-$(TARGET): delete-unfresh-files
+.PHONY: $(TARGET)-common
+$(TARGET)-common: delete-unfresh-files
        $(MAKE) -C tools
        $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h
        [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
@@ -149,10 +150,9 @@ $(TARGET): delete-unfresh-files
        $(MAKE) -f $(BASEDIR)/Rules.mk -C include
        $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) asm-offsets.s
        $(MAKE) -f $(BASEDIR)/Rules.mk include/asm-$(TARGET_ARCH)/asm-offsets.h
-       $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $(TARGET)
 
-$(TARGET)-shim: $(TARGET)
-       $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $(TARGET)-shim
+$(TARGET) $(TARGET)-shim: $(TARGET)-common
+       $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@
 
 # drivers/char/console.o contains static banner/compile info. Blow it away.
 # Don't refresh these files during e.g., 'sudo make install'
index d903b7abb9706af6936c83d03e08c2f33bf9cd9d..f327ecaec530cf91f5e5ae191aea77ed984ade44 100644 (file)
@@ -78,8 +78,6 @@ efi-y := $(shell if [ ! -r $(BASEDIR)/include/xen/compile.h -o \
                       -O $(BASEDIR)/include/xen/compile.h ]; then \
                          echo '$(TARGET).efi'; fi)
 
-shim-$(CONFIG_PVH_GUEST) := $(TARGET)-shim
-
 ifneq ($(build_id_linker),)
 notes_phdrs = --notes
 else