[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:44:33 PDT 2021


On Thu, Aug 26, 2021 at 10:40:33PM -0400, Kris Van Hees wrote:
> 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.

Note that I did change the copyright to include 2021 after mailing this out.

> 
> 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
> 
> 
> _______________________________________________
> DTrace-devel mailing list
> DTrace-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/dtrace-devel



More information about the DTrace-devel mailing list