Subject: Re: kern/21311: Generic kernel doesnt compile in 1.6.1_STABLE
To: Lubomir Sedlacik <salo@Xtrmntr.org>
From: Mipam <mipam@ibb.net>
List: netbsd-bugs
Date: 04/25/2003 00:49:41
On Fri, Apr 25, 2003 at 12:32:22AM +0200, Lubomir Sedlacik wrote:
> hi,
>
> On Thu, Apr 24, 2003 at 11:59:08PM +0200, Mipam wrote:
> >
> > I used for the pkgsrc CFLAGS+= -pipe and for the kernel and userland
> > COPTS+= -pipe so that the normal options arent changed but just -pipe
> > is added, at least thats what i think. So ... it means that in the
> > default compilation -O2 is omitted as well? Weird though .... Or does
> > this mean someting goes wrong with += and the options are replaced
> > instead of -pipe is been added?
>
> if you look into /usr/share/mk/sys.mk, you will see that CFLAGS is set
> to DBG (which is set to "-O2" on i386) only if not previously defined.
> since you set it to "-pipe" already the "-O2" is never appended. you
> need to set CFLAGS to "-pipe -O2" in mk.conf.
I saw it, but i think something needs to change then.
Then what is the difference between setting: CFLAGS+= -pipe
and CFLAGS=-pipe ??
Same for COPTS?
I thought .... += means to add and = means to set.
What you tell me now is that it makes no difference anyway.
Both += and = SETS the options. So it makes me wonder again,
whats the use of += anyway if the options are set by += instead
of adding something above the by default defined options
like -O2 in sys.mk for example?
Bye,
Mipam.