diff options
Diffstat (limited to 'arch/parisc/Makefile')
-rw-r--r-- | arch/parisc/Makefile | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index 2f967cc6649e..197690068f88 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile | |||
@@ -23,24 +23,21 @@ NM = sh $(srctree)/arch/parisc/nm | |||
23 | CHECKFLAGS += -D__hppa__=1 | 23 | CHECKFLAGS += -D__hppa__=1 |
24 | LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) | 24 | LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) |
25 | 25 | ||
26 | MACHINE := $(shell uname -m) | ||
27 | NATIVE := $(if $(filter parisc%,$(MACHINE)),1,0) | ||
28 | |||
29 | ifdef CONFIG_64BIT | 26 | ifdef CONFIG_64BIT |
30 | UTS_MACHINE := parisc64 | 27 | UTS_MACHINE := parisc64 |
31 | CHECKFLAGS += -D__LP64__=1 -m64 | 28 | CHECKFLAGS += -D__LP64__=1 -m64 |
32 | WIDTH := 64 | 29 | CC_ARCHES = hppa64 |
33 | else # 32-bit | 30 | else # 32-bit |
34 | WIDTH := | 31 | CC_ARCHES = hppa hppa2.0 hppa1.1 |
35 | endif | 32 | endif |
36 | 33 | ||
37 | # attempt to help out folks who are cross-compiling | 34 | ifneq ($(SUBARCH),$(UTS_MACHINE)) |
38 | ifeq ($(NATIVE),1) | 35 | ifeq ($(CROSS_COMPILE),) |
39 | CROSS_COMPILE := hppa$(WIDTH)-linux- | 36 | CC_SUFFIXES = linux linux-gnu unknown-linux-gnu |
40 | else | 37 | CROSS_COMPILE := $(call cc-cross-prefix, \ |
41 | ifeq ($(CROSS_COMPILE),) | 38 | $(foreach a,$(CC_ARCHES), \ |
42 | CROSS_COMPILE := hppa$(WIDTH)-linux-gnu- | 39 | $(foreach s,$(CC_SUFFIXES),$(a)-$(s)-))) |
43 | endif | 40 | endif |
44 | endif | 41 | endif |
45 | 42 | ||
46 | OBJCOPY_FLAGS =-O binary -R .note -R .comment -S | 43 | OBJCOPY_FLAGS =-O binary -R .note -R .comment -S |