From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Lo=EFc?= Minier Date: Tue, 15 Mar 2011 12:54:47 +0100 Subject: [U-Boot] [RFC PATCH 1/2] armv7: enable Thumb build for armv7 In-Reply-To: <4D7EE491.8030304@ti.com> References: <1300109258-12496-1-git-send-email-aneesh@ti.com> <20110314161152.GD18358@bee.dooz.org> <4D7EE491.8030304@ti.com> Message-ID: <20110315115447.GE3819@bee.dooz.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Mar 15, 2011, Aneesh V wrote: > Please note that I am enabling armv7-a in the second patch in omap4 > config.mk file. The reason I didn't do this here was some ARMv7 SoCs do > not want to use -march=armv7-a even if the compiler supports it. Tegra2 > is an example. Please see the below from Tegra2 config.mk: > > # Use ARMv4 for Tegra2 - initial code runs on the AVP, which is an ARM7TDI. > PLATFORM_CPPFLAGS += -march=armv4 Good point, I wonder whether it would make sense to have arch/arm/cpu/armv7/config.mk default to -march=armv7 and Tegra2 to override this with -march=armv4. Maybe this code doesn't belong under armv7 though; or perhaps -march=armv4 should only be set when building a subset of the files rather than by default. > This being the case I would have had to define another CONFIG flag if I > had to add -march=armv7-a in arch/arm/cpu/armv7/config.mk. I thought it > un-necessary and instead put it in the SoC specific file. So, Tegra2 > can continue to use -march=armv4 and will get Thumb-1 if they enable > CONFIG_SYS_THUMB_BUILD. Or do you think we should define something like > CONFIG_SYS_MARCH_ARMV7 Up to you, but I would expect that code udner arch/arm/cpu/armv7/ would build with -march=armv7 (maybe not -a though), with specific overrides where that's not the case; it would feel a bit odd to me to have this as a "config" option. -- Lo?c Minier