From a5f9523c7c8e1ccfc49a1dbea47029216f85fc95 Mon Sep 17 00:00:00 2001
From: Ulrich Weigand <uweigand@de.ibm.com>
Date: Wed, 27 Jul 2011 19:01:23 +0000
Subject: [PATCH] target-supports.exp (check_effective_target_mmap): Use
 check_function_available.

	* lib/target-supports.exp (check_effective_target_mmap): Use
	check_function_available.

From-SVN: r176846
---
 gcc/testsuite/ChangeLog               | 5 +++++
 gcc/testsuite/lib/target-supports.exp | 4 +---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 952c3ca1136e..dedc26458690 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-27  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
+
+	* lib/target-supports.exp (check_effective_target_mmap): Use
+	check_function_available.
+
 2011-07-27  Jeffrey Yasskin  <jyasskin@google.com>
 
 	* g++.old-deja/g++.pt/crash60.C: Updated.
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index f7027bdb6abb..28dedc97d328 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -700,9 +700,7 @@ proc check_effective_target_fopenmp {} {
 # Return 1 if the target supports mmap, 0 otherwise.
 
 proc check_effective_target_mmap {} {
-    return [check_no_compiler_messages mmap assembly {
-	#include <sys/mman.h>
-    }]
+    return [check_function_available "mmap"]
 }
 
 # Return 1 if compilation with -pthread is error-free for trivial
-- 
GitLab