PR target/85904 check for aligned_alloc on netbsd cross-compilation
authorMaya Rashish <coypu@sdf.org>
Thu, 24 May 2018 17:31:13 +0000 (17:31 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 24 May 2018 17:31:13 +0000 (18:31 +0100)
2018-05-24  Maya Rashish  <coypu@sdf.org>

PR target/85904
* crossconfig.m4: Test for aligned_alloc on netbsd.
* configure: Regenerate.

From-SVN: r260678

libstdc++-v3/ChangeLog
libstdc++-v3/configure
libstdc++-v3/crossconfig.m4

index 0f73c6a55310266e46950ce125c711a35b7c227e..03e875478ae1f00119ec2cd3e07ab6971af1f8a5 100644 (file)
@@ -1,3 +1,9 @@
+2018-05-24  Maya Rashish  <coypu@sdf.org>
+
+       PR target/85904
+       * crossconfig.m4: Test for aligned_alloc on netbsd.
+       * configure: Regenerate.
+
 2018-05-24  Jonathan Wakely  <jwakely@redhat.com>
 
        PR libstdc++/69769
index f3522ee66660c1c6321fe12656a9af1044b50106..79eb18727eaf757a8379d54455f199b8d825a0e4 100755 (executable)
@@ -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'
index f0a55c684045df3f5c3927e99de1cc446e9b358a..669d87f7602e10fe9140cd92277b8590589cb211 100644 (file)
@@ -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'