Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251114162305.GI3520958@port70.net>
Date: Fri, 14 Nov 2025 17:23:05 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: Bill Roberts <bill.roberts@....com>
Cc: musl@...ts.openwall.com
Subject: Re: [PATCH 2/3] Makefile: support awk processing of .S files

* Bill Roberts <bill.roberts@....com> [2025-11-13 13:44:27 -0600]:
> Don't skip .S files when post-processing with awk.
> 
> Signed-off-by: Bill Roberts <bill.roberts@....com>
> ---
>  Makefile | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index a20bafaf..4e62e0b3 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -136,15 +136,17 @@ CC_CMD = $(CC) $(CFLAGS_ALL) -c -o $@ $<
>  # Choose invocation of assembler to be used
>  ifeq ($(ADD_CFI),yes)
>  	AS_CMD = LC_ALL=C awk -f $(srcdir)/tools/add-cfi.common.awk -f $(srcdir)/tools/add-cfi.$(ARCH).awk $< | $(CC) $(CFLAGS_ALL) -x assembler -c -o $@ -
> +	CCS_CMD = LC_ALL=C awk -f $(srcdir)/tools/add-cfi.common.awk -f $(srcdir)/tools/add-cfi.$(ARCH).awk $< | $(CC) $(CFLAGS_ALL) -x assembler-with-cpp -c -o $@ -
>  else
>  	AS_CMD = $(CC_CMD)
> +	CCS_CMD = $(CC_CMD)
>  endif
>  
>  obj/%.o: $(srcdir)/%.s
>  	$(AS_CMD)
>  
>  obj/%.o: $(srcdir)/%.S
> -	$(CC_CMD)
> +	$(CCS_CMD)

i think the x86 cfi awk deletes # and // comments
which affects cpp directives in .S so you cant just
use the awk on .S

i guess a hack would be to not use # comments in .s,
another to only preprocess first then awk then asm.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.