Module Name: src Committed By: rin Date: Wed Jun 16 05:21:09 UTC 2021
Modified Files: src/lib/libc/compiler_rt: Makefile.inc src/lib/libm/compiler_rt: Makefile.inc src/sys/lib/libkern: Makefile.compiler-rt Added Files: src/sys/external/bsd/compiler_rt: abi.mk Log Message: PR port-arm/55897 Fix ABI mismatch for armhf runtime routines for floating-point arithmetics; For hard-float arm variants, provide (1) generic runtime routines with correct calling convention, and (2) EABI runtime routines at the same time. I've confirmed that no binary changes for kernels. LGTM by skrll To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/lib/libc/compiler_rt/Makefile.inc cvs rdiff -u -r1.10 -r1.11 src/lib/libm/compiler_rt/Makefile.inc cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/compiler_rt/abi.mk cvs rdiff -u -r1.12 -r1.13 src/sys/lib/libkern/Makefile.compiler-rt Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/compiler_rt/Makefile.inc diff -u src/lib/libc/compiler_rt/Makefile.inc:1.39 src/lib/libc/compiler_rt/Makefile.inc:1.40 --- src/lib/libc/compiler_rt/Makefile.inc:1.39 Wed Sep 2 16:22:45 2020 +++ src/lib/libc/compiler_rt/Makefile.inc Wed Jun 16 05:21:08 2021 @@ -1,6 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.39 2020/09/02 16:22:45 jakllsch Exp $ +# $NetBSD: Makefile.inc,v 1.40 2021/06/16 05:21:08 rin Exp $ -COMPILER_RT_SRCDIR= ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist +COMPILER_RT_DIR= ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt +COMPILER_RT_SRCDIR= ${COMPILER_RT_DIR}/dist .if ${LIBC_MACHINE_ARCH} == "powerpc" || ${LIBC_MACHINE_ARCH} == "powerpc64" COMPILER_RT_CPU_DIR= ${COMPILER_RT_SRCDIR}/lib/builtins/ppc @@ -299,3 +300,5 @@ COPTS.${src}+= -Wno-missing-prototypes \ COPTS.${src}+= -D__SOFT_FP__ .endif .endfor + +.include "${COMPILER_RT_DIR}/abi.mk" Index: src/lib/libm/compiler_rt/Makefile.inc diff -u src/lib/libm/compiler_rt/Makefile.inc:1.10 src/lib/libm/compiler_rt/Makefile.inc:1.11 --- src/lib/libm/compiler_rt/Makefile.inc:1.10 Sat Feb 27 19:06:56 2016 +++ src/lib/libm/compiler_rt/Makefile.inc Wed Jun 16 05:21:08 2021 @@ -1,6 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.10 2016/02/27 19:06:56 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.11 2021/06/16 05:21:08 rin Exp $ -COMPILER_RT_SRCDIR= ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist +COMPILER_RT_DIR= ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt +COMPILER_RT_SRCDIR= ${COMPILER_RT_DIR}/dist .if ${MACHINE_CPU} == "powerpc" COMPILER_RT_CPU_DIR= ${COMPILER_RT_SRCDIR}/lib/builtins/ppc @@ -38,3 +39,5 @@ SRCS+= ${src} COPTS.${src}+= -Wno-error=missing-prototypes . endif .endfor + +.include "${COMPILER_RT_DIR}/abi.mk" Index: src/sys/lib/libkern/Makefile.compiler-rt diff -u src/sys/lib/libkern/Makefile.compiler-rt:1.12 src/sys/lib/libkern/Makefile.compiler-rt:1.13 --- src/sys/lib/libkern/Makefile.compiler-rt:1.12 Fri Apr 24 00:22:57 2020 +++ src/sys/lib/libkern/Makefile.compiler-rt Wed Jun 16 05:21:09 2021 @@ -1,6 +1,7 @@ -# $NetBSD: Makefile.compiler-rt,v 1.12 2020/04/24 00:22:57 rin Exp $ +# $NetBSD: Makefile.compiler-rt,v 1.13 2021/06/16 05:21:09 rin Exp $ -COMPILER_RT_SRCDIR= ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist +COMPILER_RT_DIR= ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt +COMPILER_RT_SRCDIR= ${COMPILER_RT_DIR}/dist .if ${MACHINE_ARCH} == "powerpc" COMPILER_RT_CPU_DIR= ${COMPILER_RT_SRCDIR}/lib/builtins/ppc @@ -134,3 +135,6 @@ CPPFLAGS.int_util.c+= -DKERNEL_USE COPTS.udivmoddi4.c+= -fnon-call-exceptions . endif .endif + +# XXX This makes no binary changes at the moment. +.include "${COMPILER_RT_DIR}/abi.mk" Added files: Index: src/sys/external/bsd/compiler_rt/abi.mk diff -u /dev/null src/sys/external/bsd/compiler_rt/abi.mk:1.1 --- /dev/null Wed Jun 16 05:21:09 2021 +++ src/sys/external/bsd/compiler_rt/abi.mk Wed Jun 16 05:21:08 2021 @@ -0,0 +1,5 @@ +# $NetBSD: abi.mk,v 1.1 2021/06/16 05:21:08 rin Exp $ + +.if !empty(MACHINE_ARCH:Mearm*hf*) +CPPFLAGS+= -DCOMPILER_RT_ARMHF_TARGET +.endif