aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/Makefile')
-rw-r--r--arch/sparc64/Makefile36
1 files changed, 5 insertions, 31 deletions
diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile
index 01159cb5f16d..f0c22f826982 100644
--- a/arch/sparc64/Makefile
+++ b/arch/sparc64/Makefile
@@ -12,39 +12,13 @@ CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -m64
12 12
13CPPFLAGS_vmlinux.lds += -Usparc 13CPPFLAGS_vmlinux.lds += -Usparc
14 14
15CC := $(shell if $(CC) -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo $(CC); else echo sparc64-linux-gcc; fi )
16
17NEW_GCC := $(call cc-option-yn, -m64 -mcmodel=medlow)
18NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi)
19UNDECLARED_REGS := $(shell if $(CC) -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null; then echo y; else echo n; fi; )
20
21ifneq ($(NEW_GAS),y)
22AS = sparc64-linux-as
23LD = sparc64-linux-ld
24NM = sparc64-linux-nm
25AR = sparc64-linux-ar
26RANLIB = sparc64-linux-ranlib
27else
28AS := $(AS) -64
29LDFLAGS := -m elf64_sparc 15LDFLAGS := -m elf64_sparc
30endif
31 16
32ifneq ($(UNDECLARED_REGS),y) 17KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \
33CC_UNDECL = 18 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \
34else 19 -Wa,--undeclared-regs
35CC_UNDECL = -Wa,--undeclared-regs 20KBUILD_CFLAGS += $(call cc-option,-mtune=ultrasparc3)
36AS := $(AS) --undeclared-regs 21KBUILD_AFLAGS += -m64 -mcpu=ultrasparc -Wa,--undeclared-regs
37endif
38
39ifneq ($(NEW_GCC),y)
40 KBUILD_CFLAGS += -pipe -mno-fpu -mtune=ultrasparc -mmedlow \
41 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare
42else
43 KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \
44 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \
45 $(CC_UNDECL)
46 KBUILD_AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL)
47endif
48 22
49ifeq ($(CONFIG_MCOUNT),y) 23ifeq ($(CONFIG_MCOUNT),y)
50 KBUILD_CFLAGS += -pg 24 KBUILD_CFLAGS += -pg