Date: Tue, 24 May 2011 22:41:09 +0200 From: Dimitry Andric <dim@FreeBSD.org> To: Arnaud Lacombe <lacombar@gmail.com> Cc: current@freebsd.org Subject: Re: [PATCH] Fix CFLAGS overwrite by Makefile Message-ID: <4DDC17E5.2020700@FreeBSD.org> In-Reply-To: <1306267772-31084-1-git-send-email-lacombar@gmail.com> References: <1306267772-31084-1-git-send-email-lacombar@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2011-05-24 22:09, Arnaud Lacombe wrote: > Many Makefile (espectially under sys/boot/) overwrite the value of CFLAGS. > This is an issue if you want to generate code for a specific CPU as before the > Makefile is interpreted, CFLAGS might already have been set with CPU specific > settings by<bsd.cpu.mk>, which is source from sys.mk. ... > --- a/sys/boot/i386/boot2/Makefile > +++ b/sys/boot/i386/boot2/Makefile ... The problem with this patch is that for some of the things you fixed, stuff like boot-time programs, you NEVER want any CPU specific settings! You must use the default, lowest common denominator setting instead, or there is no guarantee the boot program will be correct. So that is why these Makefiles purposefully overwrite CFLAGS, it is not by accident. Besides, for space-constrained things like boot2, you might not even be able to compile it when using non-standard settings, since the code might grow too large.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DDC17E5.2020700>