diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/boot/i386/boot2/Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/boot/i386/boot2/Makefile b/sys/boot/i386/boot2/Makefile index 64d49ecd401f..6dc27d2dd410 100644 --- a/sys/boot/i386/boot2/Makefile +++ b/sys/boot/i386/boot2/Makefile @@ -2,9 +2,6 @@ .include <bsd.own.mk> -# XXX: clang can compile the boot code just fine, but boot2 gets too big -CC:=${CC:C/^(.*\/)?clang$/gcc/1} - FILES= boot boot1 boot2 NM?= nm @@ -45,6 +42,12 @@ CFLAGS= -Os \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Winline --param max-inline-insns-single=100 +.if ${CC:T:Mclang} == "clang" +CFLAGS+= -mllvm -stack-alignment=8 -mllvm -inline-threshold=3 +# XXX: clang integrated-as doesn't grok .codeNN directives yet +CFLAGS+= ${.IMPSRC:T:Mboot1.S:C/^.+$/-no-integrated-as/} +.endif + LDFLAGS=-static -N --gc-sections # Pick up ../Makefile.inc early. |