mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Disable gcc's built-in rint() function when compiling s_nearbyint.c.
It results in incorrect optimizations that break nearbyint(). PR: 143358 Reviewed by: bde
This commit is contained in:
parent
15b4888a24
commit
9bb4c87bb1
1 changed files with 6 additions and 0 deletions
|
|
@ -113,6 +113,12 @@ COMMON_SRCS:= ${COMMON_SRCS:N${i:R}.c}
|
|||
.endfor
|
||||
.endif
|
||||
|
||||
# Some files need certain gcc built-in functions to be disabled, since gcc's
|
||||
# model of the functions bogusly assumes -fno-trapping-math.
|
||||
XRINT_CFLAGS= -fno-builtin-rint -fno-builtin-rintf -fno-builtin-rintl
|
||||
CFLAGS+= ${XRINT_CFLAGS}
|
||||
XRINT_CFLAGS:= ${.IMPSRC:M*/s_nearbyint.c:C/^.+$/${XRINT_CFLAGS}/:C/^$//}
|
||||
|
||||
SRCS= ${COMMON_SRCS} ${ARCH_SRCS}
|
||||
|
||||
INCS= fenv.h math.h
|
||||
|
|
|
|||
Loading…
Reference in a new issue