| @@ -1,122 +1,122 @@ | | | @@ -1,122 +1,122 @@ |
1 | # $NetBSD: Makefile.amd64,v 1.35 2011/05/30 15:06:32 joerg Exp $ | | 1 | # $NetBSD: Makefile.amd64,v 1.36 2011/06/10 03:17:35 joerg Exp $ |
2 | | | 2 | |
3 | # Makefile for NetBSD | | 3 | # Makefile for NetBSD |
4 | # | | 4 | # |
5 | # This makefile is constructed from a machine description: | | 5 | # This makefile is constructed from a machine description: |
6 | # config machineid | | 6 | # config machineid |
7 | # Most changes should be made in the machine description | | 7 | # Most changes should be made in the machine description |
8 | # /sys/arch/amd64/conf/``machineid'' | | 8 | # /sys/arch/amd64/conf/``machineid'' |
9 | # after which you should do | | 9 | # after which you should do |
10 | # config machineid | | 10 | # config machineid |
11 | # Machine generic makefile changes should be made in | | 11 | # Machine generic makefile changes should be made in |
12 | # /sys/arch/amd64/conf/Makefile.amd64 | | 12 | # /sys/arch/amd64/conf/Makefile.amd64 |
13 | # after which config should be rerun for all machines of that type. | | 13 | # after which config should be rerun for all machines of that type. |
14 | # | | 14 | # |
15 | # To specify debugging, add the config line: makeoptions DEBUG="-g" | | 15 | # To specify debugging, add the config line: makeoptions DEBUG="-g" |
16 | # A better way is to specify -g only for a few files. | | 16 | # A better way is to specify -g only for a few files. |
17 | # | | 17 | # |
18 | # makeoptions DEBUGLIST="uvm* trap if_*" | | 18 | # makeoptions DEBUGLIST="uvm* trap if_*" |
19 | | | 19 | |
20 | MACHINE_ARCH=x86_64 | | 20 | MACHINE_ARCH=x86_64 |
21 | USETOOLS?= no | | 21 | USETOOLS?= no |
22 | NEED_OWN_INSTALL_TARGET?=no | | 22 | NEED_OWN_INSTALL_TARGET?=no |
23 | .include <bsd.own.mk> | | 23 | .include <bsd.own.mk> |
24 | | | 24 | |
25 | USE_SSP?= yes | | 25 | USE_SSP?= yes |
26 | | | 26 | |
27 | ## | | 27 | ## |
28 | ## (1) port identification | | 28 | ## (1) port identification |
29 | ## | | 29 | ## |
30 | AMD64= $S/arch/amd64 | | 30 | AMD64= $S/arch/amd64 |
31 | GENASSYM_CONF= ${AMD64}/amd64/genassym.cf | | 31 | GENASSYM_CONF= ${AMD64}/amd64/genassym.cf |
32 | | | 32 | |
33 | ## | | 33 | ## |
34 | ## (2) compile settings | | 34 | ## (2) compile settings |
35 | ## | | 35 | ## |
36 | DEFCOPTS= -O2 | | 36 | DEFCOPTS= -O2 |
37 | CPPFLAGS+= -Damd64 -Dx86_64 | | 37 | CPPFLAGS+= -Damd64 -Dx86_64 |
38 | CFLAGS+= -mcmodel=kernel | | 38 | CFLAGS+= -mcmodel=kernel |
39 | CFLAGS+= -mno-red-zone | | 39 | CFLAGS+= -mno-red-zone -mno-sse -mno-sse2 -mno-sse3 |
40 | | | 40 | |
41 | ## | | 41 | ## |
42 | ## (3) libkern and compat | | 42 | ## (3) libkern and compat |
43 | ## | | 43 | ## |
44 | KERN_AS= obj | | 44 | KERN_AS= obj |
45 | | | 45 | |
46 | ## | | 46 | ## |
47 | ## (4) local objects, compile rules, and dependencies | | 47 | ## (4) local objects, compile rules, and dependencies |
48 | ## | | 48 | ## |
49 | MD_OBJS= locore.o vector.o copy.o spl.o | | 49 | MD_OBJS= locore.o vector.o copy.o spl.o |
50 | MD_CFILES= | | 50 | MD_CFILES= |
51 | MD_SFILES= ${AMD64}/amd64/locore.S ${AMD64}/amd64/vector.S \ | | 51 | MD_SFILES= ${AMD64}/amd64/locore.S ${AMD64}/amd64/vector.S \ |
52 | ${AMD64}/amd64/copy.S ${AMD64}/amd64/spl.S | | 52 | ${AMD64}/amd64/copy.S ${AMD64}/amd64/spl.S |
53 | | | 53 | |
54 | locore.o: ${AMD64}/amd64/locore.S assym.h | | 54 | locore.o: ${AMD64}/amd64/locore.S assym.h |
55 | ${NORMAL_S} | | 55 | ${NORMAL_S} |
56 | | | 56 | |
57 | vector.o: ${AMD64}/amd64/vector.S assym.h | | 57 | vector.o: ${AMD64}/amd64/vector.S assym.h |
58 | ${NORMAL_S} | | 58 | ${NORMAL_S} |
59 | | | 59 | |
60 | copy.o: ${AMD64}/amd64/copy.S assym.h | | 60 | copy.o: ${AMD64}/amd64/copy.S assym.h |
61 | ${NORMAL_S} | | 61 | ${NORMAL_S} |
62 | | | 62 | |
63 | spl.o: ${AMD64}/amd64/spl.S assym.h | | 63 | spl.o: ${AMD64}/amd64/spl.S assym.h |
64 | ${NORMAL_S} | | 64 | ${NORMAL_S} |
65 | | | 65 | |
66 | AFLAGS.locore.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} | | 66 | AFLAGS.locore.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} |
67 | AFLAGS.mptramp.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} | | 67 | AFLAGS.mptramp.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} |
68 | AFLAGS.linux32_sigcode.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} | | 68 | AFLAGS.linux32_sigcode.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} |
69 | AFLAGS.netbsd32_sigcode.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} | | 69 | AFLAGS.netbsd32_sigcode.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} |
70 | CWARNFLAGS.ah_regdomain.c= ${${ACTIVE_CC} == "clang":?-Wno-error:} | | 70 | CWARNFLAGS.ah_regdomain.c= ${${ACTIVE_CC} == "clang":?-Wno-error:} |
71 | | | 71 | |
72 | ## | | 72 | ## |
73 | ## (5) link settings | | 73 | ## (5) link settings |
74 | ## | | 74 | ## |
75 | TEXTADDR?= 0xffffffff80100000 | | 75 | TEXTADDR?= 0xffffffff80100000 |
76 | EXTRA_LINKFLAGS= -z max-page-size=0x100000 | | 76 | EXTRA_LINKFLAGS= -z max-page-size=0x100000 |
77 | LINKFLAGS_NORMAL= -X | | 77 | LINKFLAGS_NORMAL= -X |
78 | KERN_LDSCRIPT?= kern.ldscript | | 78 | KERN_LDSCRIPT?= kern.ldscript |
79 | LINKFORMAT= -T ${AMD64}/conf/${KERN_LDSCRIPT} | | 79 | LINKFORMAT= -T ${AMD64}/conf/${KERN_LDSCRIPT} |
80 | | | 80 | |
81 | ## | | 81 | ## |
82 | ## (6) port specific target dependencies | | 82 | ## (6) port specific target dependencies |
83 | ## | | 83 | ## |
84 | | | 84 | |
85 | # depend on CPU configuration | | 85 | # depend on CPU configuration |
86 | locore.o machdep.o: Makefile | | 86 | locore.o machdep.o: Makefile |
87 | | | 87 | |
88 | acpi_wakeup_low.o amd64func.o busfunc.o cpufunc.o cpu_in_cksum.o: assym.h | | 88 | acpi_wakeup_low.o amd64func.o busfunc.o cpufunc.o cpu_in_cksum.o: assym.h |
89 | linux_support.o linux32_sigcode.o lock_stubs.o mptramp.o: assym.h | | 89 | linux_support.o linux32_sigcode.o lock_stubs.o mptramp.o: assym.h |
90 | netbsd32_sigcode.o: assym.h | | 90 | netbsd32_sigcode.o: assym.h |
91 | | | 91 | |
92 | ## | | 92 | ## |
93 | ## (7) misc settings | | 93 | ## (7) misc settings |
94 | ## | | 94 | ## |
95 | | | 95 | |
96 | ## | | 96 | ## |
97 | ## (8) config(8) generated machinery | | 97 | ## (8) config(8) generated machinery |
98 | ## | | 98 | ## |
99 | %INCLUDES | | 99 | %INCLUDES |
100 | | | 100 | |
101 | %OBJS | | 101 | %OBJS |
102 | | | 102 | |
103 | %CFILES | | 103 | %CFILES |
104 | | | 104 | |
105 | %SFILES | | 105 | %SFILES |
106 | | | 106 | |
107 | %LOAD | | 107 | %LOAD |
108 | | | 108 | |
109 | %RULES | | 109 | %RULES |
110 | | | 110 | |
111 | ## Include rules for ACPI wakecode | | 111 | ## Include rules for ACPI wakecode |
112 | .include "$S/arch/x86/acpi/Makefile.wakecode.inc" | | 112 | .include "$S/arch/x86/acpi/Makefile.wakecode.inc" |
113 | | | 113 | |
114 | ## | | 114 | ## |
115 | ## (9) port independent kernel machinery | | 115 | ## (9) port independent kernel machinery |
116 | ## | | 116 | ## |
117 | .include "$S/conf/Makefile.kern.inc" | | 117 | .include "$S/conf/Makefile.kern.inc" |
118 | | | 118 | |
119 | ## | | 119 | ## |
120 | ## (10) Appending make options. | | 120 | ## (10) Appending make options. |
121 | ## | | 121 | ## |
122 | %MAKEOPTIONSAPPEND | | 122 | %MAKEOPTIONSAPPEND |