Module Name: src Committed By: mrg Date: Thu Feb 7 04:33:24 UTC 2019
Modified Files: src/sys/lib/libkern: Makefile.compiler-rt Log Message: for sh3 and GCC 7 pass -fnon-call-exceptions for udivmoddi4.c. avoids it emitting a call to abort() for an explicit divide by zero. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 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/sys/lib/libkern/Makefile.compiler-rt diff -u src/sys/lib/libkern/Makefile.compiler-rt:1.5 src/sys/lib/libkern/Makefile.compiler-rt:1.6 --- src/sys/lib/libkern/Makefile.compiler-rt:1.5 Sun Aug 10 05:57:31 2014 +++ src/sys/lib/libkern/Makefile.compiler-rt Thu Feb 7 04:33:24 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.compiler-rt,v 1.5 2014/08/10 05:57:31 matt Exp $ +# $NetBSD: Makefile.compiler-rt,v 1.6 2019/02/07 04:33:24 mrg Exp $ COMPILER_RT_SRCDIR= ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist @@ -126,3 +126,10 @@ COPTS.${src}+= -Wno-missing-prototypes \ .endfor CPPFLAGS.int_util.c+= -DKERNEL_USE + +# XXX Explicit divide by zero in udivmoddi4.c -> abort(). +.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc" +. if ${MACHINE_CPU} == "sh3" +COPTS.udivmoddi4.c+= -fnon-call-exceptions +. endif +.endif