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

Re: [Minios-devel] [UNIKRAFT PATCH] build: do not run fixdep on *.s targets



Thanks!

Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>

On 10.09.2018 13:31, Yuri Volchkov wrote:
Gcc passes *.S files the preprocessor first, whereas
*.s files (lower case 's') are going directly to the assembler. That
is why gcc does not produce *.d files for the *.s sources. This upsets
fixdep and breaks the build

Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>
---
  support/build/Makefile.rules | 20 +++++++++++++++++++-
  1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules
index 43808ef..e8da2c0 100644
--- a/support/build/Makefile.rules
+++ b/support/build/Makefile.rules
@@ -328,6 +328,24 @@ $(eval $(call vprefix_lib,$(1),OBJS-y) += $(3))
  $(eval $(call vprefix_lib,$(1),CLEAN-y) += $(call build_clean,$(3)) $(call 
obj2dep,$(3)))
  endef
+define buildrule_s =
+$(3): $(2) | prepare
+       $(call build_cmd,AS,$(1),$(3),\
+               $(AS)  $(ASINCLUDES) $(ASINCLUDES-y) \
+                      $($(call vprefix_lib,$(1),ASINCLUDES)) $($(call 
vprefix_lib,$(1),ASINCLUDES-y)) \
+                      $(ASFLAGS) $(ASFLAGS-y) \
+                      $($(call vprefix_lib,$(1),ASFLAGS)) $($(call 
vprefix_lib,$(1),ASFLAGS-y)) \
+                      $(4) -D__LIBNAME__=$(1) -D__BASENAME__=$(notdir $(2)) \
+                      -c $(2) -o $(3)
+       )
+
+UK_SRCS-y += $(2)
+UK_DEPS-y += $(call obj2dep,$(3))
+UK_OBJS-y += $(3)
+$(eval $(call vprefix_lib,$(1),OBJS-y) += $(3))
+$(eval $(call vprefix_lib,$(1),CLEAN-y) += $(call build_clean,$(3)) $(call 
obj2dep,$(3)))
+endef
+
  define buildrule_c =
  $(3): $(2) | prepare
        $(call fixdep_and_cmd,CC,$(1),$(3),\
@@ -370,7 +388,7 @@ endef
  # buildrule $libname,$source,$target,$extraflags(optional)
  define buildrule =
  $(if $(filter %.S,  $(2)),$(call buildrule_S ,$(1),$(2),$(3),$(4)),\
-$(if $(filter %.s,  $(2)),$(call buildrule_S ,$(1),$(2),$(3),$(4)),\
+$(if $(filter %.s,  $(2)),$(call buildrule_s ,$(1),$(2),$(3),$(4)),\
  $(if $(filter %.c,  $(2)),$(call buildrule_c ,$(1),$(2),$(3),$(4)),\
  $(if $(filter %.cc, $(2)),$(call buildrule_cc,$(1),$(2),$(3),$(4)),\
  $(if $(filter %.cpp,$(2)),$(call buildrule_cc,$(1),$(2),$(3),$(4)),\


_______________________________________________
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®.