summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 301ac38)
raw | patch | inline | side by side (parent: 301ac38)
author | Linus Torvalds <torvalds@linux-foundation.org> | |
Wed, 30 May 2007 17:42:41 +0000 (10:42 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 10 Jun 2007 22:15:17 +0000 (15:15 -0700) |
In the kernel we have a rule for *.c -> *.s files exactly because
it's nice to be able to easily say "ok, what does that generate".
Here's a patch to add such a rule to git too, in case anybody is
interested. It makes it much simpler to just do
make sha1_file.s
and look at the compiler-generated output that way, rather than having to
fire up gdb on the resulting binary.
(Add -fverbose-asm or something if you want to, it can make the result
even more readable)
[jc: add *.s to .gitignore]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
it's nice to be able to easily say "ok, what does that generate".
Here's a patch to add such a rule to git too, in case anybody is
interested. It makes it much simpler to just do
make sha1_file.s
and look at the compiler-generated output that way, rather than having to
fire up gdb on the resulting binary.
(Add -fverbose-asm or something if you want to, it can make the result
even more readable)
[jc: add *.s to .gitignore]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.gitignore | patch | blob | history | |
Makefile | patch | blob | history |
diff --git a/.gitignore b/.gitignore
index 27e5aeb8a078a1bac61ce207e56338881ae57a07..bd49cd4627a786d6dbcd7f0d17f0fddc2add7014 100644 (file)
--- a/.gitignore
+++ b/.gitignore
*.deb
git-core.spec
*.exe
-*.[ao]
+*.[aos]
*.py[co]
config.mak
autom4te.cache
diff --git a/Makefile b/Makefile
index 0f7595552d6b13c3dda425ab4240cfb75ca4bea7..30a405292215acc4a4520e87a8c10bd7a9284a98 100644 (file)
--- a/Makefile
+++ b/Makefile
%.o: %.c GIT-CFLAGS
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
+%.s: %.c GIT-CFLAGS
+ $(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $<
%.o: %.S
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<