Best way to override user's CFLAGS in a port?

horio shoichi bugsgrief at bugsgrief.net
Tue Sep 7 17:26:21 PDT 2004


On Tue, 07 Sep 2004 09:24:58 -0700 (PDT)
John Polstra <jdp at polstra.com> wrote:
> The ezm3 port has to be built with an optimization level of -O, and
> that's not likely to change any time soon.  Some users, especially
> users of -current where -O2 is officially supported, are getting
> burned by that.  What is the best way for me to change the ezm3 port's
> Makefile so that -O will be used regardless of the user's environment
> or /etc/make.conf settings?
> 
> Thanks,
> John
> _______________________________________________
> freebsd-ports at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe at freebsd.org"
> 

This is on 4.9-STABLE.

man gcc says:

              If  you  use multiple -O options, with or without level numbers,
              the last such option is the one that is effective.

So,

	CFLAGS	+= -O

would work.



horio shoichi



More information about the freebsd-ports mailing list