1.1 --- a/make/linux/makefiles/i486.make Thu Sep 05 18:40:52 2019 +0800 1.2 +++ b/make/linux/makefiles/i486.make Thu Sep 05 18:52:27 2019 +0800 1.3 @@ -24,10 +24,16 @@ 1.4 1.5 # TLS helper, assembled from .s file 1.6 1.7 -# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized 1.8 -OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) 1.9 -# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized 1.10 -OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) 1.11 +# If FDLIBM_CFLAGS is non-empty it holds CFLAGS needed to be passed to 1.12 +# the compiler so as to be able to produce optimized objects 1.13 +# without losing precision. 1.14 +ifneq ($(FDLIBM_CFLAGS),) 1.15 + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) 1.16 + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) 1.17 +else 1.18 + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) 1.19 + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) 1.20 +endif 1.21 # Must also specify if CPU is little endian 1.22 CFLAGS += -DVM_LITTLE_ENDIAN 1.23