From 04a91333db0cf0fe9104a8dd32c46e2445dbed65 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 21 Aug 2017 17:49:01 +0000 Subject: [PATCH] Include {u,}{div,mod}si3() on mips in libcompiler_rt. These builtins were listed in the mips-specific Symbol.map for libc but were not implemented. Compiling mips with recent clang requires these symbols. Sponsored by: DARPA / AFRL --- lib/libc/mips/Symbol.map | 4 ---- lib/libcompiler_rt/Makefile.inc | 11 ++++------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/libc/mips/Symbol.map b/lib/libc/mips/Symbol.map index 9791359c93f6..fd15554fe9d9 100644 --- a/lib/libc/mips/Symbol.map +++ b/lib/libc/mips/Symbol.map @@ -43,10 +43,6 @@ FBSDprivate_1.0 { _set_tp; ___longjmp; - __umodsi3; - __modsi3; - __udivsi3; - __divsi3; __makecontext; __longjmp; signalcontext; diff --git a/lib/libcompiler_rt/Makefile.inc b/lib/libcompiler_rt/Makefile.inc index 856da2fe7a4d..7a4da165913f 100644 --- a/lib/libcompiler_rt/Makefile.inc +++ b/lib/libcompiler_rt/Makefile.inc @@ -32,6 +32,7 @@ SRCF+= divdi3 SRCF+= divmoddi4 SRCF+= divmodsi4 SRCF+= divsc3 +SRCF+= divsi3 SRCF+= divtc3 SRCF+= divti3 SRCF+= divxc3 @@ -78,6 +79,7 @@ SRCF+= int_util SRCF+= lshrdi3 SRCF+= lshrti3 SRCF+= moddi3 +SRCF+= modsi3 SRCF+= modti3 SRCF+= muldc3 SRCF+= muldi3 @@ -120,8 +122,10 @@ SRCF+= udivdi3 SRCF+= udivmoddi4 SRCF+= udivmodsi4 SRCF+= udivmodti4 +SRCF+= udivsi3 SRCF+= udivti3 SRCF+= umoddi3 +SRCF+= umodsi3 SRCF+= umodti3 # __cpu_model support, only used on x86 @@ -176,13 +180,6 @@ SRCF+= comparedf2 SRCF+= comparesf2 .endif -.if ${MACHINE_CPUARCH} != "mips" -SRCF+= divsi3 -SRCF+= modsi3 -SRCF+= udivsi3 -SRCF+= umodsi3 -.endif - # FreeBSD-specific atomic intrinsics. .if ${MACHINE_CPUARCH} == "arm" .PATH: ${SRCTOP}/sys/arm/arm