bsd.cpu.mk (100772) | bsd.cpu.mk (100773) |
---|---|
1# $FreeBSD: head/share/mk/bsd.cpu.mk 100772 2002-07-27 22:04:05Z jhb $ | 1# $FreeBSD: head/share/mk/bsd.cpu.mk 100773 2002-07-27 22:15:42Z jhb $ |
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) | 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) |
8.if ${MACHINE_ARCH} == "i386" | 8. if ${MACHINE_ARCH} == "i386" |
9_CPUCFLAGS = -mcpu=pentiumpro 10CPUTYPE = i386 | 9_CPUCFLAGS = -mcpu=pentiumpro 10CPUTYPE = i386 |
11.elif ${MACHINE_ARCH} == "alpha" | 11. elif ${MACHINE_ARCH} == "alpha" |
12_CPUCFLAGS = -mcpu=ev4 -mtune=ev5 13CPUTYPE = ev4 | 12_CPUCFLAGS = -mcpu=ev4 -mtune=ev5 13CPUTYPE = ev4 |
14.elif ${MACHINE_ARCH} == "ia64" | 14. elif ${MACHINE_ARCH} == "ia64" |
15_CPUCFLAGS = 16CPUTYPE = itanium | 15_CPUCFLAGS = 16CPUTYPE = itanium |
17.elif ${MACHINE_ARCH} == "sparc64" | 17. elif ${MACHINE_ARCH} == "sparc64" |
18_CPUCFLAGS = 19CPUTYPE = ultrasparc | 18_CPUCFLAGS = 19CPUTYPE = ultrasparc |
20.endif | 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 | 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} == "pentiumpro" | 26. if ${MACHINE_ARCH} == "i386" 27. if ${CPUTYPE} == "pentiumpro" |
28CPUTYPE = i686 | 28CPUTYPE = i686 |
29. elif ${CPUTYPE} == "pentium" | 29. elif ${CPUTYPE} == "pentium" |
30CPUTYPE = i586 | 30CPUTYPE = i586 |
31. elif ${CPUTYPE} == "athlon" | 31. elif ${CPUTYPE} == "athlon" |
32CPUTYPE = k7 | 32CPUTYPE = k7 |
33. endif |
|
33. endif | 34. endif |
34.endif | |
35 36# Logic to set up correct gcc optimization flag. This must be included 37# after /etc/make.conf so it can react to the local value of CPUTYPE 38# defined therein. Consult: 39# http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86-64-Options.html 40# http://gcc.gnu.org/onlinedocs/gcc/DEC-Alpha-Options.html 41# http://gcc.gnu.org/onlinedocs/gcc/SPARC-Options.html 42# http://gcc.gnu.org/onlinedocs/gcc/RS-6000-and-PowerPC-Options.html 43 | 35 36# Logic to set up correct gcc optimization flag. This must be included 37# after /etc/make.conf so it can react to the local value of CPUTYPE 38# defined therein. Consult: 39# http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86-64-Options.html 40# http://gcc.gnu.org/onlinedocs/gcc/DEC-Alpha-Options.html 41# http://gcc.gnu.org/onlinedocs/gcc/SPARC-Options.html 42# http://gcc.gnu.org/onlinedocs/gcc/RS-6000-and-PowerPC-Options.html 43 |
44.if !defined(NO_CPU_CFLAGS) || !defined(NO_CPU_COPTFLAGS) | |
45. if ${MACHINE_ARCH} == "i386" 46. if ${CPUTYPE} == "k7" 47. if defined(BOOTSTRAPPING) 48_CPUCFLAGS = -march=k6 # gcc 2.95.x didn't support athlon 49. else 50_CPUCFLAGS = -march=athlon 51. endif 52. elif ${CPUTYPE} == "k6-2" --- 28 unchanged lines hidden (view full) --- 81_CPUCFLAGS = -mcpu=ev5 82. elif ${CPUTYPE} == "ev45" 83_CPUCFLAGS = -mcpu=ev4 # No -mcpu=ev45 for gcc 84. elif ${CPUTYPE} == "ev4" 85_CPUCFLAGS = -mcpu=ev4 86. endif 87. endif 88.endif | 44. if ${MACHINE_ARCH} == "i386" 45. if ${CPUTYPE} == "k7" 46. if defined(BOOTSTRAPPING) 47_CPUCFLAGS = -march=k6 # gcc 2.95.x didn't support athlon 48. else 49_CPUCFLAGS = -march=athlon 50. endif 51. elif ${CPUTYPE} == "k6-2" --- 28 unchanged lines hidden (view full) --- 80_CPUCFLAGS = -mcpu=ev5 81. elif ${CPUTYPE} == "ev45" 82_CPUCFLAGS = -mcpu=ev4 # No -mcpu=ev45 for gcc 83. elif ${CPUTYPE} == "ev4" 84_CPUCFLAGS = -mcpu=ev4 85. endif 86. endif 87.endif |
89.endif | |
90 91# NB: COPTFLAGS is handled in /usr/src/sys/conf/Makefile.<arch> 92 93.if !defined(NO_CPU_CFLAGS) 94CFLAGS += ${_CPUCFLAGS} 95.endif 96 97# Set up the list of CPU features based on the CPU type. This is an --- 48 unchanged lines hidden --- | 88 89# NB: COPTFLAGS is handled in /usr/src/sys/conf/Makefile.<arch> 90 91.if !defined(NO_CPU_CFLAGS) 92CFLAGS += ${_CPUCFLAGS} 93.endif 94 95# Set up the list of CPU features based on the CPU type. This is an --- 48 unchanged lines hidden --- |