From: bugzilla at busybox.net <bugzilla@busybox.net>
To: buildroot@busybox.net
Subject: [Buildroot] [Bug 7520] New: CodeSourcery toolchain ARM: C++11 std::exception_ptr is not available for Cortex-A9 if thumb2 is not selected.
Date: Mon, 6 Oct 2014 22:09:03 +0000 (UTC) [thread overview]
Message-ID: <bug-7520-163@https.bugs.busybox.net/> (raw)
https://bugs.busybox.net/show_bug.cgi?id=7520
Summary: CodeSourcery toolchain ARM: C++11 std::exception_ptr
is not available for Cortex-A9 if thumb2 is not
selected.
Product: buildroot
Version: 2014.08
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: romain.naour at openwide.fr
CC: buildroot at uclibc.org
Estimated Hours: 0.0
Hello,
I'm using a test program based on the C++11 code fragment from this blog:
http://martin-moene.blogspot.fr/2013/06/exceptionptr-for-c03.html
On ARM, this code really needs an ARMv7+ cpu in order to have
ATOMIC_INT_LOCK_FREE > 1
see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58938
So, if the user select the CodeSourcery 2014.05 toolchain (which is based on
gcc 4.8.3) and the ARM Cortex-A9 optimization, It may expect that the
requirement to build the code C++11 is met.
But the build fail as follow at during the link:
undefined reference to `std::current_exception()'
/tmp/cclRKhyF.o: In function `main':
cpp11.cpp:(.text.startup+0x6c): undefined reference to
`std::current_exception()'
cpp11.cpp:(.text.startup+0x78): undefined reference to
`std::__exception_ptr::exception_ptr::exception_ptr(std::__exception_ptr::exception_ptr
const&)'
cpp11.cpp:(.text.startup+0x80): undefined reference to
`std::rethrow_exception(std::__exception_ptr::exception_ptr)'
cpp11.cpp:(.text.startup+0xa8): undefined reference to
`std::__exception_ptr::exception_ptr::~exception_ptr()'
cpp11.cpp:(.text.startup+0xb0): undefined reference to
`std::__exception_ptr::exception_ptr::~exception_ptr()'
cpp11.cpp:(.text.startup+0xc8): undefined reference to
`std::__exception_ptr::exception_ptr::~exception_ptr()'
cpp11.cpp:(.text.startup+0xfc): undefined reference to
`std::__exception_ptr::exception_ptr::~exception_ptr()'
Here is the Buildroot's configuration:
BR2_arm=y
BR2_ARCH="arm"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_ARCH="armv7-a"
BR2_GCC_TARGET_ABI="aapcs-linux"
BR2_GCC_TARGET_CPU="cortex-a9"
BR2_GCC_TARGET_FPU="vfpv3"
BR2_GCC_TARGET_FLOAT_ABI="softfp"
BR2_GCC_TARGET_MODE="arm"
BR2_ARCH_HAS_ATOMICS=y
BR2_ARM_CPU_HAS_NEON=y
BR2_ARM_CPU_MAYBE_HAS_NEON=y
BR2_ARM_CPU_MAYBE_HAS_VFPV2=y
BR2_ARM_CPU_MAYBE_HAS_VFPV3=y
BR2_ARM_CPU_HAS_THUMB2=y
BR2_cortex_a9=y
[...]
BR2_ARM_INSTRUCTIONS_ARM_CHOICE=y
# BR2_ARM_INSTRUCTIONS_THUMB2 is not set
BR2_ARM_INSTRUCTIONS_ARM=y
[...]
BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201405=y
[...]
Looking at the getting-started document P21, the thumb support is mandatory in
order to really switch to ARMv7-A prebuild sysroot.
Without thumb support, the defaut ARMv5t sysroot is used even if armv7-a
architecture has been selected. In this case ATOMIC_INT_LOCK_FREE = 1, that why
the build fail...
The build is fixed by selecting the thumb2 instruction:
# BR2_ARM_INSTRUCTIONS_ARM_CHOICE is not set
BR2_ARM_INSTRUCTIONS_THUMB2=y
How to handle correctly the dependence on BR2_ARM_INSTRUCTIONS_THUMB2 with this
toolchain when a package needs some C++11 specific support ?
Best regards,
Romain Naour
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
next reply other threads:[~2014-10-06 22:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-06 22:09 bugzilla at busybox.net [this message]
2014-10-06 22:15 ` [Buildroot] [Bug 7520] CodeSourcery toolchain ARM: C++11 std::exception_ptr is not available for Cortex-A9 if thumb2 is not selected bugzilla at busybox.net
2016-08-31 19:32 ` bugzilla at busybox.net
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=bug-7520-163@https.bugs.busybox.net/ \
--to=bugzilla@busybox.net \
--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