* Support for .S files
@ 2015-09-25 18:52 Sidney Manning
2015-09-25 18:56 ` Rich Felker
0 siblings, 1 reply; 3+ messages in thread
From: Sidney Manning @ 2015-09-25 18:52 UTC (permalink / raw)
To: musl
[-- Attachment #1: Type: text/plain, Size: 580 bytes --]
Clang and gcc do not invoke the preprocessor on files with a lowercase .s
suffix.
The following addition would permit uppercase .S files.
diff --git a/Makefile b/Makefile
index 5a6a43b..66e9f50 100644
--- a/Makefile
+++ b/Makefile
@@ -133,6 +133,9 @@ endif
%.o: $(ARCH)/%.s
$(AS_CMD) $(CFLAGS_ALL_STATIC)
+%.o: $(ARCH)/%.S
+ $(CC) $(CFLAGS_ALL_STATIC) -c -o $@ $<
+
%.o: %.c $(GENH) $(IMPH)
$(CC) $(CFLAGS_ALL_STATIC) -c -o $@ $<
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
The Linux Foundation
[-- Attachment #2: Type: text/html, Size: 3101 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Support for .S files
2015-09-25 18:52 Support for .S files Sidney Manning
@ 2015-09-25 18:56 ` Rich Felker
2015-09-28 13:17 ` Sidney Manning
0 siblings, 1 reply; 3+ messages in thread
From: Rich Felker @ 2015-09-25 18:56 UTC (permalink / raw)
To: musl
On Fri, Sep 25, 2015 at 01:52:26PM -0500, Sidney Manning wrote:
> Clang and gcc do not invoke the preprocessor on files with a lowercase .s
> suffix.
>
> The following addition would permit uppercase .S files.
The intention was to avoid using the preprocessor in asm and having it
become #ifdef hell. This could be revisited (especially now as part of
the arch deduplication/refactoring) but there should first be some
discussion of the motivation (what you want to achieve with it).
Rich
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Support for .S files
2015-09-25 18:56 ` Rich Felker
@ 2015-09-28 13:17 ` Sidney Manning
0 siblings, 0 replies; 3+ messages in thread
From: Sidney Manning @ 2015-09-28 13:17 UTC (permalink / raw)
To: musl
> On Fri, Sep 25, 2015 at 01:52:26PM -0500, Sidney Manning wrote:
> > Clang and gcc do not invoke the preprocessor on files with a lowercase
> > .s suffix.
> >
> > The following addition would permit uppercase .S files.
>
> The intention was to avoid using the preprocessor in asm and having it
> become #ifdef hell. This could be revisited (especially now as part of the
arch
> deduplication/refactoring) but there should first be some discussion of
the
> motivation (what you want to achieve with it).
I was experimenting with some optimized assembly and it substituted #defines
in place of register names. Think, "#define length r2" and such making the
resulting assembly more readable. I had made some missteps with the
Makefile because the files didn't get picked up; only later did I see that
the pattern wasn't in the Makefile.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
The Linux Foundation
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-28 13:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-25 18:52 Support for .S files Sidney Manning
2015-09-25 18:56 ` Rich Felker
2015-09-28 13:17 ` Sidney Manning
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).