aboutsummaryrefslogtreecommitdiff
path: root/libgomp/configure
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-03-13 10:57:07 +0000
committerSebastian Huber <sh@gcc.gnu.org>2015-03-13 10:57:07 +0000
commitcd93945d0345971b75bbc3f4a0d6d8d6a474f644 (patch)
tree986b376731172e3e654d665a0958e076f287ef73 /libgomp/configure
parent9b78b1e73091dccb5176b1c0c5eeb165ea85771c (diff)
downloadgcc-cd93945d0345971b75bbc3f4a0d6d8d6a474f644.zip
gcc-cd93945d0345971b75bbc3f4a0d6d8d6a474f644.tar.gz
gcc-cd93945d0345971b75bbc3f4a0d6d8d6a474f644.tar.bz2
libgomp: Add RTEMS support
libgomp/ChangeLog * configure.tgt (*-*-rtems*): Use local-exec TLS model. * configure.ac (*-*-rtems*): Assume Pthread is supported. (pthread.h): Check for this header file. * configure: Regenerate. From-SVN: r221415
Diffstat (limited to 'libgomp/configure')
-rwxr-xr-xlibgomp/configure22
1 files changed, 14 insertions, 8 deletions
diff --git a/libgomp/configure b/libgomp/configure
index 0818707..e39787c 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -14611,7 +14611,7 @@ $as_echo "#define STRING_WITH_STRINGS 1" >>confdefs.h
fi
-for ac_header in unistd.h semaphore.h sys/loadavg.h sys/time.h sys/time.h
+for ac_header in pthread.h unistd.h semaphore.h sys/loadavg.h sys/time.h sys/time.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -15033,14 +15033,19 @@ ac_config_commands="$ac_config_commands gstdint.h"
-# Check to see if -pthread or -lpthread is needed. Prefer the former.
-# In case the pthread.h system header is not found, this test will fail.
XPCFLAGS=""
-CFLAGS="$CFLAGS -pthread"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+case "$host" in
+ *-*-rtems*)
+ # RTEMS supports Pthreads, but the library is not available at GCC build time.
+ ;;
+ *)
+ # Check to see if -pthread or -lpthread is needed. Prefer the former.
+ # In case the pthread.h system header is not found, this test will fail.
+ CFLAGS="$CFLAGS -pthread"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
- void *g(void *d) { return NULL; }
+ void *g(void *d) { return NULL; }
int
main ()
{
@@ -15053,10 +15058,10 @@ if ac_fn_c_try_link "$LINENO"; then :
XPCFLAGS=" -Wc,-pthread"
else
CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
- void *g(void *d) { return NULL; }
+ void *g(void *d) { return NULL; }
int
main ()
{
@@ -15075,6 +15080,7 @@ rm -f core conftest.err conftest.$ac_objext \
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+esac
# Plugins for offload execution, configure.ac fragment. -*- mode: autoconf -*-
#