Deleted Added
full compact
Makefile (225736) Makefile (232930)
1# $FreeBSD: stable/9/sys/boot/i386/boot2/Makefile 224131 2011-07-17 13:50:21Z dim $
1# $FreeBSD: stable/9/sys/boot/i386/boot2/Makefile 232930 2012-03-13 18:39:57Z dim $
2
3.include <bsd.own.mk>
4
5FILES= boot boot1 boot2
6
7NM?= nm
8
9# A value of 0x80 enables LBA support.

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

35 -DSIOPRT=${BOOT_COMCONSOLE_PORT} \
36 -DSIOFMT=${B2SIOFMT} \
37 -DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
38 -I${.CURDIR}/../../common \
39 -I${.CURDIR}/../btx/lib -I. \
40 -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \
41 -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
42 -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
2
3.include <bsd.own.mk>
4
5FILES= boot boot1 boot2
6
7NM?= nm
8
9# A value of 0x80 enables LBA support.

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

35 -DSIOPRT=${BOOT_COMCONSOLE_PORT} \
36 -DSIOFMT=${B2SIOFMT} \
37 -DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
38 -I${.CURDIR}/../../common \
39 -I${.CURDIR}/../btx/lib -I. \
40 -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \
41 -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
42 -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
43 -Winline --param max-inline-insns-single=100
43 -Winline --param max-inline-insns-single=100 \
44 ${CLANG_OPT_SMALL}
44
45
45.if ${CC:T:Mclang} == "clang"
46CFLAGS+= -mllvm -stack-alignment=8 -mllvm -inline-threshold=3 \
47 -mllvm -enable-load-pre=false
48# XXX: clang integrated-as doesn't grok .codeNN directives yet
49CFLAGS+= ${.IMPSRC:T:Mboot1.S:C/^.+$/-no-integrated-as/}
50.endif
51
52LDFLAGS=-static -N --gc-sections
53
54# Pick up ../Makefile.inc early.
55.include <bsd.init.mk>
56
57CLEANFILES= boot
58
59boot: boot1 boot2

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

84
85boot2.bin: boot2.out
86 objcopy -S -O binary boot2.out ${.TARGET}
87
88boot2.out: ${BTXCRT} boot2.o sio.o
89 ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC}
90
91boot2.o: boot2.s
46LDFLAGS=-static -N --gc-sections
47
48# Pick up ../Makefile.inc early.
49.include <bsd.init.mk>
50
51CLEANFILES= boot
52
53boot: boot1 boot2

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

78
79boot2.bin: boot2.out
80 objcopy -S -O binary boot2.out ${.TARGET}
81
82boot2.out: ${BTXCRT} boot2.o sio.o
83 ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC}
84
85boot2.o: boot2.s
92.if ${CC:T:Mclang} == "clang"
93 ${CC} ${ACFLAGS} -c boot2.s
86 ${CC} ${ACFLAGS} -c boot2.s
94.endif
95
96SRCS= boot2.c boot2.h
97
98boot2.s: boot2.c boot2.h ${.CURDIR}/../../common/ufsread.c
99 ${CC} ${CFLAGS} -S -o boot2.s.tmp ${.CURDIR}/boot2.c
100 sed -e '/align/d' -e '/nop/d' < boot2.s.tmp > boot2.s
101 rm -f boot2.s.tmp
102

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

110.if ${MACHINE_CPUARCH} == "amd64"
111beforedepend boot2.s: machine
112CLEANFILES+= machine
113machine:
114 ln -sf ${.CURDIR}/../../../i386/include machine
115.endif
116
117.include <bsd.prog.mk>
87
88SRCS= boot2.c boot2.h
89
90boot2.s: boot2.c boot2.h ${.CURDIR}/../../common/ufsread.c
91 ${CC} ${CFLAGS} -S -o boot2.s.tmp ${.CURDIR}/boot2.c
92 sed -e '/align/d' -e '/nop/d' < boot2.s.tmp > boot2.s
93 rm -f boot2.s.tmp
94

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

102.if ${MACHINE_CPUARCH} == "amd64"
103beforedepend boot2.s: machine
104CLEANFILES+= machine
105machine:
106 ln -sf ${.CURDIR}/../../../i386/include machine
107.endif
108
109.include <bsd.prog.mk>
110
111# XXX: clang integrated-as doesn't grok .codeNN directives yet
112CFLAGS.boot1.S= ${CLANG_NO_IAS}
113CFLAGS+= ${CFLAGS.${.IMPSRC:T}}