From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Thu, 24 Mar 2011 15:45:51 +0100 Subject: [U-Boot] [RFC PATCH 1/2] armv7: enable Thumb build for armv7 In-Reply-To: <4D81B882.30202@ti.com> References: <1300109258-12496-1-git-send-email-aneesh@ti.com> <20110314161152.GD18358@bee.dooz.org> <4D7EE491.8030304@ti.com> <20110315115447.GE3819@bee.dooz.org> <4D80775F.4000907@ti.com> <4D80F28E.6080606@free.fr> <4D81B882.30202@ti.com> Message-ID: <4D8B591F.3010206@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Le 17/03/2011 08:30, Aneesh V a ?crit : > Albert, > > On Wednesday 16 March 2011 10:55 PM, Albert ARIBAUD wrote: >> Le 16/03/2011 09:39, Aneesh V a ?crit : > [snip ..] >> >> Some toolchains in current use (notably the one provided with ELDK 4.2, >> and possibly others) do not support -march=armv7[-a]. Do we really need >> armv7 instructions? > > 'cc-option' will make sure that build won't break for old compilers. We > can do something like this: > > PLATFORM_CPPFLAGS += $(call cc-option,-march=armv7-a, -march=armv5) > > We are not planning to use armv7-a instructions in the code. In fact, > recently I removed even an armv5 instruction from armv7 generic code in > the interest of not breaking Tegra2. > > However, keeping -march=armv7-a (armv6 and above) helps in having > Thumb2, which I believe is a good compromise between code density and > performance. > > So, OMAP4 U-Boot when built with ELDK will give you Thumb1 code where > as when it is built with newer compilers it will give you Thumb2 code. > As long we don't use non-compliant assembly instructions, both should > build and work fine. > > br, > Aneesh Understood. As for the question about config options (assuming I got it right) I'd rather have the SoC define which -march it wants, and only have a CONFIG for saying if we want thumb or not. Amicalement, -- Albert.