Bläddra i källkod

configure: -pthread not available on AmigaOS 4.x

The most recent GCC builds for AmigaOS 4.x do not allow -pthread and
exit with an error. Instead, need to explictly specify -lpthread.

Closes #9266
Futaura 1 år sedan
förälder
incheckning
c7b322aac8
2 ändrade filer med 8 tillägg och 2 borttagningar
  1. 1 0
      .mailmap
  2. 7 2
      configure.ac

+ 1 - 0
.mailmap

@@ -92,3 +92,4 @@ Henrik Holst <henrik.holst@millistream.com>
 Christian Schmitz <support@monkeybreadsoftware.de>
 Christian Schmitz <support@monkeybreadsoftware.de>
 Max Mehl <max.mehl@fsfe.org>
 Max Mehl <max.mehl@fsfe.org>
 rzrymiak on github <106121613+rzrymiak@users.noreply.github.com>
 rzrymiak on github <106121613+rzrymiak@users.noreply.github.com>
+Oliver Roberts <oliver@futaura.co.uk>

+ 7 - 2
configure.ac

@@ -3617,6 +3617,9 @@ if test "$want_pthreads" != "no"; then
       dnl if it wasn't found without lib, search for it in pthread lib
       dnl if it wasn't found without lib, search for it in pthread lib
       if test "$USE_THREADS_POSIX" != "1"
       if test "$USE_THREADS_POSIX" != "1"
       then
       then
+        # assign PTHREAD for pkg-config use
+        PTHREAD=" -pthread"
+
         case $host in
         case $host in
         *-ibm-aix*)
         *-ibm-aix*)
            dnl Check if compiler is xlC
            dnl Check if compiler is xlC
@@ -3627,12 +3630,14 @@ if test "$want_pthreads" != "no"; then
              CFLAGS="$CFLAGS -qthreaded"
              CFLAGS="$CFLAGS -qthreaded"
            fi
            fi
            ;;
            ;;
+        powerpc-*amigaos*)
+           dnl No -pthread option, but link with -lpthread
+           PTHREAD=" -lpthread"
+           ;;
         *)
         *)
            CFLAGS="$CFLAGS -pthread"
            CFLAGS="$CFLAGS -pthread"
            ;;
            ;;
         esac
         esac
-        # assign PTHREAD for pkg-config use
-        PTHREAD=" -pthread"
         AC_CHECK_LIB(pthread, pthread_create,
         AC_CHECK_LIB(pthread, pthread_create,
                      [USE_THREADS_POSIX=1],
                      [USE_THREADS_POSIX=1],
                      [ CFLAGS="$save_CFLAGS"])
                      [ CFLAGS="$save_CFLAGS"])