diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2020-12-01 13:40:17 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2020-12-01 13:40:17 +0000 |
commit | 9a0949134673fb3e665c381a261dc9620a87dd6f (patch) | |
tree | b312564a83d7e58ab80b2a471e93688fe1c458ab /sys/arch/loongson | |
parent | 7f433b1b8cc6c4e59fd40ccf6c8bd00642ccd8fd (diff) |
Add option to build loongson kernels using clang.
Diffstat (limited to 'sys/arch/loongson')
-rw-r--r-- | sys/arch/loongson/conf/Makefile.loongson | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/loongson/conf/Makefile.loongson b/sys/arch/loongson/conf/Makefile.loongson index 732518dca22..47ccc2a2fd7 100644 --- a/sys/arch/loongson/conf/Makefile.loongson +++ b/sys/arch/loongson/conf/Makefile.loongson @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.loongson,v 1.77 2019/11/07 20:42:28 guenther Exp $ +# $OpenBSD: Makefile.loongson,v 1.78 2020/12/01 13:40:16 visa Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -46,6 +46,11 @@ CMACHFLAGS+= -fno-stack-protector SORTR= cat COPTS?= -Oz .endif +.if ${COMPILER_VERSION:Mclang} +NO_INTEGR_AS= -no-integrated-as +CMACHFLAGS+= -fomit-frame-pointer +CWARNFLAGS+= -Wno-address-of-packed-member -Wno-constant-conversion +.endif DEBUG?= -g COPTS?= -O2 @@ -103,7 +108,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 |