public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Support compiling .S files with additional options
@ 2024-02-25 12:22 H.J. Lu
  2024-02-25 14:27 ` Sunil Pandey
  0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2024-02-25 12:22 UTC (permalink / raw)
  To: libc-alpha

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Support compiling .S files with additional options
  2024-02-25 12:22 [PATCH] Support compiling .S files with additional options H.J. Lu
@ 2024-02-25 14:27 ` Sunil Pandey
  0 siblings, 0 replies; 2+ messages in thread
From: Sunil Pandey @ 2024-02-25 14:27 UTC (permalink / raw)
  To: H.J. Lu; +Cc: libc-alpha

[-- Attachment #1: Type: text/plain, Size: 1329 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-25 14:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-25 12:22 [PATCH] Support compiling .S files with additional options H.J. Lu
2024-02-25 14:27 ` Sunil Pandey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).