public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Dave.Martin@arm.com (Dave Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC] ARM: use -marm unconditionally for THUMB2_KERNEL=n builds
Date: Thu, 28 May 2015 11:49:24 +0100	[thread overview]
Message-ID: <20150528104923.GC3655@e103592.cambridge.arm.com> (raw)
In-Reply-To: <20150527174657.GV2067@n2100.arm.linux.org.uk>

On Wed, May 27, 2015 at 06:46:57PM +0100, Russell King - ARM Linux wrote:
> On Wed, May 27, 2015 at 04:59:21PM +0200, Uwe Kleine-K?nig wrote:
> > Hello Russell,
> > 
> > On Wed, May 27, 2015 at 10:53:39AM +0100, Russell King - ARM Linux wrote:
> > > On Wed, May 27, 2015 at 11:42:07AM +0200, Uwe Kleine-K?nig wrote:
> > > > The only possible culprit is a compiler that doesn't understand -marm.
> > > > My compiler collection only goes back to 4.0.3 which does work with this
> > > > option. The use of cc-option to test for -marm was introduced in commit
> > > > 5636810d6f17 ([ARM] 3982/2: Explicitly select 32-bit ARM ISA (-marm))
> > > > back in 2006 when the minimal compiler version was already 3.3.
> > > 
> > > According to gcc 3.3's --target-help, it supports -mthumb, but not -marm.
> > > 
> > > What we could possibly do is to change the := to a plain =, and then
> > > evaluate all the options together via:
> > > 
> > > KBUILD_CFLAGS :=$(KBUILD_CFLAGS)
> > You mean
> > 
> > 	KBUILD_CFLAGS += $(arch-y)
> > 
> > as soon as arch-y is defined to assert it's already present when -marm
> > is tested for, right? I will give that a try.
> 
> I mean:
> 
>  else
> -CFLAGS_ISA	:=$(call cc-option,-marm,)
> -AFLAGS_ISA	:=$(CFLAGS_ISA)
> +CFLAGS_ISA	=$(call cc-option,-marm,)
> +AFLAGS_ISA	=$(CFLAGS_ISA)
>  endif
> ...
> -KBUILD_CFLAGS	+=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
> -KBUILD_AFLAGS	+=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float
> +CFLAGS_TRAPS	:=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
> +
> +KBUILD_CFLAGS	+=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(CFLAGS_TRAPS) -msoft-float -Uarm
> +KBUILD_AFLAGS	+=$(CFLAGS_ABI) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float
> 
> +# Ensures that all previous $(call ...) options are evaluated once
> +KBUILD_CFLAGS	:=$(CFLAGS_ISA) $(KBUILD_CFLAGS)
> +KBUILD_AFLAGS	:=$(CFLAGS_ISA) $(KBUILD_AFLAGS)
> 
> This has the effect that "-marm" will be evaluated with all the other
> KBUILD_CFLAGS options already set.  (I think I have this right...)

That should work too.  It requires less code rearrangement than my
approach.

[...]

Cheers
---Dave

  reply	other threads:[~2015-05-28 10:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27  9:42 [PATCH RFC] ARM: use -marm unconditionally for THUMB2_KERNEL=n builds Uwe Kleine-König
2015-05-27  9:53 ` Russell King - ARM Linux
2015-05-27 14:59   ` Uwe Kleine-König
2015-05-27 17:46     ` Russell King - ARM Linux
2015-05-28 10:49       ` Dave Martin [this message]
2015-05-27 16:25 ` Nicolas Pitre
2015-05-28 10:48 ` Dave Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150528104923.GC3655@e103592.cambridge.arm.com \
    --to=dave.martin@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox