diff options
Diffstat (limited to 'arch/parisc/Makefile')
-rw-r--r-- | arch/parisc/Makefile | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index 3b339b1cce13..9b7e42490dd1 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile | |||
@@ -20,7 +20,8 @@ NM = sh $(srctree)/arch/parisc/nm | |||
20 | CHECKFLAGS += -D__hppa__=1 | 20 | CHECKFLAGS += -D__hppa__=1 |
21 | 21 | ||
22 | ifdef CONFIG_64BIT | 22 | ifdef CONFIG_64BIT |
23 | CROSS_COMPILE := hppa64-linux- | 23 | CROSS_COMPILE := $(shell if [ -x /usr/bin/hppa64-linux-gnu-gcc ]; then \ |
24 | echo hppa64-linux-gnu-; else echo hppa64-linux-; fi) | ||
24 | UTS_MACHINE := parisc64 | 25 | UTS_MACHINE := parisc64 |
25 | CHECKFLAGS += -D__LP64__=1 -m64 | 26 | CHECKFLAGS += -D__LP64__=1 -m64 |
26 | else | 27 | else |
@@ -34,6 +35,14 @@ FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align | |||
34 | 35 | ||
35 | OBJCOPY_FLAGS =-O binary -R .note -R .comment -S | 36 | OBJCOPY_FLAGS =-O binary -R .note -R .comment -S |
36 | 37 | ||
38 | GCC_VERSION := $(call cc-version) | ||
39 | ifneq ($(shell if [ -z $(GCC_VERSION) ] ; then echo "bad"; fi ;),) | ||
40 | $(error Sorry, couldn't find ($(cc-version)).) | ||
41 | endif | ||
42 | ifneq ($(shell if [ $(GCC_VERSION) -lt 0303 ] ; then echo "bad"; fi ;),) | ||
43 | $(error Sorry, your compiler is too old ($(GCC_VERSION)). GCC v3.3 or above is required.) | ||
44 | endif | ||
45 | |||
37 | cflags-y := -pipe | 46 | cflags-y := -pipe |
38 | 47 | ||
39 | # These flags should be implied by an hppa-linux configuration, but they | 48 | # These flags should be implied by an hppa-linux configuration, but they |
@@ -43,7 +52,7 @@ cflags-y += -mno-space-regs -mfast-indirect-calls | |||
43 | # Currently we save and restore fpregs on all kernel entry/interruption paths. | 52 | # Currently we save and restore fpregs on all kernel entry/interruption paths. |
44 | # If that gets optimized, we might need to disable the use of fpregs in the | 53 | # If that gets optimized, we might need to disable the use of fpregs in the |
45 | # kernel. | 54 | # kernel. |
46 | #cflags-y += -mdisable-fpregs | 55 | cflags-y += -mdisable-fpregs |
47 | 56 | ||
48 | # Without this, "ld -r" results in .text sections that are too big | 57 | # Without this, "ld -r" results in .text sections that are too big |
49 | # (> 0x40000) for branches to reach stubs. | 58 | # (> 0x40000) for branches to reach stubs. |