From: Jeff E. <gi...@gi...> - 2010-11-30 04:21:30
|
build: we want sane math among other things, -ffast-math (specified in rtai-config --module-cflags) makes isinf(x) and isnan(x) always return 0! http://git.linuxcnc.org/?p=emc2.git;a=commitdiff;h=2e7d450 --- src/Makefile | 3 ++- src/Makefile.modinc.in | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 208f305..06f5980 100644 --- a/src/Makefile +++ b/src/Makefile @@ -586,12 +586,13 @@ endif # "kbuild" system. $(BASEPWD) is used here, instead of relative paths, because # that's what kbuild seems to require -EXTRA_CFLAGS = $(RTFLAGS) -D__MODULE__ -I$(BASEPWD) -I$(BASEPWD)/libnml/linklist \ +EXTRA_CFLAGS = $(filter-out -ffast-math,$(RTFLAGS)) -D__MODULE__ -I$(BASEPWD) -I$(BASEPWD)/libnml/linklist \ -I$(BASEPWD)/libnml/cms -I$(BASEPWD)/libnml/rcs -I$(BASEPWD)/libnml/inifile \ -I$(BASEPWD)/libnml/os_intf -I$(BASEPWD)/libnml/nml -I$(BASEPWD)/libnml/buffer \ -I$(BASEPWD)/libnml/posemath -I$(BASEPWD)/rtapi -I$(BASEPWD)/hal \ -I$(BASEPWD)/emc/nml_intf -I$(BASEPWD)/emc/kinematics -I$(BASEPWD)/emc/motion \ -DSEQUENTIAL_SUPPORT -DHAL_SUPPORT -DDYNAMIC_PLCSIZE -DRT_SUPPORT -DOLD_TIMERS_MONOS_SUPPORT -DMODBUS_IO_MASTER \ + -fno-fast-math -mieee-fp -fno-unsafe-math-optimizations \ $(call cc-option,-Wframe-larger-than=2560) ifeq ($(RTARCH),x86_64) EXTRA_CFLAGS += -msse diff --git a/src/Makefile.modinc.in b/src/Makefile.modinc.in index f2b81d3..d90c52e 100644 --- a/src/Makefile.modinc.in +++ b/src/Makefile.modinc.in @@ -36,7 +36,7 @@ BUILDSYS = @BUILD_SYS@ KERNELDIR := @KERNELDIR@ CC := @CC@ -RTFLAGS = @RTFLAGS@ @EXT_RTFLAGS@ +RTFLAGS = $(filter-out -ffast-math,@RTFLAGS@ @EXT_RTFLAGS@) -fno-fast-math -mieee-fp -fno-unsafe-math-optimizations RTFLAGS := -Os -g -I. -I@RTDIR@/include $(RTFLAGS) -DRTAPI -D_GNU_SOURCE -Drealtime -D_FORTIFY_SOURCE=0 ifeq ($(RTARCH),x86_64) EXTRA_CFLAGS += -msse |