Skip to contentSkip to conversation

eliminate -pipe from kernel compile

DISCUSSION Lance Tagliapietra 3 participants 4 messages May 11, 2009 – May 14, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

Hello,

I was noticing that kernel compiling is set up to have gcc pipe data from one pass to another, instead of using temporary files. On a memory constrained environment, this may not be the best idea (or at least I'd like to explore that idea). Instead of loading the assember, and having immediately being swapped out while the cc1 pass runs, it may make more sense to have the temp files being written, instead of the swap in and out, when compiling the various objects of the kernel.

So, simply pulling out the -pipe from the compiler flag list didn't see to have the desired effect. I'm afraid I'm still missing something. I'm still observing the assembler being loaded.

Thoughts?

Thanks,

--Lance

#1 lore raw

Added linux-kbuild

Quoted 10 lines · Lance Tagliapietra

I was noticing that kernel compiling is set up to have gcc pipe data from one pass to another, instead of using temporary files.  On a memory constrained environment, this may not be the best idea (or at least I'd like to explore that idea).  Instead of loading the assember, and having immediately being swapped out while the cc1 pass runs, it may make more sense to have the temp files being written, instead of the swap in and out, when compiling the various objects of the kernel.

So, simply pulling out the -pipe from the compiler flag list didn't see to have the desired effect.  I'm afraid I'm still missing something.  I'm still observing the assembler being loaded.

Thoughts?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 11 lines · Geert Uytterhoeven

Added linux-kbuild

Quoted 8 lines · Lance Tagliapietra

I was noticing that kernel compiling is set up to have gcc pipe data from one pass to another, instead of using temporary files.  On a memory constrained environment, this may not be the best idea (or at least I'd like to explore that idea).  Instead of loading the assember, and having immediately being swapped out while the cc1 pass runs, it may make more sense to have the temp files being written, instead of the swap in and out, when compiling the various objects of the kernel.

So, simply pulling out the -pipe from the compiler flag list didn't see to have the desired effect.  I'm afraid I'm still missing something.  I'm still observing the assembler being loaded.

1) How did you "pulling out the -pipe from the compiler flag list"? Please show this as a patch.

2) Did you verify that -pipe was used before and no more after your changes?
Hint - use "make V=1" to see all command line options to gcc

Sam

#3 lore raw

Hello,

I just completed a test build with my patch to arch/m68k/Makefile to remove the -pipe flag (see patch below). Watching the build confirmed that a) -pipe was no longer showing up in the gcc command lines and b) temporary files were being created as expected without pipe; and c) the as command was not loaded waiting for cc1 to complete. Yea! The /arch/m68k/Makefile is the only place where the -pipe flag is located, and that seems to be the place for all arch's.

m68k/Makefile renamed from m68k/Makefile.old +3 -1
@@ -33,7 +33,9 @@
 CHECKFLAGS += -D__mc68000__
 
 # without -fno-strength-reduce the 53c7xx.c driver fails ;-(
-KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
+# delete -pipe to save RAM / minimize swap during compile
+# original: KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
+KBUILD_CFLAGS += -fno-strength-reduce -ffixed-a2
 
 # enable processor switch if compiled only for a single cpu
 ifndef CONFIG_M68020

Pulling out the -pipe does seem to cut compile time. I am working on hard numbers.

--Lance

Quoted 21 lines · Sam Ravnborg
Quoted 11 lines · Geert Uytterhoeven

Added linux-kbuild

Quoted 8 lines · Lance Tagliapietra

I was noticing that kernel compiling is set up to have gcc pipe data from one pass to another, instead of using temporary files. ?On a memory constrained environment, this may not be the best idea (or at least I'd like to explore that idea). ?Instead of loading the assember, and having immediately being swapped out while the cc1 pass runs, it may make more sense to have the temp files being written, instead of the swap in and out, when compiling the various objects of the kernel.

So, simply pulling out the -pipe from the compiler flag list didn't see to have the desired effect. ?I'm afraid I'm still missing something. ?I'm still observing the assembler being loaded.

1) How did you "pulling out the -pipe from the compiler flag list"? Please show this as a patch.

2) Did you verify that -pipe was used before and no more after your changes?
Hint - use "make V=1" to see all command line options to gcc

Sam