Patchwork [U-Boot] ARM: refactor compiler options in config.mk

login
register
mail settings
Submitter Masahiro Yamada
Date Sept. 7, 2013, 8:42 a.m.
Message ID <1378543357-27034-1-git-send-email-yamada.m@jp.panasonic.com>
Download mbox | patch
Permalink /patch/273377/
State Accepted
Delegated to: Albert ARIBAUD
Headers show

Comments

Masahiro Yamada - Sept. 7, 2013, 8:42 a.m.
Every ARM cpu config.mk (arch/arm/cpu/{CPUDIR}/config.mk) defines:

PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float

So, this patch moves the common compiler options to arch/arm/config.mk.

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

Note:
This commit keeps arch/arm/cpu/s3c44b0/config.mk untouched.
because arch/arm/cpu/s3c44b0/* is the remainder of dead board
and is expected to deleted soon.
See 'ARM: s3c44b0: remove remainders of dead board' patch
posted by me, Aug 19, 2013.


 arch/arm/config.mk                   |    3 ++-
 arch/arm/cpu/arm1136/config.mk       |    1 -
 arch/arm/cpu/arm1176/config.mk       |    1 -
 arch/arm/cpu/arm720t/config.mk       |    2 --
 arch/arm/cpu/arm920t/config.mk       |    2 --
 arch/arm/cpu/arm925t/config.mk       |    2 --
 arch/arm/cpu/arm926ejs/config.mk     |    2 --
 arch/arm/cpu/arm946es/config.mk      |    2 --
 arch/arm/cpu/arm_intcm/config.mk     |    2 --
 arch/arm/cpu/armv7/config.mk         |    1 -
 arch/arm/cpu/armv7/rmobile/config.mk |    1 -
 arch/arm/cpu/ixp/config.mk           |    2 +-
 arch/arm/cpu/pxa/config.mk           |    2 --
 arch/arm/cpu/sa1100/config.mk        |    2 --
 14 files changed, 3 insertions(+), 22 deletions(-)
Albert ARIBAUD - Sept. 23, 2013, 3:46 p.m.
Hi Masahiro,

On Sat,  7 Sep 2013 17:42:37 +0900, Masahiro Yamada
<yamada.m@jp.panasonic.com> wrote:

> Every ARM cpu config.mk (arch/arm/cpu/{CPUDIR}/config.mk) defines:
> 
> PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
> 
> So, this patch moves the common compiler options to arch/arm/config.mk.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> ---
> 
> Note:
> This commit keeps arch/arm/cpu/s3c44b0/config.mk untouched.
> because arch/arm/cpu/s3c44b0/* is the remainder of dead board
> and is expected to deleted soon.
> See 'ARM: s3c44b0: remove remainders of dead board' patch
> posted by me, Aug 19, 2013.
> 
> 
>  arch/arm/config.mk                   |    3 ++-
>  arch/arm/cpu/arm1136/config.mk       |    1 -
>  arch/arm/cpu/arm1176/config.mk       |    1 -
>  arch/arm/cpu/arm720t/config.mk       |    2 --
>  arch/arm/cpu/arm920t/config.mk       |    2 --
>  arch/arm/cpu/arm925t/config.mk       |    2 --
>  arch/arm/cpu/arm926ejs/config.mk     |    2 --
>  arch/arm/cpu/arm946es/config.mk      |    2 --
>  arch/arm/cpu/arm_intcm/config.mk     |    2 --
>  arch/arm/cpu/armv7/config.mk         |    1 -
>  arch/arm/cpu/armv7/rmobile/config.mk |    1 -
>  arch/arm/cpu/ixp/config.mk           |    2 +-
>  arch/arm/cpu/pxa/config.mk           |    2 --
>  arch/arm/cpu/sa1100/config.mk        |    2 --
>  14 files changed, 3 insertions(+), 22 deletions(-)
> 
> diff --git a/arch/arm/config.mk b/arch/arm/config.mk
> index 540a119..a2f3261 100644
> --- a/arch/arm/config.mk
> +++ b/arch/arm/config.mk
> @@ -16,7 +16,8 @@ endif
>  endif
>  
>  LDFLAGS_FINAL += --gc-sections
> -PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
> +PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections \
> +                     -fno-common -ffixed-r8 -msoft-float
>  
>  # Support generic board on ARM
>  __HAVE_ARCH_GENERIC_BOARD := y
> diff --git a/arch/arm/cpu/arm1136/config.mk b/arch/arm/cpu/arm1136/config.mk
> index 1ef6061..b4d396d 100644
> --- a/arch/arm/cpu/arm1136/config.mk
> +++ b/arch/arm/cpu/arm1136/config.mk
> @@ -4,7 +4,6 @@
>  #
>  # SPDX-License-Identifier:	GPL-2.0+
>  #
> -PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
>  
>  # Make ARMv5 to allow more compilers to work, even though its v6.
>  PLATFORM_CPPFLAGS += -march=armv5
> diff --git a/arch/arm/cpu/arm1176/config.mk b/arch/arm/cpu/arm1176/config.mk
> index 917da03..f4631cb 100644
> --- a/arch/arm/cpu/arm1176/config.mk
> +++ b/arch/arm/cpu/arm1176/config.mk
> @@ -4,7 +4,6 @@
>  #
>  # SPDX-License-Identifier:	GPL-2.0+
>  #
> -PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
>  
>  # Make ARMv5 to allow more compilers to work, even though its v6.
>  PLATFORM_CPPFLAGS += -march=armv5t
> diff --git a/arch/arm/cpu/arm720t/config.mk b/arch/arm/cpu/arm720t/config.mk
> index 56b6280..2581f0a 100644
> --- a/arch/arm/cpu/arm720t/config.mk
> +++ b/arch/arm/cpu/arm720t/config.mk
> @@ -6,8 +6,6 @@
>  # SPDX-License-Identifier:	GPL-2.0+
>  #
>  
> -PLATFORM_RELFLAGS +=  -fno-common -ffixed-r8 -msoft-float
> -
>  PLATFORM_CPPFLAGS += -march=armv4 -mtune=arm7tdmi
>  # =========================================================================
>  #
> diff --git a/arch/arm/cpu/arm920t/config.mk b/arch/arm/cpu/arm920t/config.mk
> index 58fd756..67537dc 100644
> --- a/arch/arm/cpu/arm920t/config.mk
> +++ b/arch/arm/cpu/arm920t/config.mk
> @@ -5,8 +5,6 @@
>  # SPDX-License-Identifier:	GPL-2.0+
>  #
>  
> -PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
> -
>  PLATFORM_CPPFLAGS += -march=armv4
>  # =========================================================================
>  #
> diff --git a/arch/arm/cpu/arm925t/config.mk b/arch/arm/cpu/arm925t/config.mk
> index 58fd756..67537dc 100644
> --- a/arch/arm/cpu/arm925t/config.mk
> +++ b/arch/arm/cpu/arm925t/config.mk
> @@ -5,8 +5,6 @@
>  # SPDX-License-Identifier:	GPL-2.0+
>  #
>  
> -PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
> -
>  PLATFORM_CPPFLAGS += -march=armv4
>  # =========================================================================
>  #
> diff --git a/arch/arm/cpu/arm926ejs/config.mk b/arch/arm/cpu/arm926ejs/config.mk
> index 917ff7e..12b0d09 100644
> --- a/arch/arm/cpu/arm926ejs/config.mk
> +++ b/arch/arm/cpu/arm926ejs/config.mk
> @@ -5,8 +5,6 @@
>  # SPDX-License-Identifier:	GPL-2.0+
>  #
>  
> -PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
> -
>  PLATFORM_CPPFLAGS += -march=armv5te
>  # =========================================================================
>  #
> diff --git a/arch/arm/cpu/arm946es/config.mk b/arch/arm/cpu/arm946es/config.mk
> index 1e41c11..eb81a57 100644
> --- a/arch/arm/cpu/arm946es/config.mk
> +++ b/arch/arm/cpu/arm946es/config.mk
> @@ -5,8 +5,6 @@
>  # SPDX-License-Identifier:	GPL-2.0+
>  #
>  
> -PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
> -
>  PLATFORM_CPPFLAGS +=  -march=armv4
>  # =========================================================================
>  #
> diff --git a/arch/arm/cpu/arm_intcm/config.mk b/arch/arm/cpu/arm_intcm/config.mk
> index 1e41c11..eb81a57 100644
> --- a/arch/arm/cpu/arm_intcm/config.mk
> +++ b/arch/arm/cpu/arm_intcm/config.mk
> @@ -5,8 +5,6 @@
>  # SPDX-License-Identifier:	GPL-2.0+
>  #
>  
> -PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
> -
>  PLATFORM_CPPFLAGS +=  -march=armv4
>  # =========================================================================
>  #
> diff --git a/arch/arm/cpu/armv7/config.mk b/arch/arm/cpu/armv7/config.mk
> index ca4a9e7..f0d9c04 100644
> --- a/arch/arm/cpu/armv7/config.mk
> +++ b/arch/arm/cpu/armv7/config.mk
> @@ -4,7 +4,6 @@
>  #
>  # SPDX-License-Identifier:	GPL-2.0+
>  #
> -PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
>  
>  # If armv7-a is not supported by GCC fall-back to armv5, which is
>  # supported by more tool-chains
> diff --git a/arch/arm/cpu/armv7/rmobile/config.mk b/arch/arm/cpu/armv7/rmobile/config.mk
> index 4f01610..3a36ab6 100644
> --- a/arch/arm/cpu/armv7/rmobile/config.mk
> +++ b/arch/arm/cpu/armv7/rmobile/config.mk
> @@ -4,7 +4,6 @@
>  #
>  # SPDX-License-Identifier:	GPL-2.0+
>  #
> -PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
>  
>  # Make ARMv5 to allow more compilers to work, even though its v7a.
>  PLATFORM_CPPFLAGS += -march=armv5
> diff --git a/arch/arm/cpu/ixp/config.mk b/arch/arm/cpu/ixp/config.mk
> index 0f12f8b..fd47c60 100644
> --- a/arch/arm/cpu/ixp/config.mk
> +++ b/arch/arm/cpu/ixp/config.mk
> @@ -8,7 +8,7 @@
>  
>  BIG_ENDIAN = y
>  
> -PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float -mbig-endian
> +PLATFORM_RELFLAGS += -mbig-endian
>  
>  PLATFORM_CPPFLAGS += -mbig-endian -march=armv5te -mtune=strongarm1100
>  
> diff --git a/arch/arm/cpu/pxa/config.mk b/arch/arm/cpu/pxa/config.mk
> index 535bca3..d8d263d 100644
> --- a/arch/arm/cpu/pxa/config.mk
> +++ b/arch/arm/cpu/pxa/config.mk
> @@ -6,8 +6,6 @@
>  # SPDX-License-Identifier:	GPL-2.0+
>  #
>  
> -PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
> -
>  PLATFORM_CPPFLAGS += -mcpu=xscale
>  # =========================================================================
>  #
> diff --git a/arch/arm/cpu/sa1100/config.mk b/arch/arm/cpu/sa1100/config.mk
> index 576f685..b3026cc 100644
> --- a/arch/arm/cpu/sa1100/config.mk
> +++ b/arch/arm/cpu/sa1100/config.mk
> @@ -6,8 +6,6 @@
>  # SPDX-License-Identifier:	GPL-2.0+
>  #
>  
> -PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
> -
>  PLATFORM_CPPFLAGS += -march=armv4 -mtune=strongarm1100
>  # =========================================================================
>  #

Applied to u-boot-arm/master as a prerequisite to the "ARM: use r9 for
gd instead of r8" series, thanks!

Amicalement,

Patch

diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 540a119..a2f3261 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -16,7 +16,8 @@  endif
 endif
 
 LDFLAGS_FINAL += --gc-sections
-PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections \
+                     -fno-common -ffixed-r8 -msoft-float
 
 # Support generic board on ARM
 __HAVE_ARCH_GENERIC_BOARD := y
diff --git a/arch/arm/cpu/arm1136/config.mk b/arch/arm/cpu/arm1136/config.mk
index 1ef6061..b4d396d 100644
--- a/arch/arm/cpu/arm1136/config.mk
+++ b/arch/arm/cpu/arm1136/config.mk
@@ -4,7 +4,6 @@ 
 #
 # SPDX-License-Identifier:	GPL-2.0+
 #
-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 # Make ARMv5 to allow more compilers to work, even though its v6.
 PLATFORM_CPPFLAGS += -march=armv5
diff --git a/arch/arm/cpu/arm1176/config.mk b/arch/arm/cpu/arm1176/config.mk
index 917da03..f4631cb 100644
--- a/arch/arm/cpu/arm1176/config.mk
+++ b/arch/arm/cpu/arm1176/config.mk
@@ -4,7 +4,6 @@ 
 #
 # SPDX-License-Identifier:	GPL-2.0+
 #
-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 # Make ARMv5 to allow more compilers to work, even though its v6.
 PLATFORM_CPPFLAGS += -march=armv5t
diff --git a/arch/arm/cpu/arm720t/config.mk b/arch/arm/cpu/arm720t/config.mk
index 56b6280..2581f0a 100644
--- a/arch/arm/cpu/arm720t/config.mk
+++ b/arch/arm/cpu/arm720t/config.mk
@@ -6,8 +6,6 @@ 
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-PLATFORM_RELFLAGS +=  -fno-common -ffixed-r8 -msoft-float
-
 PLATFORM_CPPFLAGS += -march=armv4 -mtune=arm7tdmi
 # =========================================================================
 #
diff --git a/arch/arm/cpu/arm920t/config.mk b/arch/arm/cpu/arm920t/config.mk
index 58fd756..67537dc 100644
--- a/arch/arm/cpu/arm920t/config.mk
+++ b/arch/arm/cpu/arm920t/config.mk
@@ -5,8 +5,6 @@ 
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
-
 PLATFORM_CPPFLAGS += -march=armv4
 # =========================================================================
 #
diff --git a/arch/arm/cpu/arm925t/config.mk b/arch/arm/cpu/arm925t/config.mk
index 58fd756..67537dc 100644
--- a/arch/arm/cpu/arm925t/config.mk
+++ b/arch/arm/cpu/arm925t/config.mk
@@ -5,8 +5,6 @@ 
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
-
 PLATFORM_CPPFLAGS += -march=armv4
 # =========================================================================
 #
diff --git a/arch/arm/cpu/arm926ejs/config.mk b/arch/arm/cpu/arm926ejs/config.mk
index 917ff7e..12b0d09 100644
--- a/arch/arm/cpu/arm926ejs/config.mk
+++ b/arch/arm/cpu/arm926ejs/config.mk
@@ -5,8 +5,6 @@ 
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
-
 PLATFORM_CPPFLAGS += -march=armv5te
 # =========================================================================
 #
diff --git a/arch/arm/cpu/arm946es/config.mk b/arch/arm/cpu/arm946es/config.mk
index 1e41c11..eb81a57 100644
--- a/arch/arm/cpu/arm946es/config.mk
+++ b/arch/arm/cpu/arm946es/config.mk
@@ -5,8 +5,6 @@ 
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
-
 PLATFORM_CPPFLAGS +=  -march=armv4
 # =========================================================================
 #
diff --git a/arch/arm/cpu/arm_intcm/config.mk b/arch/arm/cpu/arm_intcm/config.mk
index 1e41c11..eb81a57 100644
--- a/arch/arm/cpu/arm_intcm/config.mk
+++ b/arch/arm/cpu/arm_intcm/config.mk
@@ -5,8 +5,6 @@ 
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
-
 PLATFORM_CPPFLAGS +=  -march=armv4
 # =========================================================================
 #
diff --git a/arch/arm/cpu/armv7/config.mk b/arch/arm/cpu/armv7/config.mk
index ca4a9e7..f0d9c04 100644
--- a/arch/arm/cpu/armv7/config.mk
+++ b/arch/arm/cpu/armv7/config.mk
@@ -4,7 +4,6 @@ 
 #
 # SPDX-License-Identifier:	GPL-2.0+
 #
-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 # If armv7-a is not supported by GCC fall-back to armv5, which is
 # supported by more tool-chains
diff --git a/arch/arm/cpu/armv7/rmobile/config.mk b/arch/arm/cpu/armv7/rmobile/config.mk
index 4f01610..3a36ab6 100644
--- a/arch/arm/cpu/armv7/rmobile/config.mk
+++ b/arch/arm/cpu/armv7/rmobile/config.mk
@@ -4,7 +4,6 @@ 
 #
 # SPDX-License-Identifier:	GPL-2.0+
 #
-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 # Make ARMv5 to allow more compilers to work, even though its v7a.
 PLATFORM_CPPFLAGS += -march=armv5
diff --git a/arch/arm/cpu/ixp/config.mk b/arch/arm/cpu/ixp/config.mk
index 0f12f8b..fd47c60 100644
--- a/arch/arm/cpu/ixp/config.mk
+++ b/arch/arm/cpu/ixp/config.mk
@@ -8,7 +8,7 @@ 
 
 BIG_ENDIAN = y
 
-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float -mbig-endian
+PLATFORM_RELFLAGS += -mbig-endian
 
 PLATFORM_CPPFLAGS += -mbig-endian -march=armv5te -mtune=strongarm1100
 
diff --git a/arch/arm/cpu/pxa/config.mk b/arch/arm/cpu/pxa/config.mk
index 535bca3..d8d263d 100644
--- a/arch/arm/cpu/pxa/config.mk
+++ b/arch/arm/cpu/pxa/config.mk
@@ -6,8 +6,6 @@ 
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
-
 PLATFORM_CPPFLAGS += -mcpu=xscale
 # =========================================================================
 #
diff --git a/arch/arm/cpu/sa1100/config.mk b/arch/arm/cpu/sa1100/config.mk
index 576f685..b3026cc 100644
--- a/arch/arm/cpu/sa1100/config.mk
+++ b/arch/arm/cpu/sa1100/config.mk
@@ -6,8 +6,6 @@ 
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
-
 PLATFORM_CPPFLAGS += -march=armv4 -mtune=strongarm1100
 # =========================================================================
 #