70 |
70 |
endif
|
71 |
71 |
|
72 |
72 |
# We require -O2 to avoid the stack setup prologue in EXIT_TB
|
73 |
|
OP_CFLAGS = -Wall -O2 -g -fno-strict-aliasing
|
|
73 |
OP_CFLAGS := -Wall -O2 -g -fno-strict-aliasing
|
|
74 |
|
|
75 |
# cc-option
|
|
76 |
# Usage: OP_CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0)
|
|
77 |
|
|
78 |
cc-option = $(shell if $(CC) $(OP_CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
|
|
79 |
> /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
|
|
80 |
|
|
81 |
OP_CFLAGS+=$(call cc-option, -fno-reorder-blocks, "")
|
|
82 |
OP_CFLAGS+=$(call cc-option, -fno-gcse, "")
|
|
83 |
OP_CFLAGS+=$(call cc-option, -fno-tree-ch, "")
|
|
84 |
OP_CFLAGS+=$(call cc-option, -fno-optimize-sibling-calls, "")
|
|
85 |
OP_CFLAGS+=$(call cc-option, -fno-crossjumping, "")
|
|
86 |
OP_CFLAGS+=$(call cc-option, -fno-align-labels, "")
|
|
87 |
OP_CFLAGS+=$(call cc-option, -fno-align-jumps, "")
|
|
88 |
OP_CFLAGS+=$(call cc-option, -fno-align-functions, $(call cc-option, -malign-functions=0, ""))
|
74 |
89 |
|
75 |
90 |
ifeq ($(ARCH),i386)
|
76 |
91 |
HELPER_CFLAGS+=-fomit-frame-pointer
|
77 |
92 |
OP_CFLAGS+=-mpreferred-stack-boundary=2 -fomit-frame-pointer
|
78 |
|
ifeq ($(HAVE_GCC3_OPTIONS),yes)
|
79 |
|
OP_CFLAGS+= -falign-functions=0 -fno-gcse
|
80 |
|
else
|
81 |
|
OP_CFLAGS+= -malign-functions=0
|
82 |
|
endif
|
83 |
93 |
ifdef TARGET_GPROF
|
84 |
94 |
USE_I386_LD=y
|
85 |
95 |
endif
|
... | ... | |
163 |
173 |
BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
|
164 |
174 |
endif
|
165 |
175 |
|
166 |
|
ifeq ($(HAVE_GCC3_OPTIONS),yes)
|
167 |
|
# very important to generate a return at the end of every operation
|
168 |
|
OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls
|
169 |
|
endif
|
170 |
|
|
171 |
176 |
ifeq ($(CONFIG_DARWIN),yes)
|
172 |
177 |
LIBS+=-lmx
|
173 |
178 |
endif
|