[DTrace-devel] [PATCH] Add support for building .S files into .o objects
Kris Van Hees
kris.van.hees at oracle.com
Thu Aug 26 19:40:33 PDT 2021
With the introduction of assembler source files (.S) for BPF code, to be
compiled into object files (.o), the obj-name macro in Makefunctions
needs to be extended to account for .S source files.
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
---
Makefunctions | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefunctions b/Makefunctions
index 3f398577..3da4d4ae 100644
--- a/Makefunctions
+++ b/Makefunctions
@@ -14,7 +14,7 @@ current-dir = $(dir $(lastword $(MAKEFILE_LIST)))
# given primary. If called with an absolute pathname, return it unchanged.
# Syntax: $(call *-name,primary,filename)
-obj-name = $(addprefix $(objdir)/$(subst /,-,$($(1)_DIR))-,$(subst /,-,$(2:.c=.o)))
+obj-name = $(addprefix $(objdir)/$(subst /,-,$($(1)_DIR))-,$(subst /,-,$(patsubst %.S,%.o,$(2:.c=.o))))
src-name = $(if $(filter-out $(abspath $(2)),$(2)),$(addprefix $($(1)_DIR),$(2)),$(2))
# Functions to generate the name of a header file and DOF object file for a
--
2.33.0
More information about the DTrace-devel
mailing list