Does EasyLFS detect what type of CPU I have and set CFLAGS to optimize for that? If not, could I set CFLAGS before the build or will the scripts change that?
As far as I remember I don't use any CFLAGS, CPPFLAGS or LDFLAGS throughout the scripts.
Though as far as I see everything is built for the correct architecture, which is i686 for my box, and was i586 on my old notebook. So I guess the configure-scripts already pretty much handle this.
TBuitenh is is talking about optimization for a specific processor like k8, not a processor family like x86_64. For this, -march=processor-type needs to go into the CFLAGS (there is also -mcpu â€” the difference is that something compiles with -mcpu=pentium4 will run on an AMD K6 as well, for instance, just not as much faster.
I haven't worked with these things too much yet. Usually I just use these flags to add library-locations for the compiler/linker when the libraries are there but for some reason not found.
As said, it might be possible to use them, though i haven't tested it.