Commit de04d64eda42490f94d638e8ee2e12e494e80417

Authored by Masahiro Yamada
Committed by Tom Rini
1 parent e2ce81696a

PowerPC: merge commonly-defined flags

PLATFORM_RELFLAGS += -meabi
PLATFORM_CPPFLAGS += -ffixed-r2
were defined in all arch/powerpc/${CPU}/config.mk.

This commit moves them to arch/powerpc/config.mk.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Showing 12 changed files with 15 additions and 39 deletions Side-by-side Diff

arch/powerpc/config.mk
... ... @@ -9,8 +9,9 @@
9 9  
10 10 CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000
11 11 LDFLAGS_FINAL += --gc-sections
12   -PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections
13   -PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
  12 +PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections \
  13 + -meabi
  14 +PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__ -ffixed-r2
14 15 PLATFORM_LDFLAGS += -n
15 16  
16 17 # Support generic board on PPC
arch/powerpc/cpu/74xx_7xx/config.mk
... ... @@ -5,7 +5,5 @@
5 5 # SPDX-License-Identifier: GPL-2.0+
6 6 #
7 7  
8   -PLATFORM_RELFLAGS += -meabi
9   -
10   -PLATFORM_CPPFLAGS += -DCONFIG_74xx_7xx -ffixed-r2 -mstring
  8 +PLATFORM_CPPFLAGS += -DCONFIG_74xx_7xx -mstring
arch/powerpc/cpu/mpc512x/config.mk
... ... @@ -4,8 +4,5 @@
4 4 # SPDX-License-Identifier: GPL-2.0+
5 5 #
6 6  
7   -PLATFORM_RELFLAGS += -meabi
8   -
9   -PLATFORM_CPPFLAGS += -DCONFIG_MPC512X -DCONFIG_E300 \
10   - -ffixed-r2 -msoft-float -mcpu=603e
  7 +PLATFORM_CPPFLAGS += -DCONFIG_MPC512X -DCONFIG_E300 -msoft-float -mcpu=603e
arch/powerpc/cpu/mpc5xx/config.mk
... ... @@ -5,7 +5,5 @@
5 5 # SPDX-License-Identifier: GPL-2.0+
6 6 #
7 7  
8   -PLATFORM_RELFLAGS += -meabi
9   -
10   -PLATFORM_CPPFLAGS += -DCONFIG_5xx -ffixed-r2 -mpowerpc -msoft-float
  8 +PLATFORM_CPPFLAGS += -DCONFIG_5xx -mpowerpc -msoft-float
arch/powerpc/cpu/mpc5xxx/config.mk
... ... @@ -5,8 +5,6 @@
5 5 # SPDX-License-Identifier: GPL-2.0+
6 6 #
7 7  
8   -PLATFORM_RELFLAGS += -meabi
9   -
10   -PLATFORM_CPPFLAGS += -DCONFIG_MPC5xxx -ffixed-r2 \
  8 +PLATFORM_CPPFLAGS += -DCONFIG_MPC5xxx \
11 9 -mstring -mcpu=603e -mmultiple
arch/powerpc/cpu/mpc824x/config.mk
... ... @@ -5,7 +5,5 @@
5 5 # SPDX-License-Identifier: GPL-2.0+
6 6 #
7 7  
8   -PLATFORM_RELFLAGS += -meabi
9   -
10   -PLATFORM_CPPFLAGS += -DCONFIG_MPC824X -ffixed-r2 -mstring -mcpu=603e -msoft-float
  8 +PLATFORM_CPPFLAGS += -DCONFIG_MPC824X -mstring -mcpu=603e -msoft-float
arch/powerpc/cpu/mpc8260/config.mk
... ... @@ -5,8 +5,6 @@
5 5 # SPDX-License-Identifier: GPL-2.0+
6 6 #
7 7  
8   -PLATFORM_RELFLAGS += -meabi
9   -
10   -PLATFORM_CPPFLAGS += -DCONFIG_8260 -DCONFIG_CPM2 -ffixed-r2 \
  8 +PLATFORM_CPPFLAGS += -DCONFIG_8260 -DCONFIG_CPM2 \
11 9 -mstring -mcpu=603e -mmultiple
arch/powerpc/cpu/mpc83xx/config.mk
... ... @@ -4,8 +4,5 @@
4 4 # SPDX-License-Identifier: GPL-2.0+
5 5 #
6 6  
7   -PLATFORM_RELFLAGS += -meabi
8   -
9   -PLATFORM_CPPFLAGS += -DCONFIG_MPC83xx -DCONFIG_E300 \
10   - -ffixed-r2 -msoft-float
  7 +PLATFORM_CPPFLAGS += -DCONFIG_MPC83xx -DCONFIG_E300 -msoft-float
arch/powerpc/cpu/mpc85xx/config.mk
... ... @@ -5,14 +5,11 @@
5 5 # SPDX-License-Identifier: GPL-2.0+
6 6 #
7 7  
8   -PLATFORM_RELFLAGS += -meabi
  8 +PLATFORM_CPPFLAGS += -Wa,-me500 -msoft-float -mno-string
9 9  
10   -PLATFORM_CPPFLAGS += -ffixed-r2 -Wa,-me500 -msoft-float -mno-string
11   -
12 10 # -mspe=yes is needed to have -mno-spe accepted by a buggy GCC;
13 11 # see "[PATCH,rs6000] make -mno-spe work as expected" on
14 12 # http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00311.html
15   -PF_CPPFLAGS_SPE := $(call cc-option,-mspe=yes) \
  13 +PLATFORM_CPPFLAGS += $(call cc-option,-mspe=yes) \
16 14 $(call cc-option,-mno-spe)
17   -PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_SPE)
arch/powerpc/cpu/mpc86xx/config.mk
... ... @@ -5,8 +5,5 @@
5 5 # SPDX-License-Identifier: GPL-2.0+
6 6 #
7 7  
8   -PLATFORM_RELFLAGS += -meabi
9   -
10   -PLATFORM_CPPFLAGS += -ffixed-r2 -mstring
11   -PLATFORM_CPPFLAGS += -maltivec -mabi=altivec -msoft-float
  8 +PLATFORM_CPPFLAGS += -mstring -maltivec -mabi=altivec -msoft-float
arch/powerpc/cpu/mpc8xx/config.mk
... ... @@ -5,7 +5,5 @@
5 5 # SPDX-License-Identifier: GPL-2.0+
6 6 #
7 7  
8   -PLATFORM_RELFLAGS += -meabi
9   -
10   -PLATFORM_CPPFLAGS += -DCONFIG_8xx -ffixed-r2 -mstring -mcpu=860 -msoft-float
  8 +PLATFORM_CPPFLAGS += -DCONFIG_8xx -mstring -mcpu=860 -msoft-float
arch/powerpc/cpu/ppc4xx/config.mk
... ... @@ -5,8 +5,7 @@
5 5 # SPDX-License-Identifier: GPL-2.0+
6 6 #
7 7  
8   -PLATFORM_RELFLAGS += -meabi
9   -PLATFORM_CPPFLAGS += -DCONFIG_4xx -ffixed-r2 -mstring -msoft-float
  8 +PLATFORM_CPPFLAGS += -DCONFIG_4xx -mstring -msoft-float
10 9  
11 10 cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 's/.*<\(configs.*\)>/\1/')
12 11 is440:=$(shell grep CONFIG_440 $(TOPDIR)/include/$(cfg))