From 243f0c45ca8060a230e0bde34783b75c0fefb47a Mon Sep 17 00:00:00 2001 From: Simon Kuenzer Date: Thu, 23 Feb 2023 22:21:04 +0100 Subject: [PATCH] build: Declare __LIBNAME__, __BASENAME__ and __VARIANT__ for .lds.S .lds.S files are linker script files that use the C preprocessor in order to generate the final .lds file. This commit provides Unikraft's common declarations of `__LIBNAME__`, `__BASENAME__`, `__VARIANT__` to this pre-processing step so that they can be used for generating linker scripts. Signed-off-by: Simon Kuenzer Reviewed-by: Delia Pavel Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #868 --- support/build/Makefile.rules | 1 + 1 file changed, 1 insertion(+) diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules index 6a7a0c7b1..c1d84b89d 100644 --- a/support/build/Makefile.rules +++ b/support/build/Makefile.rules @@ -642,6 +642,7 @@ $(4): $(2) | preprocess $$(ASFLAGS) $$(ASFLAGS-y) $$(ASFLAGS_EXTRA) \ $$($(call vprefix_lib,$(1),ASFLAGS)) $$($(call vprefix_lib,$(1),ASFLAGS-y)) \ $$($(call vprefix_src,$(1),$(2),$(3),FLAGS)) $$($(call vprefix_src,$(1),$(2),$(3),FLAGS-y)) \ + -D__LIBNAME__=$(1) -D__BASENAME__=$(notdir $(2)) $(if $(3),-D__VARIANT__=$(3)) \ $(5) \ $(2) -o $(4) $(call depflags,$(4)) ) -- 2.39.5