[PATCH v1] Filter machine compiler flags into Assembler Flags

Florian Weimer fweimer@redhat.com
Tue Jun 3 11:38:23 GMT 2025


* Sachin Monga:

> -mrop-protect is required for ROP compilation which is
> ignored by ASFLAGS for now. Filtering -m% flags will ensure
> that they are copied from CFLAGS to ASFLAGS.
>
> Signed-off-by: Sachin Monga <smonga@linux.ibm.com>
> ---
> This patch is reg tested.
>  Makeconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Makeconfig b/Makeconfig
> index a2ea4f6a33..5a4cb61aca 100644
> --- a/Makeconfig
> +++ b/Makeconfig
> @@ -1167,9 +1167,9 @@ endif
>  
>  # The assembler can generate debug information too.
>  ifndef ASFLAGS
> -ASFLAGS := $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
> +ASFLAGS := $(filter -g% -fdebug-prefix-map=% -m%,$(CFLAGS))
>  endif
> -override ASFLAGS += -Werror=undef $(ASFLAGS-config) $(asflags-cpu)
> +override ASFLAGS += -Werror=undef $(ASFLAGS-config)
>  
>  move-if-change = $(SHELL) $(..)scripts/move-if-change

Sachin, could you repost with the second change removed, as requested by
Peter?

Thanks,
Florian



More information about the Libc-alpha mailing list