Patchwork [U-Boot,9/9] tegra2: Remove USE_PRIVATE_LIBGCC and armv4t build flags

login
register
mail settings
Submitter Allen Martin
Date May 10, 2012, 7:02 a.m.
Message ID <1336633347-8049-10-git-send-email-amartin@nvidia.com>
Download mbox | patch
Permalink /patch/158202/
State Superseded
Headers show

Comments

Allen Martin - May 10, 2012, 7:02 a.m.
These flags were necessary when building tegra2 as a single binary
that supported ARM7TDMI and Cortex A9.  Now that the ARM7TDMI support
is split into a separate SPL, this is no longer necessary.

Signed-off-by: Allen Martin <amartin@nvidia.com>
---
 arch/arm/cpu/armv7/tegra2/config.mk |    8 --------
 1 file changed, 8 deletions(-)
Stephen Warren - May 15, 2012, 5:11 a.m.
On 05/10/2012 01:02 AM, Allen Martin wrote:
> These flags were necessary when building tegra2 as a single binary
> that supported ARM7TDMI and Cortex A9.  Now that the ARM7TDMI support
> is split into a separate SPL, this is no longer necessary.

> diff --git a/arch/arm/cpu/armv7/tegra2/config.mk b/arch/arm/cpu/armv7/tegra2/config.mk

> -# Tegra has an ARMv4T CPU which runs board_init_f(), so we must build this
> -# file with compatible flags
> -ifdef CONFIG_TEGRA2
> -CFLAGS_arch/arm/lib/board.o += -march=armv4t
> -endif

That makes sense since the CFLAGS for the SPL build will be set up
appropriately for the AVP.

> -USE_PRIVATE_LIBGCC = yes

However, we force this because the toolchains we typically use for
U-Boot are targeted at the A9 CPUs, and hence the libgcc there contains
ARMv7 instructions. Did I miss something in this series or earlier that
uses a different toolchain for the SPL, which includes an ARMv4 build of
libgcc?
Allen Martin - May 18, 2012, 10:13 p.m.
On Mon, May 14, 2012 at 10:11:26PM -0700, Stephen Warren wrote:
> On 05/10/2012 01:02 AM, Allen Martin wrote:
> > -USE_PRIVATE_LIBGCC = yes
> 
> However, we force this because the toolchains we typically use for
> U-Boot are targeted at the A9 CPUs, and hence the libgcc there contains
> ARMv7 instructions. Did I miss something in this series or earlier that
> uses a different toolchain for the SPL, which includes an ARMv4 build of
> libgcc?

You're right, that's a mistake, I'll revert that line.  There is a
problem right now where if you have both SPL and USE_PRIVATE_LIBGCC
turned on, the SPL build of libgcc tries to link against the main
u-boot libgcc, which in itself is probably fine, except on a clean
build it hasn't been built yet.  So I'll have to fix that.

-Allen

Patch

diff --git a/arch/arm/cpu/armv7/tegra2/config.mk b/arch/arm/cpu/armv7/tegra2/config.mk
index fe9ef5b..e1e21c7 100644
--- a/arch/arm/cpu/armv7/tegra2/config.mk
+++ b/arch/arm/cpu/armv7/tegra2/config.mk
@@ -24,12 +24,4 @@ 
 # MA 02111-1307 USA
 #
 
-# Tegra has an ARMv4T CPU which runs board_init_f(), so we must build this
-# file with compatible flags
-ifdef CONFIG_TEGRA2
-CFLAGS_arch/arm/lib/board.o += -march=armv4t
-endif
-
-USE_PRIVATE_LIBGCC = yes
-
 CONFIG_ARCH_DEVICE_TREE := tegra20