From 95c921d18c5238c0bf76f7b70b83b65e5933c028 Mon Sep 17 00:00:00 2001 From: Maya Rashish Date: Thu, 24 May 2018 17:31:13 +0000 Subject: [PATCH] PR target/85904 check for aligned_alloc on netbsd cross-compilation 2018-05-24 Maya Rashish PR target/85904 * crossconfig.m4: Test for aligned_alloc on netbsd. * configure: Regenerate. From-SVN: r260678 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/configure | 13 +++++++++++++ libstdc++-v3/crossconfig.m4 | 1 + 3 files changed, 20 insertions(+) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 0f73c6a5531..03e875478ae 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2018-05-24 Maya Rashish + + PR target/85904 + * crossconfig.m4: Test for aligned_alloc on netbsd. + * configure: Regenerate. + 2018-05-24 Jonathan Wakely PR libstdc++/69769 diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index f3522ee6666..79eb18727ea 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -66314,6 +66314,19 @@ $as_echo "$ac_ld_relro" >&6; } $as_echo "#define HAVE_ISNANL 1" >>confdefs.h fi + for ac_func in aligned_alloc posix_memalign memalign _aligned_malloc +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + ;; *-qnx6.1* | *-qnx6.2*) SECTION_FLAGS='-ffunction-sections -fdata-sections' 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' -- 2.30.2