From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] openblas: fix build issues on ARM
Date: Tue, 9 Aug 2016 15:51:58 +0200 [thread overview]
Message-ID: <20160809155158.12b66bad@free-electrons.com> (raw)
In-Reply-To: <1470605554-30398-1-git-send-email-thomas.petazzoni@free-electrons.com>
Hello,
On Sun, 7 Aug 2016 23:32:34 +0200, Thomas Petazzoni wrote:
> This commit fixes several build issues of OpenBLAS on ARM:
>
> - The first one occured on ARMv5 platforms, when the ARMV5 OpenBLAS
> architecture is used. In this case, OpenBLAS build system forces
> -march=armv5, which may not be correct for certain toolchains. As an
> example, the Sourcery CodeBench toolchain has an ARMv4 and an ARMv5
> sysroot. The ARMv5 sysroot is actually an armv5te sysroot, so when
> OpenBLAS forces -march=armv5, gcc thinks it should use the ARMv4
> sysroot, causing build failures.
>
> To address this, a patch to completely remove the -march ARM CFLAGS
> is added to OpenBLAS.
>
> Fixes:
>
> http://autobuild.buildroot.net/results/991497b12b70f948169e5ad99eebd0fe7f6209a2/
>
> - The second one occured on ARMv7 platforms, when the ARMV7 OpenBLAS
> architecture is used. The OpenBLAS code expects an EABIhf build, so a
> dependency is added for EABIhf for both ARMv6 and ARMv7.
>
> Fixes:
>
> http://autobuild.buildroot.net/results/0ba0bee48a83367fcefab827e8eaa72f0c8fe90b/
>
> - Once the previous ARMv7 problem has been fixed, it turns out that the
> ARMv7 specific code in OpenBLAS contains VFPv3 specific
> code. Therefore, the user *must* have choosen either VFPv3 or VFPv4,
> or the code will not build. VFPv3-D16/VFPv4-D16 are not sufficient,
> as more than 16 registers are used by the OpenBLAS code.
>
> To address this, the ARMV7 platform of OpenBLAS is restricted to the
> proper VFPv3/VFPv4 selection, and the ARMV6 platform is restricted to
> the proper VFPv2 selection.
>
> This problem was not visible in the autobuilders, as it was hidden by
> the previous one.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> Changes since v1:
> - Only remove -march flags, keep the -mfpu and -mfloat-abi flags.
> - Make the ARMV6 and ARMV7 platform selection depend on BR2_ARM_EABIHF,
> since EABIhf is required
> - Make the ARMV6 platform selection depend on VFPv2 usage, since it is
> needed.
> - Also handle the Cortex-A9 and Cortex-A15 cases.
> ---
> .../0002-Makefile.arm-remove-march-flags.patch | 73 ++++++++++++++++++++++
> package/openblas/Config.in | 19 ++++--
> 2 files changed, 88 insertions(+), 4 deletions(-)
> create mode 100644 package/openblas/0002-Makefile.arm-remove-march-flags.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
prev parent reply other threads:[~2016-08-09 13:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-07 21:32 [Buildroot] [PATCH v2] openblas: fix build issues on ARM Thomas Petazzoni
2016-08-09 13:51 ` Thomas Petazzoni [this message]
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=20160809155158.12b66bad@free-electrons.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox