[PR68083] don't introduce undefined behavior in ifcombine
[gcc.git] / libgomp / configure.tgt
index 7c06450e0dbed179a66560480998cfe7188c9d9b..77e73f01f1abda2b08b722ff4d926080d233a799 100644 (file)
@@ -20,6 +20,10 @@ if test $gcc_cv_have_tls = yes ; then
     *-*-linux* | *-*-gnu*)
        XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
        ;;
+
+    *-*-rtems*)
+       XCFLAGS="${XCFLAGS} -ftls-model=local-exec"
+       ;;
   esac
 fi
 
@@ -142,7 +146,20 @@ case "${target}" in
        ;;
 
   *-*-aix*)
-       config_path="aix posix"
+       config_path="posix"
+       # Need to link with -lpthread so libgomp.so is self-contained.
+       XLDFLAGS="${XLDFLAGS} -lpthread"
+       ;;
+
+  nvptx*-*-*)
+       config_path="nvptx"
+       ;;
+
+  *-*-rtems*)
+       # Use self-contained synchronization objects if provided by Newlib
+       if test "x$ac_cv_type_struct__Mutex_Control" = xyes ; then
+           config_path="rtems posix"
+       fi
        ;;
 
   *)