Deleted Added
full compact
bsd.cpu.mk (136606) bsd.cpu.mk (136607)
1# $FreeBSD: head/share/mk/bsd.cpu.mk 136606 2004-10-17 05:08:29Z obrien $
1# $FreeBSD: head/share/mk/bsd.cpu.mk 136607 2004-10-17 05:19:45Z obrien $
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"

--- 10 unchanged lines hidden (view full) ---

20MACHINE_CPU = arm
21. endif
22.else
23
24# Handle aliases (not documented in make.conf to avoid user confusion
25# between e.g. i586 and pentium)
26
27. if ${MACHINE_ARCH} == "i386"
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"

--- 10 unchanged lines hidden (view full) ---

20MACHINE_CPU = arm
21. endif
22.else
23
24# Handle aliases (not documented in make.conf to avoid user confusion
25# between e.g. i586 and pentium)
26
27. if ${MACHINE_ARCH} == "i386"
28. if ${CPUTYPE} == "p4"
28. if ${CPUTYPE} == "nocona"
29CPUTYPE = prescott
30. elif ${CPUTYPE} == "p4"
29CPUTYPE = pentium4
30. elif ${CPUTYPE} == "p4m"
31CPUTYPE = pentium4m
32. elif ${CPUTYPE} == "p3"
33CPUTYPE = pentium3
34. elif ${CPUTYPE} == "p3m"
35CPUTYPE = pentium3m
36. elif ${CPUTYPE} == "p-m"
37CPUTYPE = pentium-m
38. elif ${CPUTYPE} == "p2"
39CPUTYPE = pentium2
40. elif ${CPUTYPE} == "i686"
41CPUTYPE = pentiumpro
42. elif ${CPUTYPE} == "i586/mmx"
43CPUTYPE = pentium-mmx
44. elif ${CPUTYPE} == "i586"
45CPUTYPE = pentium
31CPUTYPE = pentium4
32. elif ${CPUTYPE} == "p4m"
33CPUTYPE = pentium4m
34. elif ${CPUTYPE} == "p3"
35CPUTYPE = pentium3
36. elif ${CPUTYPE} == "p3m"
37CPUTYPE = pentium3m
38. elif ${CPUTYPE} == "p-m"
39CPUTYPE = pentium-m
40. elif ${CPUTYPE} == "p2"
41CPUTYPE = pentium2
42. elif ${CPUTYPE} == "i686"
43CPUTYPE = pentiumpro
44. elif ${CPUTYPE} == "i586/mmx"
45CPUTYPE = pentium-mmx
46. elif ${CPUTYPE} == "i586"
47CPUTYPE = pentium
46. elif ${CPUTYPE} == "opteron"
48. elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \
49 ${CPUTYPE} == "k8"
47CPUTYPE = athlon-mp
50CPUTYPE = athlon-mp
48. elif ${CPUTYPE} == "athlon64"
49CPUTYPE = athlon-xp
50. elif ${CPUTYPE} == "k7"
51CPUTYPE = athlon
52. endif
51. elif ${CPUTYPE} == "k7"
52CPUTYPE = athlon
53. endif
54. elif ${MACHINE_ARCH} == "amd64"
55. if ${CPUTYPE} == "prescott"
56CPUTYPE = nocona
57. endif
53. endif
54
55###############################################################################
56# Logic to set up correct gcc optimization flag. This must be included
57# after /etc/make.conf so it can react to the local value of CPUTYPE
58# defined therein. Consult:
59# http://gcc.gnu.org/onlinedocs/gcc/DEC-Alpha-Options.html
60# http://gcc.gnu.org/onlinedocs/gcc/IA-64-Options.html

--- 31 unchanged lines hidden (view full) ---

92_ICC_CPUCFLAGS = -tpp5 -xM
93. elif ${CPUTYPE} == "pentium"
94_ICC_CPUCFLAGS = -tpp5
95. else
96_ICC_CPUCFLAGS =
97. endif # ICC on 'i386'
98. elif ${MACHINE_ARCH} == "alpha"
99_CPUCFLAGS = -mcpu=${CPUTYPE}
58. endif
59
60###############################################################################
61# Logic to set up correct gcc optimization flag. This must be included
62# after /etc/make.conf so it can react to the local value of CPUTYPE
63# defined therein. Consult:
64# http://gcc.gnu.org/onlinedocs/gcc/DEC-Alpha-Options.html
65# http://gcc.gnu.org/onlinedocs/gcc/IA-64-Options.html

--- 31 unchanged lines hidden (view full) ---

