public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] ARM: move -march=* and -mtune= options to arch/arm/Makefile
Date: Sat, 11 Apr 2015 08:18:57 +0200	[thread overview]
Message-ID: <5528BCD1.7040303@web.de> (raw)
In-Reply-To: <552899C7.6090701@wwwdotorg.org>

On 2015-04-11 05:49, Stephen Warren wrote:
> On 03/27/2015 11:06 AM, Albert ARIBAUD wrote:
>> On Fri, 27 Feb 2015 02:40:33 +0900, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
>>> My main motivations for this commit are:
>>>
>>> [1] Follow the arch/arm/Makefile style of Linux Kernel
>>>
>>> [2] Maintain compiler options systematically
>>>   Currently, we give -march=* and -mtune=* options inconsistently:
>>>   Only some of the CPUs pass -march=* and -mtune=* options.
>>>   By collecting such options into the single place arch/arm/Makefile
>>>   we can tell which options are missing at a glance.
>>>
>>> [3] Prepare for deprecating arch/*/cpu/*/config.mk
>>>
>>> Note:
>>>   This commit just moves the compiler options so as not to change
>>>   the behavior at all.  It does not care about the correctness of
>>>   the given options.  Fox example, "-march=armv5te" might be better
>>>   than "-march=armv4" for ARM946EJS, but it is beyond the scope this
>>>   commit.  Also, filling the missing -march=* and -tune=* is left
>>>   to follow-up patches.
> ...
>> Applied to u-boot-arm/master, thanks!
> 
> This patch breaks Tegra (at least Seaboard, and I'd guess all Tegra
> boards). Reverting it solves the problem.

Yes, just bisected the same problem on the TK1 down to this commit.

> 
> It causes the SPL to be build for ARMv7 even though it should be built
> for an earlier architecture. I added a $(warning) to arch/arm/Makefile,
> and it prints:
> 
> arch/arm/Makefile:37: SPL_BUILD  FLAGS  -D__ARM__ -marm
> -mno-thumb-interwork  -mabi=aapcs-linux  -mword-relocations
> -mno-unaligned-access  -ffunction-sections -fdata-sections -fno-common
> -ffixed-r9  -msoft-float  -pipe  -march=armv7-a
> 
> arch/arm/Makefile:37: SPL_BUILD y FLAGS  -D__ARM__ -marm
> -mno-thumb-interwork  -mabi=aapcs-linux  -ffunction-sections
> -fdata-sections -fno-common -ffixed-r9  -msoft-float  -pipe  -march=armv7-a
> 
> Note the second line says ARMv7, even though CONFIG_SPL_BUILD is set, so
> it shouldn't.
> 

Tegra seems to be the only target so far that changes the target CPU for
the SPL build:

#config.mk
...
ARCH := $(CONFIG_SYS_ARCH:"%"=%)
CPU := $(CONFIG_SYS_CPU:"%"=%)
ifdef CONFIG_SPL_BUILD
ifdef CONFIG_TEGRA
CPU := arm720t
endif
endif
...

How to model this with that new compiler switch setup?

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150411/1d7e679c/attachment.sig>

  reply	other threads:[~2015-04-11  6:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26 17:40 [U-Boot] [PATCH v2] ARM: move -march=* and -mtune= options to arch/arm/Makefile Masahiro Yamada
2015-03-27 17:06 ` Albert ARIBAUD
2015-04-11  3:49   ` Stephen Warren
2015-04-11  6:18     ` Jan Kiszka [this message]
2015-04-11 12:53       ` Masahiro Yamada
2015-04-11 14:42         ` Masahiro Yamada
2015-04-11 14:41     ` Masahiro Yamada

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=5528BCD1.7040303@web.de \
    --to=jan.kiszka@web.de \
    --cc=u-boot@lists.denx.de \
    /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