[DTrace-devel] [PATCH] Add support for building .S files into .o objects

Eugene Loh eugene.loh at oracle.com
Thu Aug 26 19:45:07 PDT 2021


I don't understand the issues, but whatever...
     Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
In particular, things were working for me.  That is, I could touch a .S 
file and it'd get recompiled.

On 8/26/21 10:40 PM, 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.
>
> 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



More information about the DTrace-devel mailing list