97_ICC_CPUCFLAGS = -tpp5 -xM
98. elif ${CPUTYPE} == "pentium"
99_ICC_CPUCFLAGS = -tpp5
100. else
101_ICC_CPUCFLAGS =
102. endif # ICC on 'i386'
103. elif ${MACHINE_ARCH} == "alpha"
104_CPUCFLAGS = -mcpu=${CPUTYPE}
105. elif ${MACHINE_ARCH} == "amd64"
106_CPUCFLAGS = -march=${CPUTYPE}
100. elif ${MACHINE_ARCH} == "arm"
101. if ${CPUTYPE} == "xscale"
102#XXX: gcc doesn't seem to like -mcpu=xscale, and dies while rebuilding itself
103#_CPUCFLAGS = -mcpu=xscale
104_CPUCFLAGS = -D__XSCALE__
105. else
106_CPUCFLAGS = -mcpu=${CPUTYPE}
107. endif
108. endif
109
110# Set up the list of CPU features based on the CPU type. This is an
111# unordered list to make it easy for client makefiles to test for the
112# presence of a CPU feature.
113
114. if ${MACHINE_ARCH} == "i386"
107. elif ${MACHINE_ARCH} == "arm"
108. if ${CPUTYPE} == "xscale"
109#XXX: gcc doesn't seem to like -mcpu=xscale, and dies while rebuilding itself
110#_CPUCFLAGS = -mcpu=xscale
111_CPUCFLAGS = -D__XSCALE__
112. else
113_CPUCFLAGS = -mcpu=${CPUTYPE}
114. endif
115. endif
116
117# Set up the list of CPU features based on the CPU type. This is an
118# unordered list to make it easy for client makefiles to test for the
119# presence of a CPU feature.
120
121. if ${MACHINE_ARCH} == "i386"
115. if ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \
122. if ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64"
123MACHINE_CPU = athlon-xp athlon k7 3dnow sse2 sse mmx k6 k5 i586 i486 i386
124. elif ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \
116 ${CPUTYPE} == "athlon-4"
117MACHINE_CPU = athlon-xp athlon k7 3dnow sse mmx k6 k5 i586 i486 i386
118. elif ${CPUTYPE} == "athlon" || ${CPUTYPE} == "athlon-tbird"
119MACHINE_CPU = athlon k7 3dnow mmx k6 k5 i586 i486 i386
120. elif ${CPUTYPE} == "k6-3" || ${CPUTYPE} == "k6-2"
121MACHINE_CPU = 3dnow mmx k6 k5 i586 i486 i386
122. elif ${CPUTYPE} == "k6"
123MACHINE_CPU = mmx k6 k5 i586 i486 i386
124. elif ${CPUTYPE} == "k5"
125MACHINE_CPU = k5 i586 i486 i386
125 ${CPUTYPE} == "athlon-4"
126MACHINE_CPU = athlon-xp athlon k7 3dnow sse mmx k6 k5 i586 i486 i386
127. elif ${CPUTYPE} == "athlon" || ${CPUTYPE} == "athlon-tbird"
128MACHINE_CPU = athlon k7 3dnow mmx k6 k5 i586 i486 i386
129. elif ${CPUTYPE} == "k6-3" || ${CPUTYPE} == "k6-2"
130MACHINE_CPU = 3dnow mmx k6 k5 i586 i486 i386
131. elif ${CPUTYPE} == "k6"
132MACHINE_CPU = mmx k6 k5 i586 i486 i386
133. elif ${CPUTYPE} == "k5"
134MACHINE_CPU = k5 i586 i486 i386
126. elif ${CPUTYPE} == "pentium4" || ${CPUTYPE} == "pentium4m" || \
127 ${CPUTYPE} == "pentium-m"
135. elif ${CPUTYPE} == "pentium4" || ${CPUTYPE} == "pentium4m" || ${CPUTYPE} == "pentium-m"
128MACHINE_CPU = sse2 sse i686 mmx i586 i486 i386
129. elif ${CPUTYPE} == "pentium3" || ${CPUTYPE} == "pentium3m"
130MACHINE_CPU = sse i686 mmx i586 i486 i386
131. elif ${CPUTYPE} == "pentium2"
132MACHINE_CPU = i686 mmx i586 i486 i386
133. elif ${CPUTYPE} == "pentiumpro"
134MACHINE_CPU = i686 i586 i486 i386
135. elif ${CPUTYPE} == "pentium-mmx"

--- 15 unchanged lines hidden (view full) ---

151. elif ${CPUTYPE} == "ev5"
152MACHINE_CPU = ev5 ev45 ev4
153. elif ${CPUTYPE} == "ev45"
154MACHINE_CPU = ev45 ev4
155. elif ${CPUTYPE} == "ev4"
156MACHINE_CPU = ev4
157. endif
158. elif ${MACHINE_ARCH} == "amd64"
136MACHINE_CPU = sse2 sse i686 mmx i586 i486 i386
137. elif ${CPUTYPE} == "pentium3" || ${CPUTYPE} == "pentium3m"
138MACHINE_CPU = sse i686 mmx i586 i486 i386
139. elif ${CPUTYPE} == "pentium2"
140MACHINE_CPU = i686 mmx i586 i486 i386
141. elif ${CPUTYPE} == "pentiumpro"
142MACHINE_CPU = i686 i586 i486 i386
143. elif ${CPUTYPE} == "pentium-mmx"

--- 15 unchanged lines hidden (view full) ---

159. elif ${CPUTYPE} == "ev5"
160MACHINE_CPU = ev5 ev45 ev4
161. elif ${CPUTYPE} == "ev45"
162MACHINE_CPU = ev45 ev4
163. elif ${CPUTYPE} == "ev4"
164MACHINE_CPU = ev4
165. endif
166. elif ${MACHINE_ARCH} == "amd64"
159MACHINE_CPU = amd64 sse2 sse
167. if ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || ${CPUTYPE} == "k8"
168MACHINE_CPU = amd64 k8 athlon-mp athlon k7 3dnow sse2 sse mmx k6 k5 i586 i486 i386
169. elif ${CPUTYPE} == "nocona"
170MACHINE_CPU = sse3 sse2 sse mmx
171. endif
160. elif ${MACHINE_ARCH} == "ia64"
161. if ${CPUTYPE} == "itanium"
162MACHINE_CPU = itanium
163. endif
164. endif
165.endif
166
167.if ${MACHINE_ARCH} == "alpha"

--- 12 unchanged lines hidden ---
172. elif ${MACHINE_ARCH} == "ia64"
173. if ${CPUTYPE} == "itanium"
174MACHINE_CPU = itanium
175. endif
176. endif
177.endif
178
179.if ${MACHINE_ARCH} == "alpha"

--- 12 unchanged lines hidden ---