On sh3 __udivsi3 is gcc "millicode" with special calling convention
(less registers clobbered than usual). Each DSO that needs it gets its own hidden copy from libgcc.a. Do not compile udivsi3.c for sh3 here since this C version doesn't conform to what gcc expects and overrides the libgcc.a version. This makes binaries compiled with gcc4.8 work. The issue was not exposed with gcc4.5 since it uses different division strategy by default.
This commit is contained in:
parent
5c1b7f4542
commit
66df54162c
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile.inc,v 1.16 2014/03/02 03:04:52 matt Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.17 2014/03/19 20:30:53 uwe Exp $
|
||||
|
||||
COMPILER_RT_SRCDIR= ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist
|
||||
|
||||
|
@ -127,11 +127,18 @@ GENERIC_SRCS+= \
|
|||
ucmpti2.c \
|
||||
udivmodsi4.c \
|
||||
udivmodti4.c \
|
||||
udivsi3.c \
|
||||
udivti3.c \
|
||||
umodsi3.c \
|
||||
umodti3.c
|
||||
|
||||
.if ${MACHINE_CPU} != "sh3"
|
||||
# On sh3 __udivsi3 is gcc "millicode" with special calling convention
|
||||
# (less registers clobbered than usual). Each DSO that needs it gets
|
||||
# its own hidden copy from libgcc.a.
|
||||
GENERIC_SRCS+= \
|
||||
udivsi3.c
|
||||
.endif
|
||||
|
||||
GENERIC_SRCS+= \
|
||||
absvdi2.c \
|
||||
addvdi3.c \
|
||||
|
|
Loading…
Reference in New Issue