]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgomp/acinclude.m4
Set num_threads to 50 on 32-bit hppa in two libgomp loop tests
[thirdparty/gcc.git] / libgomp / acinclude.m4
index d46d78596ec0cb14333e14769214964213d3e35b..12fbb20066cbf3e6f4acda2826d7cf085dae7b47 100644 (file)
@@ -56,6 +56,7 @@ extern void bar(void) __attribute__((alias("foo")));],
   fi])
 
 sinclude(../libtool.m4)
+sinclude(../config/cet.m4)
 dnl The lines below arrange for aclocal not to bring an installed
 dnl libtool.m4 into aclocal.m4, while still arranging for automake to
 dnl add a definition of LIBTOOL to Makefile.in.
@@ -116,6 +117,7 @@ dnl  LD (as a side effect of testing)
 dnl Sets:
 dnl  with_gnu_ld
 dnl  libgomp_ld_is_gold (possibly)
+dnl  libgomp_ld_is_mold (possibly)
 dnl  libgomp_gnu_ld_version (possibly)
 dnl
 dnl The last will be a single integer, e.g., version 1.23.45.0.67.89 will
@@ -148,12 +150,15 @@ AC_DEFUN([LIBGOMP_CHECK_LINKER_FEATURES], [
   # Start by getting the version number.  I think the libtool test already
   # does some of this, but throws away the result.
   libgomp_ld_is_gold=no
+  libgomp_ld_is_mold=no
   if $LD --version 2>/dev/null | grep 'GNU gold'> /dev/null 2>&1; then
     libgomp_ld_is_gold=yes
+  elif $LD --version 2>/dev/null | grep 'mold'> /dev/null 2>&1; then
+    libgomp_ld_is_mold=yes
   fi
   changequote(,)
   ldver=`$LD --version 2>/dev/null |
-         sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
+         sed -e 's/[. ][0-9]\{8\}$//;s/.* \([^ ]\{1,\}\)$/\1/; q'`
   changequote([,])
   libgomp_gnu_ld_version=`echo $ldver | \
          $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
@@ -223,25 +228,29 @@ AC_DEFUN([LIBGOMP_ENABLE_SYMVERS], [
 
 LIBGOMP_ENABLE(symvers,yes,[=STYLE],
   [enables symbol versioning of the shared library],
-  [permit yes|no|gnu|sun])
+  [permit yes|no|gnu*|sun])
 
 # If we never went through the LIBGOMP_CHECK_LINKER_FEATURES macro, then we
 # don't know enough about $LD to do tricks...
 AC_REQUIRE([LIBGOMP_CHECK_LINKER_FEATURES])
-# FIXME  The following test is too strict, in theory.
-if test $enable_shared = no || test "x$LD" = x; then
-  enable_symvers=no
-else
-  if test $with_gnu_ld = yes ; then
-    enable_symvers=gnu
+
+# Turn a 'yes' into a suitable default.
+if test x$enable_symvers = xyes ; then
+  # FIXME  The following test is too strict, in theory.
+  if test $enable_shared = no || test "x$LD" = x; then
+    enable_symvers=no
   else
-    case ${target_os} in
-      # Sun symbol versioning exists since Solaris 2.5.
-      solaris2.[[5-9]]* | solaris2.1[[0-9]]*)
-        enable_symvers=sun ;;
-      *)
-        enable_symvers=no ;;
-    esac
+    if test $with_gnu_ld = yes ; then
+      enable_symvers=gnu
+    else
+      case ${target_os} in
+        # Sun symbol versioning exists since Solaris 2.5.
+        solaris2.[[5-9]]* | solaris2.1[[0-9]]*)
+          enable_symvers=sun ;;
+        *)
+          enable_symvers=no ;;
+      esac
+    fi
   fi
 fi
 
@@ -301,6 +310,8 @@ if test $enable_symvers != no && test $libgomp_shared_libgcc = yes; then
       enable_symvers=gnu
     elif test $libgomp_ld_is_gold = yes ; then
       enable_symvers=gnu
+    elif test $libgomp_ld_is_mold = yes ; then
+      enable_symvers=gnu
     else
       # The right tools, the right setup, but too old.  Fallbacks?
       AC_MSG_WARN(=== Linker version $libgomp_gnu_ld_version is too old for)
@@ -351,15 +362,12 @@ if test $enable_symvers != no ; then
      # The Solaris 2 runtime linker doesn't support the GNU extension of
      # binding the same symbol to different versions
      solaris2*)
-       symvers_renaming=no ;;
+       ;;
      # Other platforms with GNU symbol versioning (GNU/Linux, more?) do.
      *)
        AC_DEFINE(HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT, 1,
          [Define to 1 if the target runtime linker supports binding the same symbol to different versions.])
-       symvers_renaming=yes ;;
+       ;;
     esac
-else
-    symvers_renaming=no
 fi
-AM_CONDITIONAL(LIBGOMP_BUILD_VERSIONED_SHLIB_SOL2, test $symvers_renaming = no)
 ])