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

Charles Swiger cswiger at
Tue Sep 7 12:49:20 PDT 2004

On Sep 7, 2004, at 2:47 PM, John Polstra wrote:
[ ...Oliver's comments about handling CFLAGS... ]
> I'm afraid if I do that, I'll get even more bug reports.  More and
> more -current users are adding -O2 to their CFLAGS in /etc/make.conf.
> Surely all of them would prefer having the port build properly than
> having it fail intentionally.

Users would prefer the software to build properly, so yes, doing 
something to switch -Ox to plain -O is better than marking the port 

I don't think that changing a specific flag in a port which needs to do 
so is unreasonable, but I dislike the notion of second-guessing the 
end-user.  The whole point of preserving CFLAGS set in /etc/make.conf 
or via the environment is to make it easy for people to build all of 
the software using whatever flags they want.

Can we help you fix the issues with ezm3 when compiled with -O2, rather 
than figuring ways to hack CFLAGS...?


More information about the freebsd-ports mailing list