On 16 February 2018 at 12:27, Ilya Lyubimov wrote: > I encountered the same error when trying to cross compile GCC 7.3.0 for > FreeBSD. The autoconf check for aligned_alloc function doesn't exist > for FreeBSD target in libstdc++-v3/crossconfig.m4. When I added this > check I could successfully compile GCC targeting FreeBSD 9.3. See my > patch below. > > --- a/libstdc++-v3/crossconfig.m4 2018-02-12 19:54:24.323673272 > +0300 > +++ b/libstdc++-v3/crossconfig.m4 2018-02-12 19:53:33.826632457 > +0300 > @@ -133,6 +133,7 @@ > AC_DEFINE(HAVE_ISNANL) > fi > AC_CHECK_FUNCS(__cxa_thread_atexit) > + AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign > _aligned_malloc) > ;; > > *-fuchsia*) Aha! That explains it, thanks for the patch.