Date: Sat, 15 May 2004 03:03:31 +0200 From: platanthera <platanthera@web.de> To: freebsd-questions@freebsd.org Subject: Re: COPTFLAGS (not?) only for compiling the kernel? Message-ID: <200405150303.31682.platanthera@web.de> In-Reply-To: <20040513220325.GC2334@gothmog.gr> References: <200405132329.07892.platanthera@web.de> <20040513220325.GC2334@gothmog.gr>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 14 May 2004 00:03, Giorgos Keramidas wrote: > On 2004-05-13 23:29, platanthera <platanthera@web.de> wrote: > > [/etc/make.conf] > > ... > > # To compile just the kernel with special optimizations, you should > > use # this instead of CFLAGS (which is not applicable to kernel > > builds anyway). # There is very little to gain by using higher > > optimization levels, and doing # so can cause problems. > > # > > COPTFLAGS= [whatever] > > ... > > > > just the kernel... sounds like COPTFLAGS setting should not effect > > world or port builds, but apparently it does. > > Or do I misunderstand something? > > Yes, you do. But I'm sure that you will find the make.conf(5) > manpage very informative and useful. not really. it says ... The /etc/make.conf file is included from the appropriate Makefile which specifies the default settings for all the available options. Options need only be specified in /etc/make.conf when the system administrator wishes to override these defaults. ... and in (/usr/share/examples)/etc/make.conf you can find .. # CFLAGS controls the compiler settings used when compiling C code ... #CFLAGS= -O -pipe ... # To compile just the kernel with special optimizations, you should use # this instead of CFLAGS (which is not applicable to kernel builds anyway). ... #COPTFLAGS= -O -pipe ... to my understanding this explains what CFLAGS/COPTFLAGS are intended for and _implies_ you'd have to uncomment the flag definitions in /etc/make.conf to set them active, otherwise the settings specified in the respective Makefile would be used. I had explicitly specified COPTFLAGS (-O -pipe) but not CFLAGS and saw -O overriding -O2 when compiling a port... quite confusing that uncommenting the example settings in make.conf changes exactly nothing, since these are the (undocumented?) system defaults anyway. probably a doc issue? - or just my stupidity .-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405150303.31682.platanthera>