All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] libgcc erroneously built as armv5 for arm920t(armv4t)
Date: Thu, 21 Nov 2013 17:12:41 +0100	[thread overview]
Message-ID: <20131121171241.721ce935@skate> (raw)
In-Reply-To: <1385050037.24198.YahooMailNeo@web162203.mail.bf1.yahoo.com>

Adam,

On Thu, 21 Nov 2013 08:07:17 -0800 (PST), adam hussein\(!\) wrote:

> >Ok, so that's with a Buildroot internal toolchain. Can you also try to
> >build the kernel with this toolchain to see if it's affected or not by
> >the below problem?
> 
> It was fine, just didn't think to mention it as was an exception of the Sourcery toolchain.

Ok, thanks for the confirmation!

> >In order to ask the assembler to accept these instructions, the
> >following commit was made back in 2008:
> >
> >? http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/compressed/Makefile?id=80cec14a83ad0ad109d822b3f3482a379bc481ba
> >
> >However, it was reverted recently:
> >
> >? http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/compressed/Makefile?id=da94a829305f1c217cfdf6771cb1faca0917e3b9
> >
> >I am not sure how this last commit doesn't break your situation.
> 
> Interesting stuff. It's building 2.6.38.6, which benefits only from the first commit.

Ah, interesting.

> >So in other words, you mean that this wouldn't work on the target
> >platform. Hum, weird. Is this a part of U-Boot implemented in assembly,
> >or something compiled from C ?
> 
> Yes indeed. My belief is that _udivsi3 was pulled in with CLZs intact from the libgcc built and distributed with the Sourcery toolchain, rather than rebuilding a 4T arch version for the occasion.
> To be honest, I'm not sure if something like --sysroot can redirect this; I've never thought about it before.

The Sourcery toolchain has 3 sysroot: ARMv4, ARMv5, and ARMv7 Thumb2.
So if the proper -march=armv4t option is passed, it uses the ARMv4
sysroot.

> Sure. Didn't get far off making for the dev board it was based on, aside from memory tweaks to u-boot.
> I'm building the buildroot-2013.08.1 archive with 'make at91rm9200df_defconfig'.
> The u-boot clone is at commit 46ef4faed18196472eb95216b2f74c1397ecf024 from http://git.denx.de/u-boot.git.
> Then:
> ??? export PATH=$PATH:/data/at91rm9200/buildroot-2013.08.1/output/host/usr/bin/
> ??? export CROSS_COMPILE=arm-buildroot-linux-uclibcgnueabi-
> ??? make at91rm9200dvc_ram_config
> ??? make
> or:
> ??? export PATH=$PATH:/data/at91rm9200/buildroot-2013.08.1-thomas2/output/host/opt/ext-toolchain/bin/
> accordingly.

This is wrong. For external toolchains, you should *NOT* use the
compiler in host/opt/ext-toolchain/bin, but instead the compiler in
output/host/usr/bin. We create a toolchain wrapper which ensures that
the proper compiler flags are used. If you don't use this toolchain
wrapper, then it cannot work.

Have you been building both the kernel and u-boot outside of Buildroot?
Why not instruct Buildroot to build them instead?

Can you retry the external toolchain case, by using the compiler in
output/host/usr/bin instead?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2013-11-21 16:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-26 15:34 [Buildroot] libgcc erroneously built as armv5 for arm920t(armv4t) adam hussein
2013-09-26 15:54 ` Thomas Petazzoni
2013-09-26 17:52   ` Yann E. MORIN
2013-09-27  7:31     ` Thomas Petazzoni
2013-09-27 11:23     ` adam hussein
2013-09-26 19:00   ` Peter Korsgaard
2013-11-02 15:39 ` Thomas Petazzoni
2013-11-07 19:31   ` Thomas Petazzoni
2013-11-21 14:56     ` adam hussein
2013-11-21 15:22       ` Thomas Petazzoni
2013-11-21 16:07         ` adam hussein
2013-11-21 16:12           ` Thomas Petazzoni [this message]
2013-12-26 21:57   ` Yann E. MORIN

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=20131121171241.721ce935@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.