[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH 3/5] plat/linuxu: Support UK_DEBUG_IMAGES(-y)



Hello Simon,

This patch seems fine.

Reviewed-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>

Thanks & Regards
Sharan

On 7/22/19 2:31 PM, Simon Kuenzer wrote:
Splits the single linker build rule into multiple smaller build
rules. By doing this, each individual image file is either be
referenced in the UK_IMAGE(-y) list or in the UK_DEBUG_IMAGE(-y)
list. `make clean-libs` will no longer remove image files.

Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
  plat/linuxu/Linker.uk | 38 ++++++++++++++++++++------------------
  1 file changed, 20 insertions(+), 18 deletions(-)

diff --git a/plat/linuxu/Linker.uk b/plat/linuxu/Linker.uk
index 0dd12c8c..8674b006 100644
--- a/plat/linuxu/Linker.uk
+++ b/plat/linuxu/Linker.uk
@@ -4,15 +4,16 @@ LINUXU_LDFLAGS-y += -Wl,-e,_liblinuxuplat_start
  ## Link image
  ##
  LINUXU_IMAGE := $(BUILD_DIR)/$(CONFIG_UK_NAME)_linuxu-$(CONFIG_UK_ARCH)
+LINUXU_DEBUG_IMAGE := $(LINUXU_IMAGE).dbg
  LINUXU_LDSCRIPT := $(call src2lds,liblinuxuplat,$(LINUXU_LDSCRIPT_SRC-y))
  LINUXU_LD_SCRIPT_FLAGS := $(addprefix -Wl$(comma)-T$(comma),\
                            $(LINUXU_LDSCRIPT) $(EXTRA_LD_SCRIPT-y))
-$(LINUXU_IMAGE): $(LINUXU_ALIBS) $(LINUXU_ALIBS-y) \
-                $(LINUXU_OLIBS) $(LINUXU_OLIBS-y) \
-                $(UK_ALIBS) $(UK_ALIBS-y) $(UK_OLIBS) $(UK_OLIBS-y) \
-                $(LINUXU_LDSCRIPT)
-       $(call build_cmd,LD,,$@.dbg,\
+$(LINUXU_DEBUG_IMAGE): $(LINUXU_ALIBS) $(LINUXU_ALIBS-y) \
+                      $(LINUXU_OLIBS) $(LINUXU_OLIBS-y) \
+                      $(UK_ALIBS) $(UK_ALIBS-y) $(UK_OLIBS) $(UK_OLIBS-y) \
+                      $(LINUXU_LDSCRIPT)
+       $(call build_cmd,LD,,$@,\
               $(LD) $(LDFLAGS) $(LDFLAGS-y) \
                     $(LINUXU_LDFLAGS) $(LINUXU_LDFLAGS-y) \
                     $(LINUXU_OLIBS) $(LINUXU_OLIBS-y) \
@@ -22,21 +23,22 @@ $(LINUXU_IMAGE): $(LINUXU_ALIBS) $(LINUXU_ALIBS-y) \
                     $(UK_ALIBS) $(UK_ALIBS-y) \
                     -Wl$(comma)--end-group \
                     $(LINUXU_LD_SCRIPT_FLAGS) \
-                    -o $@.dbg)
-       $(call verbose_cmd,SCSTRIP,$(notdir $@),\
+                    -o $@)
+
+$(LINUXU_IMAGE): $(LINUXU_IMAGE).dbg
+       $(call build_cmd,SCSTRIP,,$@,\
                $(SCRIPTS_DIR)/sect-strip.py \
                        $(SECT_STRIP_FLAGS) $(SECT_STRIP_FLAGS-y) \
                        --with-objcopy=$(OBJCOPY) \
-                       $@.dbg -o $@)
-       $(call verbose_cmd,STRIP,$(notdir $@), $(STRIP) -s $@)
-ifeq ($(CONFIG_OPTIMIZE_SYMFILE),y)
-       $(call build_cmd,NM,,$@.sym,\
-              $(NM) -n $@.dbg > $@.sym)
-endif
+                       $< -o $@ && \
+               $(STRIP) -s $@)
-# register image to the build
-UK_IMAGES-$(CONFIG_PLAT_LINUXU) += $(LINUXU_IMAGE)
+$(LINUXU_IMAGE).sym: $(LINUXU_DEBUG_IMAGE)
+       $(call build_cmd,NM,,$@, $(NM) -n $< > $@)
-# ...for cleaning:
-LIBLINUXUPLAT_CLEAN += $(call build_clean,$(LINUXU_IMAGE).dbg)
-LIBLINUXUPLAT_CLEAN += $(call build_clean,$(LINUXU_IMAGE).sym)
+# register image to the build
+ifeq ($(CONFIG_PLAT_LINUXU),y)
+UK_DEBUG_IMAGES-y                     += $(LINUXU_DEBUG_IMAGE)
+UK_IMAGES-y                           += $(LINUXU_IMAGE)
+UK_IMAGES-$(CONFIG_OPTIMIZE_SYMFILE)  += $(LINUXU_IMAGE).sym
+endif


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.