Support compiling .S files with additional options

Message ID 20240225122203.3253911-1-hjl.tools@gmail.com
State Committed
Commit c503c2603c230005f5af40d14494c427f61b0160
Headers
Series Support compiling .S files with additional options |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
redhat-pt-bot/TryBot-32bit success Build for i686
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 warning Patch is already merged
linaro-tcwg-bot/tcwg_glibc_build--master-arm warning Patch is already merged

Commit Message

H.J. Lu Feb. 25, 2024, 12:22 p.m. UTC
  Add $(sysdep-ASFLAGS) $(ASFLAGS-$(<F)) $(ASFLAGS-$(@F)) to compile.S and
COMPILE.S to support compiling .S files with additional options.
---
 Makerules | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
  

Comments

Sunil Pandey Feb. 25, 2024, 2:27 p.m. UTC | #1
On Sun, Feb 25, 2024 at 4:22 AM H.J. Lu <hjl.tools@gmail.com> wrote:

> Add $(sysdep-ASFLAGS) $(ASFLAGS-$(<F)) $(ASFLAGS-$(@F)) to compile.S and
> COMPILE.S to support compiling .S files with additional options.
> ---
>  Makerules | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/Makerules b/Makerules
> index 00365bc58b..275110dda8 100644
> --- a/Makerules
> +++ b/Makerules
> @@ -447,10 +447,12 @@ native-compile-mkdep-flags = -MMD -MP -MF $@.dt -MT
> $@
>  compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
>  compile.cc = $(CXX) $< -c $(CXXFLAGS) $(CPPFLAGS)
>  compile.S = $(CC) $< -c $(CPPFLAGS) $(S-CPPFLAGS) \
> -                 $(ASFLAGS) $(ASFLAGS-$(suffix $@))
> +                 $(ASFLAGS) $(ASFLAGS-$(suffix $@)) $(sysdep-ASFLAGS) \
> +                 $(ASFLAGS-$(<F)) $(ASFLAGS-$(@F))
>  COMPILE.c = $(CC) -c $(CFLAGS) $(CPPFLAGS)
>  COMPILE.S = $(CC) -c $(CPPFLAGS) $(S-CPPFLAGS) \
> -                 $(ASFLAGS) $(ASFLAGS-$(suffix $@))
> +                 $(ASFLAGS) $(ASFLAGS-$(suffix $@)) $(sysdep-ASFLAGS) \
> +                 $(ASFLAGS-$(<F)) $(ASFLAGS-$(@F))
>
>  # We need this for the output to go in the right place.  It will default
> to
>  # empty if make was configured to work with a cc that can't grok -c and -o
> --
> 2.43.2
>

LGTM
  

Patch

diff --git a/Makerules b/Makerules
index 00365bc58b..275110dda8 100644
--- a/Makerules
+++ b/Makerules
@@ -447,10 +447,12 @@  native-compile-mkdep-flags = -MMD -MP -MF $@.dt -MT $@
 compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
 compile.cc = $(CXX) $< -c $(CXXFLAGS) $(CPPFLAGS)
 compile.S = $(CC) $< -c $(CPPFLAGS) $(S-CPPFLAGS) \
-		  $(ASFLAGS) $(ASFLAGS-$(suffix $@))
+		  $(ASFLAGS) $(ASFLAGS-$(suffix $@)) $(sysdep-ASFLAGS) \
+		  $(ASFLAGS-$(<F)) $(ASFLAGS-$(@F))
 COMPILE.c = $(CC) -c $(CFLAGS) $(CPPFLAGS)
 COMPILE.S = $(CC) -c $(CPPFLAGS) $(S-CPPFLAGS) \
-		  $(ASFLAGS) $(ASFLAGS-$(suffix $@))
+		  $(ASFLAGS) $(ASFLAGS-$(suffix $@)) $(sysdep-ASFLAGS) \
+		  $(ASFLAGS-$(<F)) $(ASFLAGS-$(@F))
 
 # We need this for the output to go in the right place.  It will default to
 # empty if make was configured to work with a cc that can't grok -c and -o