Commit b7280406 authored by Raymond Toy's avatar Raymond Toy

Need -ffloat-store when compiling e_rem/k_rem.

 * Add CC_REM_PIO2 variable when compiling e_rem_pio2.c and
   k_rem_pio2.c.
 * On linux and freebsd, set CC_REM_PIO2 to -ffloat-store so that
   proper rounding happens.  Not needed on Darwin because Darwin
   always uses sse2 and not x87.
parent e2c9ecef
......@@ -65,7 +65,13 @@ NM = nm -gp
DEPEND_FLAGS = -MM
# This no longer has aliasing problems, so no need to use
# -ffloat-store and -fno-strict-aliasing anymore.
# -fno-strict-aliasing anymore. However, if we're building with x87,
# we MUST use -ffloat-store to get proper double-float rounding.
e_rem_pio2.o : e_rem_pio2.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $<
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(CC_REM_PIO2) $<
k_rem_pio2.o : k_rem_pio2.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(CC_REM_PIO2) $<
# -*- Mode: makefile -*-
include Config.x86_common
# Need -ffloat-store for e_rem_pio2 and k_rem_pio2 to get properly
# rounded double-floats while using x87 extended precision.
CC_REM_PIO2 = -ffloat-store
UNDEFSYMPATTERN = -Xlinker -u -Xlinker &
OS_SRC += FreeBSD-os.c elf.c
OS_LINK_FLAGS = -dynamic -export-dynamic
......
......@@ -3,6 +3,10 @@ include Config.x86_common
CPPFLAGS += -m32 -rdynamic -D__NO_CTYPE -D_GNU_SOURCE
# Need -ffloat-store for e_rem_pio2 and k_rem_pio2 to get properly
# rounded double-floats while using x87 extended precision.
CC_REM_PIO2 = -ffloat-store
UNDEFSYMPATTERN = -Xlinker -u -Xlinker &
ASSEM_SRC += linux-stubs.S
OS_SRC += Linux-os.c elf.c
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment