args to `make` within the ports tree
Russell Meek
russell at russellmeek.net
Wed Nov 23 20:58:04 GMT 2005
Roland Smith wrote:
>On Wed, Nov 23, 2005 at 10:50:19AM -0500, Mike Hernandez wrote:
>
>
>>On Wed, Nov 23, 2005 at 06:35:13PM +0300, Odhiambo Washington wrote:
>>
>>
>>>There appears to be so many arguments to `make` when compiling
>>>applications fro the ports tree.
>>>What beats me is where they are documented ;)
>>>
>>>
>>/etc/make.conf?
>>
>>
>
>Try /usr/ports/KNOBS for the most common ones, and the Makefile of each
>port for specific ones.
>
>Roland
>
>
Many ports fail if you try to use extravagant make flags like what you
would use with Gentoo.
The ones that I use for the most optimal performance are:
*CPUTYPE?=* (Enter your CPUTYPE here, ex. prescott, p4, etc.)
*CFLAGS= -O -PIPE*
*COPTFLAGS= -O -PIPE*
Place a space between the *=* and your options.
These are systemwide commands that all ports will use during the build
process.
*CPUTYPE?=*
An command for applications to be built with code optimizations for your
CPU type, refer to the FreeBSD handbook for the different types available.
The most common entries are *p4* if you have a Generic Pentium 4
(Northwood, etc) or *prescott* if you are using a P4 Prescott model
processor.
There are many for AMD also, these are listed in the handbook.
*CFLAGS= -O -PIPE*
Command optimizations for the GNU C compiler, -O and -PIPE I believe are
standard for FreeBSD 6 Release, however I still include them in my
Make.conf. -O2 / -O3 are additional options you can use instead of -O,
however it is not recommended. I have used -O2 without any issues when
building from ports, however I have noticed no difference between -O and
-O2.
*-O* sets the optimization level, in this case 1.
*- PIPE* causes code to be passed between processes using pipes during
compilation rather than using temporary files, which has obvious I/O
advantages.
*COPTFLAGS= -O -PIPE*
Optimizational flags used when compiling your kernel, again I stick to
what works -O and -PIPE. I have noticed no breakage when using -O2, but
then again I have noticed no performance increase on my servers either.
If you are just looking for some quick tweaks, these should set you on
the right track.
Thanks,
Russell
More information about the freebsd-questions
mailing list