On 9/15/07, Dan Nicholson <[EMAIL PROTECTED]> wrote:
> On 9/15/07, Jeremy Huntwork <[EMAIL PROTECTED]> wrote:
> >
> > I suppose it might be possible to introduce the -march flag to CFLAGS
> > without specifying the whole of CFLAGS on the command line... I'll take
> > a look.
>
> For LFS, I think it would be better if we just `sed' the -march into
> the appropriate default. I'd rather avoid the whole '-O2 -pipe' part,
> even though those are obviously very sane flags. Since I've done squat
> lately, I'm gonna take a quick look at this.

I'm pretty sure that the default CFLAGS are set during the AC_PROG_CC
autoconf macro. So, we could either add our own customized macro and
rebuild the autotools, or just hack the already generated configure
script. This seems to work (I just did a successful build):

sed -i.bak 's/CFLAGS=.*-O2/& -march=i486/' configure

And now I can see what Greg and Jeremy are talking about where you
don't want the -march populating all calls to $CC (as would happen
with CC="gcc -march=i486" or by making that the default with
--with-arch=i486 to gcc). Glibc seems to have a whole raft of ways it
wants to use the compiler. They also have some, uh, creative use of
GNU make.

--
Dan
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to