Commit 67154258 authored by Joel K. Pettersson's avatar Joel K. Pettersson
Browse files

FreeBSD portability fix.

As of FreeBSD 11.3 with default C language toolchain,
isnan() is broken when compiling with -ffast-math.

Workaround: Since floating-point is-functions are not
used in the parts of the program doing heavier float
crunching, use -ffast-math only there, where nothing
breaks. Unbreaks parsing (which relies on isnan())
without slowing down generator.

Increase version suffix to "v0.3.1b".
parent 15425824
CFLAGS=-std=c99 -W -Wall -O2 -ffast-math
CFLAGS=-std=c99 -W -Wall -O2
CFLAGS_FAST=$(CFLAGS) -ffast-math
LFLAGS=-s -lm
......@@ -110,19 +111,19 @@ ptrlist.o: ptrlist.c ptrlist.h common.h
$(CC) -c $(CFLAGS) ptrlist.c
ramp.o: ramp.c ramp.h math.h common.h
$(CC) -c $(CFLAGS) ramp.c
$(CC) -c $(CFLAGS_FAST) ramp.c
renderer.o: renderer.c saugns.h renderer/generator.h ptrlist.h program.h ramp.h wave.h math.h audiodev.h wavfile.h common.h
$(CC) -c $(CFLAGS) renderer.c
$(CC) -c $(CFLAGS_FAST) renderer.c
renderer/generator.o: renderer/generator.c renderer/generator.h renderer/mixer.h renderer/osc.h program.h ramp.h wave.h math.h common.h
$(CC) -c $(CFLAGS) renderer/generator.c -o renderer/generator.o
$(CC) -c $(CFLAGS_FAST) renderer/generator.c -o renderer/generator.o
renderer/mixer.o: renderer/mixer.c renderer/mixer.h ramp.h math.h common.h
$(CC) -c $(CFLAGS) renderer/mixer.c -o renderer/mixer.o
$(CC) -c $(CFLAGS_FAST) renderer/mixer.c -o renderer/mixer.o
renderer/osc.o: renderer/osc.c renderer/osc.h wave.h math.h common.h
$(CC) -c $(CFLAGS) renderer/osc.c -o renderer/osc.o
$(CC) -c $(CFLAGS_FAST) renderer/osc.c -o renderer/osc.o
saugns.o: saugns.c saugns.h ptrlist.h program.h ramp.h wave.h math.h common.h
$(CC) -c $(CFLAGS) saugns.c
......@@ -131,7 +132,7 @@ test-builder.o: test-builder.c saugns.h builder/lexer.h builder/scanner.h builde
$(CC) -c $(CFLAGS) test-builder.c
wave.o: wave.c wave.h math.h common.h
$(CC) -c $(CFLAGS) wave.c
$(CC) -c $(CFLAGS_FAST) wave.c
wavfile.o: wavfile.c wavfile.h common.h
$(CC) -c $(CFLAGS) wavfile.c
......@@ -15,7 +15,7 @@
#include "program.h"
#include "ptrlist.h"
#define SAU_VERSION_STR "saugns v0.3.1"
#define SAU_VERSION_STR "saugns v0.3.1b"
size_t SAU_build(const SAU_PtrList *restrict script_args, bool are_paths,
SAU_PtrList *restrict prg_objs);
Supports Markdown
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