diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-10-26 13:27:21 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-10-26 13:27:21 +0000 |
commit | 8896e57cceaa27ebf468942ffc8dde08e9fb0da2 (patch) | |
tree | 12bd1ab3270b220a9d6fbd4b54f98a6a6237de0d /sys/arch | |
parent | 29087ee1dbcffcd814edbea47882241afe77d92e (diff) |
adjust Makefile.armv7 for clang
ok kettenis@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/armv7/conf/Makefile.armv7 | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/arch/armv7/conf/Makefile.armv7 b/sys/arch/armv7/conf/Makefile.armv7 index 0007297d685..63519b19315 100644 --- a/sys/arch/armv7/conf/Makefile.armv7 +++ b/sys/arch/armv7/conf/Makefile.armv7 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.armv7,v 1.36 2017/09/28 16:16:34 patrick Exp $ +# $OpenBSD: Makefile.armv7,v 1.37 2017/10/26 13:27:20 jsg Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -25,9 +25,15 @@ INCLUDES= -nostdinc -I$S -I. -I$S/arch CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \ -Wno-uninitialized -Wno-pointer-sign \ + -Wno-address-of-packed-member -Wno-constant-conversion \ -Wframe-larger-than=2047 -CMACHFLAGS= -msoft-float -march=armv6 -Wa,-march=armv7a +CMACHFLAGS= -msoft-float +.if ${COMPILER_VERSION:Mgcc4} +CMACHFLAGS+= -march=armv6 -Wa,-march=armv7a +.else +CMACHFLAGS+= -march=armv7a +.endif CMACHFLAGS+= -ffreestanding ${NOPIE_FLAGS} SORTR= sort -R .if ${IDENT:M-DNO_PROPOLICE} @@ -36,6 +42,9 @@ CMACHFLAGS+= -fno-stack-protector .if ${IDENT:M-DSMALL_KERNEL} SORTR= cat .endif +.if ${COMPILER_VERSION:Mclang} +NO_INTEGR_AS= -no-integrated-as +.endif DEBUG?= -g COPTS?= -O2 @@ -93,7 +102,7 @@ LINKFLAGS+= -S assym.h: $S/kern/genassym.sh Makefile \ ${_archdir}/${_arch}/genassym.cf ${_machdir}/${_mach}/genassym.cf cat ${_archdir}/${_arch}/genassym.cf ${_machdir}/${_mach}/genassym.cf | \ - sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} -MF assym.P > assym.h.tmp + sh $S/kern/genassym.sh ${CC} ${NO_INTEGR_AS} ${CFLAGS} ${CPPFLAGS} -MF assym.P > assym.h.tmp sed '1s/.*/assym.h: \\/' assym.P > assym.d sort -u assym.h.tmp > assym.h |