diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-11-20 21:12:19 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-12-05 20:45:38 -0500 |
commit | 53644087a607040a56d883df612b588814a56f11 (patch) | |
tree | f58e0bce9093a342e002e4449812b6841a67f254 /arch/sh/Makefile | |
parent | 52e27782e1c4afa1feca0fdf194d279595e0431c (diff) |
sh: Explicit endian selection support.
Previously big endian was simply assumed if little endian was
not set, which led to some cflags ordering issues. There's not
much point to not having a big endian option, so shove one in
a choice and wire it up in the Makefile.
This lets us clean up some of the cflags ordering while we're
at it.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/Makefile')
-rw-r--r-- | arch/sh/Makefile | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index dc43984bd4be..6b3af5ce66a2 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
@@ -13,10 +13,6 @@ | |||
13 | # for "archclean" and "archdep" for cleaning up and making dependencies for | 13 | # for "archclean" and "archdep" for cleaning up and making dependencies for |
14 | # this architecture | 14 | # this architecture |
15 | # | 15 | # |
16 | |||
17 | cflags-y := -mb | ||
18 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) := -ml | ||
19 | |||
20 | isa-y := any | 16 | isa-y := any |
21 | isa-$(CONFIG_SH_DSP) := sh | 17 | isa-$(CONFIG_SH_DSP) := sh |
22 | isa-$(CONFIG_CPU_SH2) := sh2 | 18 | isa-$(CONFIG_CPU_SH2) := sh2 |
@@ -38,13 +34,16 @@ isa-y := $(isa-y)-nofpu | |||
38 | endif | 34 | endif |
39 | endif | 35 | endif |
40 | 36 | ||
41 | cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),) | 37 | cflags-$(CONFIG_CPU_SH2) := -m2 |
42 | 38 | cflags-$(CONFIG_CPU_SH3) := -m3 | |
43 | cflags-$(CONFIG_CPU_SH2) += -m2 | 39 | cflags-$(CONFIG_CPU_SH4) := -m4 \ |
44 | cflags-$(CONFIG_CPU_SH3) += -m3 | ||
45 | cflags-$(CONFIG_CPU_SH4) += -m4 \ | ||
46 | $(call cc-option,-mno-implicit-fp,-m4-nofpu) | 40 | $(call cc-option,-mno-implicit-fp,-m4-nofpu) |
47 | cflags-$(CONFIG_CPU_SH4A) += $(call cc-option,-m4a-nofpu,) | 41 | cflags-$(CONFIG_CPU_SH4A) := -m4a $(call cc-option,-m4a-nofpu,) |
42 | |||
43 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb | ||
44 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml | ||
45 | |||
46 | cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),) | ||
48 | 47 | ||
49 | cflags-$(CONFIG_SH_DSP) += -Wa,-dsp | 48 | cflags-$(CONFIG_SH_DSP) += -Wa,-dsp |
50 | cflags-$(CONFIG_SH_KGDB) += -g | 49 | cflags-$(CONFIG_SH_KGDB) += -g |