Set optimisation on ARM to -O0, which stops tests from hanging.

This commit is contained in:
Simon Byrne 2016-02-23 13:56:12 +00:00
parent 1aa6a0fc7c
commit ac6fb73cba

View file

@ -47,14 +47,6 @@ endif
CFLAGS_add += -std=c99 -Wall -I$(OPENLIBM_HOME) -I$(OPENLIBM_HOME)/include -I$(OPENLIBM_HOME)/ld80 -I$(OPENLIBM_HOME)/$(ARCH) -I$(OPENLIBM_HOME)/src -DASSEMBLER -D__BSD_VISIBLE -Wno-implicit-function-declaration
# The optimization flag may be overriden with the environment variable CFLAGS.
ifeq ($(ARCH),powerpc)
# tests hang at higher optimization levels
CFLAGS ?= -O0
else
CFLAGS ?= -O2
endif
default: all
%.c.o: %.c
@ -85,6 +77,16 @@ ifeq ($(ARCH),x86_64)
override ARCH := amd64
endif
# The optimization flag may be overriden with the environment variable CFLAGS.
ifeq ($(ARCH),powerpc)
# tests hang at higher optimization levels
CFLAGS ?= -O0
else if ($(ARCH),arm)
CFLAGS ?= -O0
else
CFLAGS ?= -O2
endif
ifneq (,$(findstring MINGW,$(OS)))
override OS=WINNT
endif