On Sat, 10 Sep 2016, Christophe Lyon wrote:
On aarch64*-elf and arm-eabi (using newlib), I'm seeing:
/gccsrc/libstdc++-v3/libsupc++/new_opa.cc:66: undefined reference to
`aligned_alloc'
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=f86afe5a3ac62a92e821c764a011e1625abdd326
"C11 aligned_alloc() implementation
aligned_alloc() is implemented in terms of posix_memalign() which is
only declared in <stdlib.h> but not defined in Newlib in general. At
least Linux and RTEMS implement this function."
If we don't want to provide a fallback implementation in libsupc++, we can
say that aligned new is unsupported on those platforms, but if we are
building a shared libstdc++.so that doesn't like undefined symbols, we
need a different failure mode than an undefined aligned_alloc. Either not
providing operator new(...aligned_val_t...) in libstdc++ or providing one
that just aborts I guess?
--
Marc Glisse