make/linux/makefiles/gcc.make

changeset 7994
04ff2f6cd0eb
parent 7615
47e6df07ca93
parent 6876
710a3c8b516e
child 9203
53eec13fbaa5
equal deleted inserted replaced
7993:9bf9a733246b 7994:04ff2f6cd0eb
18 # 18 #
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 # or visit www.oracle.com if you need additional information or have any 20 # or visit www.oracle.com if you need additional information or have any
21 # questions. 21 # questions.
22 # 22 #
23 #
24
25 #
26 # This file has been modified by Loongson Technology in 2015. These
27 # modifications are Copyright (c) 2015 Loongson Technology, and are made
28 # available on the same license terms set forth above.
23 # 29 #
24 30
25 #------------------------------------------------------------------------ 31 #------------------------------------------------------------------------
26 # CC, CXX & AS 32 # CC, CXX & AS
27 33
174 ARCHFLAG/i486 = -m32 -march=i586 180 ARCHFLAG/i486 = -m32 -march=i586
175 ARCHFLAG/amd64 = -m64 $(STACK_ALIGNMENT_OPT) 181 ARCHFLAG/amd64 = -m64 $(STACK_ALIGNMENT_OPT)
176 ARCHFLAG/ia64 = 182 ARCHFLAG/ia64 =
177 ARCHFLAG/sparc = -m32 -mcpu=v9 183 ARCHFLAG/sparc = -m32 -mcpu=v9
178 ARCHFLAG/sparcv9 = -m64 -mcpu=v9 184 ARCHFLAG/sparcv9 = -m64 -mcpu=v9
185 ARCHFLAG/mips64 = -mabi=64
179 ARCHFLAG/zero = $(ZERO_ARCHFLAG) 186 ARCHFLAG/zero = $(ZERO_ARCHFLAG)
180 ARCHFLAG/ppc64 = -m64 187 ARCHFLAG/ppc64 = -m64
181 188
182 CFLAGS += $(ARCHFLAG) 189 CFLAGS += $(ARCHFLAG)
183 AOUT_FLAGS += $(ARCHFLAG) 190 AOUT_FLAGS += $(ARCHFLAG)
195 else 202 else
196 CFLAGS += -pipe 203 CFLAGS += -pipe
197 endif 204 endif
198 205
199 # Compiler warnings are treated as errors 206 # Compiler warnings are treated as errors
200 WARNINGS_ARE_ERRORS = -Werror 207 #WARNINGS_ARE_ERRORS = -Werror
201 208
202 ifeq ($(USE_CLANG), true) 209 ifeq ($(USE_CLANG), true)
203 # However we need to clean the code up before we can unrestrictedly enable this option with Clang 210 # However we need to clean the code up before we can unrestrictedly enable this option with Clang
204 WARNINGS_ARE_ERRORS += -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses 211 WARNINGS_ARE_ERRORS += -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses
205 WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare 212 WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare
336 # (warning: that could easily inflate libjvm.so to 150M!) 343 # (warning: that could easily inflate libjvm.so to 150M!)
337 # Note: The Itanium gcc compiler crashes when using -gstabs. 344 # Note: The Itanium gcc compiler crashes when using -gstabs.
338 DEBUG_CFLAGS/ia64 = -g 345 DEBUG_CFLAGS/ia64 = -g
339 DEBUG_CFLAGS/amd64 = -g 346 DEBUG_CFLAGS/amd64 = -g
340 DEBUG_CFLAGS/ppc64 = -g 347 DEBUG_CFLAGS/ppc64 = -g
348 DEBUG_CFLAGS/mips64 = -g
341 DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH)) 349 DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
342 ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),) 350 ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),)
343 ifeq ($(USE_CLANG), true) 351 ifeq ($(USE_CLANG), true)
344 # Clang doesn't understand -gstabs 352 # Clang doesn't understand -gstabs
345 DEBUG_CFLAGS/$(BUILDARCH) = -g 353 DEBUG_CFLAGS/$(BUILDARCH) = -g
350 358
351 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 359 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
352 FASTDEBUG_CFLAGS/ia64 = -g 360 FASTDEBUG_CFLAGS/ia64 = -g
353 FASTDEBUG_CFLAGS/amd64 = -g 361 FASTDEBUG_CFLAGS/amd64 = -g
354 FASTDEBUG_CFLAGS/ppc64 = -g 362 FASTDEBUG_CFLAGS/ppc64 = -g
363 FASTDEBUG_CFLAGS/mips64 = -g
355 FASTDEBUG_CFLAGS += $(FASTDEBUG_CFLAGS/$(BUILDARCH)) 364 FASTDEBUG_CFLAGS += $(FASTDEBUG_CFLAGS/$(BUILDARCH))
356 ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),) 365 ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),)
357 ifeq ($(USE_CLANG), true) 366 ifeq ($(USE_CLANG), true)
358 # Clang doesn't understand -gstabs 367 # Clang doesn't understand -gstabs
359 FASTDEBUG_CFLAGS/$(BUILDARCH) = -g 368 FASTDEBUG_CFLAGS/$(BUILDARCH) = -g
363 endif 372 endif
364 373
365 OPT_CFLAGS/ia64 = -g 374 OPT_CFLAGS/ia64 = -g
366 OPT_CFLAGS/amd64 = -g 375 OPT_CFLAGS/amd64 = -g
367 OPT_CFLAGS/ppc64 = -g 376 OPT_CFLAGS/ppc64 = -g
377 OPT_CFLAGS/mips64 = -g
368 OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH)) 378 OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH))
369 ifeq ($(OPT_CFLAGS/$(BUILDARCH)),) 379 ifeq ($(OPT_CFLAGS/$(BUILDARCH)),)
370 ifeq ($(USE_CLANG), true) 380 ifeq ($(USE_CLANG), true)
371 # Clang doesn't understand -gstabs 381 # Clang doesn't understand -gstabs
372 OPT_CFLAGS/$(BUILDARCH) = -g 382 OPT_CFLAGS/$(BUILDARCH) = -g

mercurial