|
ru.unix.bsd- RU.UNIX.BSD ------------------------------------------------------------------ From : Kuziakin F.S. 2:5020/400 03 Apr 2003 23:01:58 To : All Subject : Опции компилятора -------------------------------------------------------------------------------- Hello, All! Тут как-то пролетало насчет опций gcc CFLAGS= -O2 -march=<cpu>. Почитал я etc/defaults/make.conf, и подумалось, что если его поместить в etc/make.conf с включенными такими опциями, то он будет отрабатывать их и включать при каждом make install. Я прав? Вот на ваше усмотрение созданный etc/make.conf: ----------------------------------------------------- # The CPUTYPE variable controls which processor should be targeted for # generated code. This controls processor-specific optimizations in # certain code (currently only OpenSSL) as well as modifying the value # of CFLAGS to contain the appropriate optimization directive to gcc. # The automatic setting of CFLAGS may be overridden using the # NO_CPU_CFLAGS variable below. # Currently the following CPU types are recognized: # Intel x86 architecture: # (AMD CPUs) k7 k6-2 k6 k5 # (Intel CPUs) p4 p3 p2 i686 i586/mmx i586 i486 i386 # Alpha/AXP architecture: ev6 pca56 ev56 ev5 ev45 ev4 CPUTYPE=p3 #процессор - celeron2 #NO_CPU_CFLAGS= true # Don't add -march=<cpu> to CFLAGS automatically #NO_CPU_COPTFLAGS=true # Don't add -march=<cpu> to COPTFLAGS automatically # # CFLAGS controls the compiler settings used when compiling C code. # Note that optimization settings above -O (-O2, ...) are not recommended # or supported for compiling the world or the kernel - please revert any # nonstandard optimization settings to "-O" before submitting bug reports # to the developers. CFLAGS= -O2 -pipe # BDECFLAGS are a set of gcc warning settings that Bruce Evans has suggested # for use in developing FreeBSD and testing changes. They can be used by # putting "CFLAGS+=${BDECFLAGS}" in /etc/make.conf. -Wconversion is not # included here due to compiler bugs, e.g., mkdir()'s mode_t argument. BDECFLAGS= -W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align \ -Wcast-qual -Wchar-subscripts -Winline \ -Wmissing-prototypes -Wnested-externs -Wpointer-arith \ -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings # To compile just the kernel with special optimizations, you should use # this instead of CFLAGS (which is not applicable to kernel builds anyway). # There is very little to gain by using higher optimization levels, and doing # so can cause problems. COPTFLAGS= -O -pipe ----------------------------------------------------- Как считаете? Прокатит? Hе придется каждый раз при make install их включать руками? Кстати, как это сделать?(В смысле, формат комстроки включения опций -O2 -march=<cpu> для make install). With best regards, Kuziakin F.S. --- ifmail v.2.15dev5 * Origin: "MTU-Intel ISP" (2:5020/400) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.unix.bsd/912241fa9bf9.html, оценка из 5, голосов 10
|