Browse Source

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

Simon Byrne 9 years ago
parent
commit
ac6fb73cba
1 changed files with 10 additions and 8 deletions
  1. 10 8
      Make.inc

+ 10 - 8
Make.inc

@@ -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