2006-02-10 21:45:23

by Chuck Ebbert

[permalink] [raw]
Subject: [patch] kbuild: add -fverbose-asm to i386 Makefile

Add -fverbose-asm to i386 Makefile rule for building .s files.
This makes the assembler output much more readable for humans.

Suggested by Der Herr Hofrat <[email protected]>

Signed-off-by: Chuck Ebbert <[email protected]>

--- 2.6.16-rc2-mm1-32s.orig/scripts/Makefile.build
+++ 2.6.16-rc2-mm1-32s/scripts/Makefile.build
@@ -129,7 +129,7 @@ $(multi-objs-y:.o=.s) : modname = $(mo
$(multi-objs-y:.o=.lst) : modname = $(modname-multi)

quiet_cmd_cc_s_c = CC $(quiet_modtag) $@
-cmd_cc_s_c = $(CC) $(c_flags) -S -o $@ $<
+cmd_cc_s_c = $(CC) $(c_flags) -fverbose-asm -S -o $@ $<

%.s: %.c FORCE
$(call if_changed_dep,cc_s_c)
--
Chuck
"Equations are the Devil's sentences." --Stephen Colbert


2006-02-12 09:41:37

by Andrew Morton

[permalink] [raw]
Subject: Re: [patch] kbuild: add -fverbose-asm to i386 Makefile

Chuck Ebbert <[email protected]> wrote:
>
> Add -fverbose-asm to i386 Makefile rule for building .s files.
> This makes the assembler output much more readable for humans.

Well that's nice.

btw, is something up with `make foo.lst'? It hasn't worked for me for some
time.

bix:/usr/src/25> make mm/vmscan.lst
MKLST mm/vmscan.lst
BFD: Dwarf Error: Abbrev offset (3222602516) greater than or equal to .debug_abbrev size (1412).

That's with a fairly crufty old toolchain: gcc-3.3.2,
binutils-2.14.90.0.6-4. It works OK with more contemporary toolchains.

<checks>

Actually, no, the generated .lst file is wrong and basically useless.

It'd be nice to have the -fverbose-asm output appear in the .lst file too,
but it looks like you didn't patch the right thing to make that happen.