bsd.cpu.mk (176776) | bsd.cpu.mk (177385) |
---|---|
1# $FreeBSD: head/share/mk/bsd.cpu.mk 176776 2008-03-03 20:40:20Z raj $ | 1# $FreeBSD: head/share/mk/bsd.cpu.mk 177385 2008-03-19 12:20:44Z imp $ |
2 3# Set default CPU compile flags and baseline CPUTYPE for each arch. The 4# compile flags must support the minimum CPU type for each architecture but 5# may tune support for more advanced processors. 6 7.if !defined(CPUTYPE) || empty(CPUTYPE) 8_CPUCFLAGS = 9. if ${MACHINE_ARCH} == "i386" 10MACHINE_CPU = i486 11. elif ${MACHINE_ARCH} == "amd64" 12MACHINE_CPU = amd64 sse2 sse 13. elif ${MACHINE_ARCH} == "ia64" 14MACHINE_CPU = itanium 15. elif ${MACHINE_ARCH} == "powerpc" 16MACHINE_CPU = aim 17. elif ${MACHINE_ARCH} == "sparc64" 18. elif ${MACHINE_ARCH} == "arm" 19MACHINE_CPU = arm | 2 3# Set default CPU compile flags and baseline CPUTYPE for each arch. The 4# compile flags must support the minimum CPU type for each architecture but 5# may tune support for more advanced processors. 6 7.if !defined(CPUTYPE) || empty(CPUTYPE) 8_CPUCFLAGS = 9. if ${MACHINE_ARCH} == "i386" 10MACHINE_CPU = i486 11. elif ${MACHINE_ARCH} == "amd64" 12MACHINE_CPU = amd64 sse2 sse 13. elif ${MACHINE_ARCH} == "ia64" 14MACHINE_CPU = itanium 15. elif ${MACHINE_ARCH} == "powerpc" 16MACHINE_CPU = aim 17. elif ${MACHINE_ARCH} == "sparc64" 18. elif ${MACHINE_ARCH} == "arm" 19MACHINE_CPU = arm |
20. elif ${MACHINE_ARCH} == "mips" 21MACHINE_CPU = mips |
|
20. endif 21.else 22 23# Handle aliases (not documented in make.conf to avoid user confusion 24# between e.g. i586 and pentium) 25 26. if ${MACHINE_ARCH} == "i386" 27. if ${CPUTYPE} == "nocona" --- 32 unchanged lines hidden (view full) --- 60 61############################################################################### 62# Logic to set up correct gcc optimization flag. This must be included 63# after /etc/make.conf so it can react to the local value of CPUTYPE 64# defined therein. Consult: 65# http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html 66# http://gcc.gnu.org/onlinedocs/gcc/IA-64-Options.html 67# http://gcc.gnu.org/onlinedocs/gcc/RS-6000-and-PowerPC-Options.html | 22. endif 23.else 24 25# Handle aliases (not documented in make.conf to avoid user confusion 26# between e.g. i586 and pentium) 27 28. if ${MACHINE_ARCH} == "i386" 29. if ${CPUTYPE} == "nocona" --- 32 unchanged lines hidden (view full) --- 62 63############################################################################### 64# Logic to set up correct gcc optimization flag. This must be included 65# after /etc/make.conf so it can react to the local value of CPUTYPE 66# defined therein. Consult: 67# http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html 68# http://gcc.gnu.org/onlinedocs/gcc/IA-64-Options.html 69# http://gcc.gnu.org/onlinedocs/gcc/RS-6000-and-PowerPC-Options.html |
70# http://gcc.gnu.org/onlinedocs/gcc/MIPS-Options.html |
|
68# http://gcc.gnu.org/onlinedocs/gcc/SPARC-Options.html 69# http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86-64-Options.html 70 71. if ${MACHINE_ARCH} == "i386" 72. if ${CPUTYPE} == "crusoe" 73_CPUCFLAGS = -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0 74. elif ${CPUTYPE} == "k5" 75_CPUCFLAGS = -march=pentium --- 35 unchanged lines hidden (view full) --- 111. else 112_CPUCFLAGS = -mcpu=${CPUTYPE} 113. endif 114. elif ${MACHINE_ARCH} == "powerpc" 115. if ${CPUTYPE} == "e500" 116MACHINE_CPU = booke 117_CPUCFLAGS = -Wa,-me500 -msoft-float 118. endif | 71# http://gcc.gnu.org/onlinedocs/gcc/SPARC-Options.html 72# http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86-64-Options.html 73 74. if ${MACHINE_ARCH} == "i386" 75. if ${CPUTYPE} == "crusoe" 76_CPUCFLAGS = -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0 77. elif ${CPUTYPE} == "k5" 78_CPUCFLAGS = -march=pentium --- 35 unchanged lines hidden (view full) --- 114. else 115_CPUCFLAGS = -mcpu=${CPUTYPE} 116. endif 117. elif ${MACHINE_ARCH} == "powerpc" 118. if ${CPUTYPE} == "e500" 119MACHINE_CPU = booke 120_CPUCFLAGS = -Wa,-me500 -msoft-float 121. endif |
122. elif ${MACHINE_ARCH} == "mips" 123. if ${CPUTYPE} == "mips32" 124_CPUCFLAGS = -march=mips32 125. elif ${CPUTYPE} == "mips32r2" 126_CPUCFLAGS = -march=mips32r2 127. elif ${CPUTYPE} == "mips64" 128_CPUCFLAGS = -march=mips64 129. elif ${CPUTYPE} == "mips64r2" 130_CPUCFLAGS = -march=mips64r2 131. elif ${CPUTYPE} == "mips4kc" 132_CPUCFLAGS = -march=4kc 133. elif ${CPUTYPE} == "mips24kc" 134_CPUCFLAGS = -march=24kc 135. endif |
|
119. endif 120 121# Set up the list of CPU features based on the CPU type. This is an 122# unordered list to make it easy for client makefiles to test for the 123# presence of a CPU feature. 124 125. if ${MACHINE_ARCH} == "i386" 126. if ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" --- 49 unchanged lines hidden (view full) --- 176.endif 177 178.if ${MACHINE_ARCH} == "arm" && defined(TARGET_BIG_ENDIAN) 179CFLAGS += -mbig-endian 180LDFLAGS += -mbig-endian 181LD += -EB 182.endif 183 | 136. endif 137 138# Set up the list of CPU features based on the CPU type. This is an 139# unordered list to make it easy for client makefiles to test for the 140# presence of a CPU feature. 141 142. if ${MACHINE_ARCH} == "i386" 143. if ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" --- 49 unchanged lines hidden (view full) --- 193.endif 194 195.if ${MACHINE_ARCH} == "arm" && defined(TARGET_BIG_ENDIAN) 196CFLAGS += -mbig-endian 197LDFLAGS += -mbig-endian 198LD += -EB 199.endif 200 |
201.if ${MACHINE_ARCH} == "mips" 202. if defined(TARGET_BIG_ENDIAN) 203CFLAGS += -EB 204LDFLAGS += -Wl,-EB 205LD += -EB 206. else 207CFLAGS += -EL 208LDFLAGS += -Wl,-EL 209LD += -EL 210. endif 211CFLAGS += -msoft-float -G0 -mno-dsp -mabicalls 212.endif 213 |
|
184# NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk 185 186.if !defined(NO_CPU_CFLAGS) 187. if ${CC} == "icc" 188CFLAGS += ${_ICC_CPUCFLAGS} 189. else 190CFLAGS += ${_CPUCFLAGS} 191. endif 192.endif | 214# NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk 215 216.if !defined(NO_CPU_CFLAGS) 217. if ${CC} == "icc" 218CFLAGS += ${_ICC_CPUCFLAGS} 219. else 220CFLAGS += ${_CPUCFLAGS} 221. endif 222.endif |