[U-Boot] Query on CONFIG_SYS_THUMB_BUILD

Albert ARIBAUD
2014-11-19T06:42:14Z

Hello Stefan,

On Tue, 18 Nov 2014 19:37:18 +0100, Stefan Agner <stefan@agner.ch>
wrote:

> diff --git a/arch/arm/config.mk b/arch/arm/config.mk
> index f0eafd6..ddbc8dc 100644
> --- a/arch/arm/config.mk
> +++ b/arch/arm/config.mk
> @@ -30,6 +30,8 @@ PF_CPPFLAGS_ARM := $(call cc-option, -mthumb
> -mthumb-interwork,\
> $(call cc-option,-marm,)\
> $(call cc-option,-mno-thumb-interwork,)\
> )
> +AFLAGS_AUTOIT :=$(call
> as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it)
> +PF_CPPFLAGS_ARM += $(AFLAGS_AUTOIT)
> else
> PF_CPPFLAGS_ARM := $(call cc-option,-marm,) \
> $(call cc-option,-mno-thumb-interwork,)

> The main change here is the implicit-it/auto-it functionality. For me it
> works when enabling that globally. Is it harmful to enable that
> globally? The other changes need a proper ifdef, but should be ok I
> guess.

-mimplicit-it=always will have no effect on ARM builds as it defaults
to 'arm', meaning that IT instructions are already optional in ARM
mode, and switching to 'always' changes the behavior only for Thumb
mode.

For -mauto-it, it is not documented in the gas documentation online or
in my current as' --target-help. I'll dig this deeper today, but barring
any scream from me, the change above is fine globally in U-Boot.

> --
> Stefan

Amicalement,
--
Albert.