Makefile: Use no-math-errno flag for all GCC compilers

Changes the CFLAGS for all platforms which use the GCC compiler
to include -fno-math-errno in order to resolve a linking issue
when compiling for platforms that use GCC.

For some reason, the flag was not added to the Makefile in commit
1a5f96, which replaces AbsF and SqrtF with their respective GCC
built-ins.

Signed-off-by: Jacob Shtabnoy <shtabnoyjacob@scps.net>
This commit is contained in:
Jacob Shtabnoy 2020-03-08 17:53:06 -04:00
parent b4d0042c75
commit 0b45fe132d
No known key found for this signature in database
GPG Key ID: 8CDAF08CC387D455

View File

@ -4,7 +4,7 @@ ENAME=ClassiCube
DEL=rm DEL=rm
JOBS=1 JOBS=1
CC=gcc CC=gcc
CFLAGS=-g -pipe -rdynamic CFLAGS=-g -pipe -rdynamic -fno-math-errno
LDFLAGS=-g -rdynamic LDFLAGS=-g -rdynamic
ifndef $(PLAT) ifndef $(PLAT)
@ -24,7 +24,7 @@ endif
ifeq ($(PLAT),mingw) ifeq ($(PLAT),mingw)
OEXT=.exe OEXT=.exe
CFLAGS=-g -pipe -DUNICODE CFLAGS=-g -pipe -DUNICODE -fno-math-errno
LDFLAGS=-g LDFLAGS=-g
LIBS=-mwindows -lws2_32 -lwininet -lwinmm -limagehlp -lcrypt32 -ld3d9 LIBS=-mwindows -lws2_32 -lwininet -lwinmm -limagehlp -lcrypt32 -ld3d9
endif endif
@ -50,19 +50,19 @@ LIBS=-lcurl -lexecinfo -lopenal -lGL -lX11 -lm -lpthread
endif endif
ifeq ($(PLAT),openbsd) ifeq ($(PLAT),openbsd)
CFLAGS=-g -pipe -rdynamic -I /usr/X11R6/include -I /usr/local/include CFLAGS=-g -pipe -rdynamic -I /usr/X11R6/include -I /usr/local/include -fno-math-errno
LDFLAGS=-L /usr/X11R6/lib -L /usr/local/lib LDFLAGS=-L /usr/X11R6/lib -L /usr/local/lib
LIBS=-lcurl -lexecinfo -lopenal -lGL -lX11 LIBS=-lcurl -lexecinfo -lopenal -lGL -lX11
endif endif
ifeq ($(PLAT),netbsd) ifeq ($(PLAT),netbsd)
CFLAGS=-g -pipe -rdynamic -I /usr/X11R7/include -I /usr/pkg/include CFLAGS=-g -pipe -rdynamic -I /usr/X11R7/include -I /usr/pkg/include -fno-math-errno
LDFLAGS=-L /usr/X11R7/lib -L /usr/pkg/lib LDFLAGS=-L /usr/X11R7/lib -L /usr/pkg/lib
LIBS=-lcurl -lexecinfo -lopenal -lGL -lX11 LIBS=-lcurl -lexecinfo -lopenal -lGL -lX11
endif endif
ifeq ($(PLAT),haiku) ifeq ($(PLAT),haiku)
CFLAGS=-g -pipe CFLAGS=-g -pipe -fno-math-errno
LDFLAGS=-g LDFLAGS=-g
LIBS=-lcurl -lm -lexecinfo -lopenal -lGL -lnetwork -lSDL2 LIBS=-lcurl -lm -lexecinfo -lopenal -lGL -lnetwork -lSDL2
endif endif