From: Tom <fivemiletom@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] ARM EABI builds
Date: Thu, 28 Jun 2007 12:13:18 -0700 [thread overview]
Message-ID: <4684084E.3080606@gmail.com> (raw)
In-Reply-To: <20070628103443.GT31791@trinity.fluff.org>
Ben Dooks wrote:
>> We need to keep in mind that the same gcc toolchain can support several
>> subarchitectures, thus this naming would be somewhat misleading (for
>> example, in our cases it did produce both ARMv4 (in the kernel) and
>> ARMv5 (in user libs)).
>
> Yes, the naming would indicate the default cpu the compiler is configured
> for. The gcc docs[1] indicate the --with-cpu= option only sets the
> default cpu to compile for. Unfortunately this affects how it produces
> libgcc.
>
> I don't see why you would end up producing ARMv4 kernel when producing
> an ARMv5 user space. Either you are producing a kernel to run on the
> same arch as your userspace (the kernel will correctly assign -mcpu=<x>)
> when it is building.
>
Why? Because of the bug: Configured all builds with ARM920T:
Buildroot creates "incorrect" toolchain, "incorrect" toolchain fails to
build uclibc in ARMv4 only but uses ARMv5. However, it did build a
kernel in ARMv4 fine.
>> To me it would be great if the gcc toolchain always printed out whatever
>> the default SUBTARGET / CPU is as part of its specs. (It does this only
>> if one is passed with the --with-cpu option, so if it's not passed, you
>> can't easily find the default.) This would have helped me immensely to
>> find the --with-cpu workaround, but I am afraid this is not really a
>> buildroot issue.
>
> It is part of a problem with gcc where libgcc is being built for some
> arbitrary default, instead of one suitable for each architecture that
> can be selected at run-time.
>
> The problem with buildroot is that it gives you a choice of ARM cpus.
> If you select ARM920T, then you have an expectation of being able
> to run the binaries produced on an ARM920T, which currently if EABI
> is also selected is impossible.
Yes, I agree. I like your solution in
http://busybox.net/bugs/view.php?id=1406 .
>
> I did think about adding -mcpu=<cpu> to the build CFLAGS, but that
> is not going to help with the problem that libgcc is not going to
> be compiled correctly.
>
Why not? The kernel image, built with the same "incorrect" toolchain,
must have used only ARMv4 instructions. If it hadn't, I would have never
gotten far enough to even execute vprintf, libc. I would suspect that
the kernel does a better job of setting -mcpu, -mtune. Thus these
options should work for libc too. What makes you think that it wouldn't
work for libc, have you tried? (PS: Even if it did, bug #1406 is
probably the better fix, in particular as buildroot users might use its
toolchain to build their own code w/o always setting these options)
next prev parent reply other threads:[~2007-06-28 19:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-26 13:33 [Buildroot] ARM EABI builds Ben Dooks
2007-06-26 21:19 ` Tom
2007-06-26 22:25 ` Ben Dooks
2007-06-27 8:19 ` Ben Dooks
2007-06-27 9:03 ` Konstantin Kletschke
2007-06-27 15:25 ` Ben Dooks
2007-06-27 17:44 ` Tom
2007-06-28 10:34 ` Ben Dooks
2007-06-28 19:13 ` Tom [this message]
2007-06-29 13:52 ` Ben Dooks
2007-06-28 22:50 ` Ulf Samuelsson
2007-06-28 23:57 ` Tom
2007-06-29 13:53 ` Ben Dooks
-- strict thread matches above, loose matches on Subject: below --
2007-06-28 19:54 Stuart Wood
2007-06-28 23:01 ` Bernhard Fischer
2007-06-29 1:00 ` Tom
2007-06-29 9:31 ` Ben Dooks
2007-06-29 1:42 ` Alex Stewart
2007-06-29 7:16 ` Bernhard Fischer
2007-06-29 9:26 ` Ben Dooks
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=4684084E.3080606@gmail.com \
--to=fivemiletom@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox