Skip to content

Commit ac6fb73

Browse files
committed
Set optimisation on ARM to -O0, which stops tests from hanging.
1 parent 1aa6a0f commit ac6fb73

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

Make.inc

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,6 @@ endif
4747

4848
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
4949

50-
# The optimization flag may be overriden with the environment variable CFLAGS.
51-
ifeq ($(ARCH),powerpc)
52-
# tests hang at higher optimization levels
53-
CFLAGS ?= -O0
54-
else
55-
CFLAGS ?= -O2
56-
endif
57-
5850
default: all
5951

6052
%.c.o: %.c
@@ -85,6 +77,16 @@ ifeq ($(ARCH),x86_64)
8577
override ARCH := amd64
8678
endif
8779

80+
# The optimization flag may be overriden with the environment variable CFLAGS.
81+
ifeq ($(ARCH),powerpc)
82+
# tests hang at higher optimization levels
83+
CFLAGS ?= -O0
84+
else if ($(ARCH),arm)
85+
CFLAGS ?= -O0
86+
else
87+
CFLAGS ?= -O2
88+
endif
89+
8890
ifneq (,$(findstring MINGW,$(OS)))
8991
override OS=WINNT
9092
endif

0 commit comments

Comments
 (0)