From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] libnspr: only enable thumb if BR2_ARM_INSTRUCTIONS_THUMB2
Date: Sat, 16 Jan 2016 22:06:29 +0100 [thread overview]
Message-ID: <569AB0D5.7010701@mind.be> (raw)
In-Reply-To: <878u3qy3oa.fsf@dell.be.48ers.dk>
On 15-01-16 21:43, Peter Korsgaard wrote:
>>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> writes:
>
> > libnspr currently passes --enable-thumb2 if the CPU has thumb
> > instructions. This option will pass -mthumb to the compiler. However,
> > if an external multilib toolchain is used that has a thumb-specific
> > variant, it will try to use that one. But we only copy a single variant
> > to the sysroot, so the build will fail with:
>
> > In order to fix this, only enable thumb2 when we are really using
> > thumb2. Note that it is still necessary to pass this option, cfr.
> > http://autobuild.buildroot.org/results/d7323831372050e425a34f5104a46d8cbd6be214
>
> > We could have chosen to still enable thumb2 with the internal toolchain.
> > However, that would mean we create a discrepancy between the result of
> > building with the same (buildroot) toolchain when it is used as an
> > internal one or as an external one. To avoid potentially surprising
> > results, just stick to the option chosen for the rest of the rootfs.
>
> Why do we actually ever pass --enable-thumb2 / --disable-thumb2? As far
> as I can see, the only thing this does is adding -marm / -mthumb to
> CFLAGS, and we already pass the correct -m<arm/thumb> option in the
> toolchain wrapper.
Well, if you don't pass anything, it will check if the _compiler_ supports
thumb by compiling (not linking) something which checks for __thumb2__. So we
have to pass something.
Er, on second look, it uses that compile to set MOZ_THUMB2 and then doesn't do
anything with it... Still, there is a good chance that upstream will in the
future do something with that symbol, so I think it's safer to explicitly
en/disable thumb2.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
next prev parent reply other threads:[~2016-01-16 21:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-15 14:52 [Buildroot] [PATCH] libnspr: only enable thumb if BR2_ARM_INSTRUCTIONS_THUMB2 Arnout Vandecappelle
2016-01-15 20:43 ` Peter Korsgaard
2016-01-16 21:06 ` Arnout Vandecappelle [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-01-19 21:50 Arnout Vandecappelle
2016-01-19 22:00 ` Peter Korsgaard
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=569AB0D5.7010701@mind.be \
--to=arnout@mind.be \
--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.