155 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
156 CFLAGS += -fvisibility=hidden
157 endif
158 else
159 CFLAGS += -fvisibility=hidden
160 endif
161
162 ifeq ($(USE_CLANG), true)
163 # Before Clang 3.1, we had to pass the stack alignment specification directly to llvm with the help of '-mllvm'
164 # Starting with version 3.1, Clang understands the '-mstack-alignment' (and rejects '-mllvm -stack-alignment')
165 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 1 \) \))" "0"
166 STACK_ALIGNMENT_OPT = -mno-omit-leaf-frame-pointer -mstack-alignment=16
167 else
168 STACK_ALIGNMENT_OPT = -mno-omit-leaf-frame-pointer -mllvm -stack-alignment=16
169 endif
170 endif
171
172 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
173 ARCHFLAG/i486 = -m32 -march=i586
174 ARCHFLAG/amd64 = -m64 $(STACK_ALIGNMENT_OPT)
175 ARCHFLAG/ia64 =
176 ARCHFLAG/sparc = -m32 -mcpu=v9
177 ARCHFLAG/sparcv9 = -m64 -mcpu=v9
178 ARCHFLAG/arm = -fsigned-char
179 ARCHFLAG/zero = $(ZERO_ARCHFLAG)
180 ifndef E500V2
181 ARCHFLAG/ppc = -mcpu=powerpc
182 endif
183 ARCHFLAG/ppc64 = -m64
184
185 CFLAGS += $(ARCHFLAG)
186 AOUT_FLAGS += $(ARCHFLAG)
187 LFLAGS += $(ARCHFLAG)
188 ASFLAGS += $(ARCHFLAG)
189
190 ifdef E500V2
191 CFLAGS += -DE500V2
192 endif
193
194 # Use C++ Interpreter
|
155 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
156 CFLAGS += -fvisibility=hidden
157 endif
158 else
159 CFLAGS += -fvisibility=hidden
160 endif
161
162 ifeq ($(USE_CLANG), true)
163 # Before Clang 3.1, we had to pass the stack alignment specification directly to llvm with the help of '-mllvm'
164 # Starting with version 3.1, Clang understands the '-mstack-alignment' (and rejects '-mllvm -stack-alignment')
165 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 1 \) \))" "0"
166 STACK_ALIGNMENT_OPT = -mno-omit-leaf-frame-pointer -mstack-alignment=16
167 else
168 STACK_ALIGNMENT_OPT = -mno-omit-leaf-frame-pointer -mllvm -stack-alignment=16
169 endif
170 endif
171
172 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
173 ARCHFLAG/i486 = -m32 -march=i586
174 ARCHFLAG/amd64 = -m64 $(STACK_ALIGNMENT_OPT)
175 ARCHFLAG/aarch64 =
176 ARCHFLAG/ia64 =
177 ARCHFLAG/sparc = -m32 -mcpu=v9
178 ARCHFLAG/sparcv9 = -m64 -mcpu=v9
179 ARCHFLAG/arm = -fsigned-char
180 ARCHFLAG/zero = $(ZERO_ARCHFLAG)
181 ifndef E500V2
182 ARCHFLAG/ppc = -mcpu=powerpc
183 endif
184 ARCHFLAG/ppc64 = -m64
185
186 CFLAGS += $(ARCHFLAG)
187 AOUT_FLAGS += $(ARCHFLAG)
188 LFLAGS += $(ARCHFLAG)
189 ASFLAGS += $(ARCHFLAG)
190
191 ifdef E500V2
192 CFLAGS += -DE500V2
193 endif
194
195 # Use C++ Interpreter
|