diff options
Diffstat (limited to 'arch/mips/Makefile')
-rw-r--r-- | arch/mips/Makefile | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 14164c2b8791..23c17755eca0 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -18,15 +18,15 @@ cflags-y := | |||
18 | # Select the object file format to substitute into the linker script. | 18 | # Select the object file format to substitute into the linker script. |
19 | # | 19 | # |
20 | ifdef CONFIG_CPU_LITTLE_ENDIAN | 20 | ifdef CONFIG_CPU_LITTLE_ENDIAN |
21 | 32bit-tool-prefix = mipsel-linux- | 21 | 32bit-tool-archpref = mipsel |
22 | 64bit-tool-prefix = mips64el-linux- | 22 | 64bit-tool-archpref = mips64el |
23 | 32bit-bfd = elf32-tradlittlemips | 23 | 32bit-bfd = elf32-tradlittlemips |
24 | 64bit-bfd = elf64-tradlittlemips | 24 | 64bit-bfd = elf64-tradlittlemips |
25 | 32bit-emul = elf32ltsmip | 25 | 32bit-emul = elf32ltsmip |
26 | 64bit-emul = elf64ltsmip | 26 | 64bit-emul = elf64ltsmip |
27 | else | 27 | else |
28 | 32bit-tool-prefix = mips-linux- | 28 | 32bit-tool-archpref = mips |
29 | 64bit-tool-prefix = mips64-linux- | 29 | 64bit-tool-archpref = mips64 |
30 | 32bit-bfd = elf32-tradbigmips | 30 | 32bit-bfd = elf32-tradbigmips |
31 | 64bit-bfd = elf64-tradbigmips | 31 | 64bit-bfd = elf64-tradbigmips |
32 | 32bit-emul = elf32btsmip | 32 | 32bit-emul = elf32btsmip |
@@ -34,16 +34,18 @@ else | |||
34 | endif | 34 | endif |
35 | 35 | ||
36 | ifdef CONFIG_32BIT | 36 | ifdef CONFIG_32BIT |
37 | tool-prefix = $(32bit-tool-prefix) | 37 | tool-archpref = $(32bit-tool-archpref) |
38 | UTS_MACHINE := mips | 38 | UTS_MACHINE := mips |
39 | endif | 39 | endif |
40 | ifdef CONFIG_64BIT | 40 | ifdef CONFIG_64BIT |
41 | tool-prefix = $(64bit-tool-prefix) | 41 | tool-archpref = $(64bit-tool-archpref) |
42 | UTS_MACHINE := mips64 | 42 | UTS_MACHINE := mips64 |
43 | endif | 43 | endif |
44 | 44 | ||
45 | ifdef CONFIG_CROSSCOMPILE | 45 | ifneq ($(SUBARCH),$(ARCH)) |
46 | CROSS_COMPILE := $(tool-prefix) | 46 | ifeq ($(CROSS_COMPILE),) |
47 | CROSS_COMPILE := $(call cc-cross-prefix, $(tool-archpref)-linux- $(tool-archpref)-gnu-linux- $(tool-archpref)-unknown-gnu-linux-) | ||
48 | endif | ||
47 | endif | 49 | endif |
48 | 50 | ||
49 | ifdef CONFIG_32BIT | 51 | ifdef CONFIG_32BIT |