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

Michael Nottebrock michaelnottebrock at
Wed Sep 8 09:09:10 PDT 2004

On Wednesday 08 September 2004 15:12, Matthias Andree wrote:
> John Polstra <jdp at> writes:
> > I'm afraid if I do that, I'll get even more bug reports.
> Likely, because it tells the user what NOT to do,
> but does not tell him what to do, and he'll inquire about that.
> The BROKEN message should print that the user must use -O1 rather than
> -O2 or -O3 for this particular port.
> Note that "-O." isn't a sufficient regexp, some users use -O99 which,
> when it becomes -O19 or -O9 still hoses the build of the b0rked
> application.
> How about:


If it's so well known that -O higher than 1 will not work, the upstream source 
should be modified to that -O will be appended to any CFLAGS, thus overriding 
any user-specified optimization setting.

   ,_,   | Michael Nottebrock               | lofi at
 (/^ ^\) | FreeBSD - The Power to Serve     |
   \u/   | K Desktop Environment on FreeBSD |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-ports mailing list