Skip to content

Commit e37f5d7

Browse files
author
Iain Bancarz
committedSep 17, 2013
Add -lm compiler flag. Remove -ffast-math which causes errors handling INF/NaN values.
1 parent b6ef70f commit e37f5d7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎Makefile

+4-3
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,14 @@ LIBS=Gtc.o win2unix.o Sim.o
5151

5252
CC=/usr/bin/g++
5353

54+
# do NOT use -ffast-math, as it causes errors in infinity/NaN handling
5455
ifeq ($(DEBUG),y)
55-
CFLAGS=-g -Wall -fPIC -O0 -ffast-math -I$(STLPORT_INC)
56+
CFLAGS=-g -Wall -fPIC -O0 -I$(STLPORT_INC)
5657
else
57-
CFLAGS=-Wall -fPIC -O3 -ffast-math -I$(STLPORT_INC)
58+
CFLAGS=-Wall -fPIC -O3 -I$(STLPORT_INC)
5859
endif
5960
# Set runpath instead of relying on LD_LIBRARY_PATH
60-
LDFLAGS=-Wl,-rpath -Wl,$(STLPORT_LIB) -L$(STLPORT_LIB) -lstlport
61+
LDFLAGS=-Wl,-rpath -Wl,$(STLPORT_LIB) -L$(STLPORT_LIB) -lstlport -lm
6162

6263
default: all
6364

0 commit comments

Comments
 (0)
Please sign in to comment.