This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] PR target/85904: Fix configure when cross compiling for netbsd
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: coypu at sdf dot org
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Thu, 24 May 2018 18:31:25 +0100
- Subject: Re: [PATCH] PR target/85904: Fix configure when cross compiling for netbsd
- References: <20180524131430.GA3511@SDF.ORG> <20180524151414.GA2724@redhat.com>
On 24/05/18 16:14 +0100, Jonathan Wakely wrote:
On 24/05/18 13:14 +0000, coypu@sdf.org wrote:
In the past I was asked to post bugzilla patches here. I am doing this.
It fixes a build failure.
PR target/85904
libstdc++-v3/crossconfig.m4: test for aligned_alloc on netbsd
libstdc++-v3/configure: Regenerate
Attached is patch.
Thanks for the patch. We made a similar fix for FreeBSD recently, so
I'll commit this for you.
For consistency with freebsd and mingw what I committed to trunk has
the AC_CHECK_FUNCS at the end of the netbsd section. Could you check
it still works please? (I'm unable to build a netbsd cross-compiler
for some reason).
commit 56c5a530fd7b6813ccdb712c7d37d89fa59a80f7
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu May 24 16:33:50 2018 +0100
PR target/85904 check for aligned_alloc on netbsd cross-compilation
2018-05-24 Maya Rashish <coypu@sdf.org>
PR target/85904
* crossconfig.m4: Test for aligned_alloc on netbsd.
* configure: Regenerate.
diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4
index f0a55c68404..669d87f7602 100644
--- a/libstdc++-v3/crossconfig.m4
+++ b/libstdc++-v3/crossconfig.m4
@@ -218,6 +218,7 @@ case "${host}" in
AC_DEFINE(HAVE_ISINFL)
AC_DEFINE(HAVE_ISNANL)
fi
+ AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
;;
*-qnx6.1* | *-qnx6.2*)
SECTION_FLAGS='-ffunction-sections -fdata-sections'