[U-Boot] using different architecture / toolchain for SPL build

Wolfgang Denk wd at denx.de
Wed Apr 11 21:59:16 CEST 2012


Dear Allen,

In message <3C7A7ACA8617D24290826EC008B5CD08510F030F98 at HQMAIL03.nvidia.com> you wrote:
>
> So the particular problem that pushed me over the edge on this was
> trying to apply the ARM thumb patches that Aneesh V posted. As I
> discovered, it's not the compiler but the linker that inserts the
> thumb interworking code. As far as I can tell it's not possible to
> get a linker targeted for armv7 to emit interworking code that works
> on armv4 regardless of what options are used. I was banging my head
> on this for a few days so I would love to be proven wrong, but the
> only option I found that worked was to use an armv4 toolchain for the
> armv4 bits and armv7 toolchain for the armv7 bits.

I'm not an expert in this area, but this cannot be the right approach.
Did you try asking on the binutils mailing list?  This is where
experts should be available...

> How is it possible then to build an SPL that builds from a different
> arch subdirectory? It seems like the arch subdirectory is decided

We are not talking about a different architecture here - like a
PowerPC SPL that boots an ARM U-Boot.  We are still in a single
architecture, it's just different CPU models.  And when both GCC and
the assembler are capable of being tuned to the respective CPU model,
this should also be possible for the linker.

> during the "make config" step. I really don't like how fragile it is
> today where we build an armv4 loader from the armv7 directory.
> Anytime anybody touches start.S or touches compiler options it
> potentially breaks us. For example the same thumb patches broke tegra
> even with CONFIG_THUMB turned off because it changed -march to
> armv7-a. And why wouldn't you want -march=armv7-a for a armv7 build?

I agree that these are issues that should be solved, but using
separate tool chains cannot be the right approach.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Every revolutionary idea - in science, politics, art, or  whatever  -
evokes three stages of reaction in a hearer:
  1. It is completely impossible - don't waste my time.
  2. It is possible, but it is not worth doing.
  3. I said it was a good idea all along.


More information about the U-Boot mailing list