David Woodhouse wrote: > On Sat, 2008-06-14 at 10:56 +0100, Oleg Verych wrote: > > I saw that. My point is pure text processing. But as it seems doing > > `make` is a lot more fun than to do `sh` && `sed`. > > The problem is that it _isn't_ pure text processing. There's more to > building with --combine than that, and we really do want the compiler to > do it. > > _Sometimes_ you can just append C files together and they happen to > work. But not always. A simple case where it fails would be when you > have a static variable with the same name in two different files. I suspect the simplest way to adapt an existing makefile is: 1. Replace each compile command "gcc args... file.c -o file.o" with "gcc -E args... file.c -o file.o.i". 2. Replace each incremental link "ld -r -o foo.o files..." with "cat `echo files... | sed 's/$/.i/'` > foo.o.i". 3. Similar replacement for each "ar" command making .a files. 4. Replace the main link "ld -o vmlinux files..." with "gcc -o vmlinux --combine -fwhole-program `echo files... | sed 's/$/.i/'`". You can do this without changin the Makefile, if you provide suitable scripts on $PATH for the make. -- Jamie -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html