> Date: Thu, 26 Oct 2017 15:51:28 +1100
> From: Jonathan Gray <[email protected]>
>
> Also add aliases for additional eabi calls clang emits.
I'm not certain the aliases are correct. So please hold off on that
for now.
The makefile changes more or less match what I had in my tree, but
your versions is better. Please go ahead and check that in.
> Index: lib/libkern/arch/arm/divsi3.S
> ===================================================================
> RCS file: /cvs/src/sys/lib/libkern/arch/arm/divsi3.S,v
> retrieving revision 1.4
> diff -u -p -r1.4 divsi3.S
> --- lib/libkern/arch/arm/divsi3.S 22 Sep 2016 19:43:25 -0000 1.4
> +++ lib/libkern/arch/arm/divsi3.S 26 Oct 2017 04:36:24 -0000
> @@ -387,4 +387,6 @@ L_udivide_l1:
> mov pc, lr
>
> STRONG_ALIAS(__aeabi_idiv, __divsi3)
> +STRONG_ALIAS(__aeabi_idivmod, __divsi3)
> STRONG_ALIAS(__aeabi_uidiv, __udivsi3)
> +STRONG_ALIAS(__aeabi_uidivmod, __udivsi3)
> Index: arch/armv7/conf/Makefile.armv7
> ===================================================================
> RCS file: /cvs/src/sys/arch/armv7/conf/Makefile.armv7,v
> retrieving revision 1.36
> diff -u -p -r1.36 Makefile.armv7
> --- arch/armv7/conf/Makefile.armv7 28 Sep 2017 16:16:34 -0000 1.36
> +++ arch/armv7/conf/Makefile.armv7 26 Oct 2017 04:36:24 -0000
> @@ -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
>
>
>