This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
top-level configure.ac: factor the libgomp check for posix-like OS
- From: Gary Funck <gary at intrepid dot com>
- To: Gcc Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Richard Henderson <rth at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>, Nenad Vukicevic <nenad at intrepid dot com>
- Date: Mon, 17 Aug 2015 06:46:32 -0700
- Subject: top-level configure.ac: factor the libgomp check for posix-like OS
- Authentication-results: sourceware.org; auth=none
I'm working on a patch set for GUPC, and as part of that work,
I may have a couple changes to trunk that will improve the fit
with the GUPC changes. Here's one in configure.ac.
At the moment, there is a check to see if $enable_libgom
is not set, followed by a case statement which adds
libgomp to $noconfigdirs on non POSIX-like OS's.
We'd like to re-use that logic for libgupc,
which has a similar requirement and propose this
re-factoring for trunk.
2015-08-17 Gary Funck <gary@intrepid.com>
* configure.ac (noconfigdirs): Factor libgomp logic testing for
POSIX-like host OS.
* configure: Re-generate.
Index: configure.ac
===================================================================
--- configure.ac (revision 226928)
+++ configure.ac (working copy)
@@ -529,9 +529,8 @@ if test x$enable_static_libjava != xyes
fi
AC_SUBST(EXTRA_CONFIGARGS_LIBJAVA)
-# Enable libgomp by default on hosted POSIX systems, and a few others.
-if test x$enable_libgomp = x ; then
- case "${target}" in
+posix_like_os="yes"
+case "${target}" in
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
;;
*-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*)
@@ -543,9 +542,14 @@ if test x$enable_libgomp = x ; then
nvptx*-*-*)
;;
*)
- noconfigdirs="$noconfigdirs target-libgomp"
- ;;
- esac
+ posix_like_os="no"
+ ;;
+esac
+
+# Enable libgomp by default on POSIX hosted systems.
+if test x$enable_libgomp = x && test $posix_like_os = "no" ; then
+ # Disable libgomp on non POSIX hosted systems.
+ noconfigdirs="$noconfigdirs target-libgomp"
fi
# Disable libatomic on unsupported systems.