This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: aligned_alloc (C11) calls posix_memalign (posix) unconditionally: bug?
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: Thomas Preudhomme <thomas dot preudhomme at foss dot arm dot com>, newlib at sourceware dot org
- Date: Tue, 27 Sep 2016 14:29:49 +0200
- Subject: Re: aligned_alloc (C11) calls posix_memalign (posix) unconditionally: bug?
- Authentication-results: sourceware.org; auth=none
- References: <748edd37-4fc1-acf9-a644-9f5c2523bcbb@foss.arm.com>
Hello,
On 23/09/16 18:55, Thomas Preudhomme wrote:
Hi there,
GCC testcase g++.dg/cpp1z/aligned-new6.C fails to build on
arm-none-eabi because it pulls aligned_alloc which requires
posix_memalign which is not defined for arm-none-eabi targets.
Is this a case where some code is simply missing to make this work on
bare-metal targets or is this a bug? I thought posix could only be
expected when targetting a system with OS and therefore posix_memalign
should not be called for bare-metal targets.
do you want to support the C11 aligned_alloc() for arm-none-eabi targets?
If yes, then you need an implementation. If you don't want one based on
posix_memalign(), then you have to tell this Newlib somehow.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.