[xen master] shim: allow building of just the shim with build-ID-incapable linker

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen master] shim: allow building of just the shim with build-ID-incapable linker

patchbot
commit 682b13c259e531f6848f535032c256ec8fcaca71
Author:     Jan Beulich <[hidden email]>
AuthorDate: Tue Feb 20 10:10:59 2018 +0100
Commit:     Jan Beulich <[hidden email]>
CommitDate: Tue Feb 20 10:10:59 2018 +0100

    shim: allow building of just the shim with build-ID-incapable linker
   
    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 <[hidden email]>
    Reviewed-by: Roger Pau Monné <[hidden email]>
    Reviewed-by: Wei Liu <[hidden email]>
---
 xen/Makefile          | 8 ++++----
 xen/arch/x86/Makefile | 2 --
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/xen/Makefile b/xen/Makefile
index 027c5ad..290dc93 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -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'
diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index d903b7a..f327eca 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -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
--
generated by git-patchbot for /home/xen/git/xen.git#master


_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog