Explorar el Código

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 hace 1 año
padre
commit
c7b322aac8
Se han modificado 2 ficheros con 8 adiciones y 2 borrados
  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>
 Max Mehl <max.mehl@fsfe.org>
 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
       if test "$USE_THREADS_POSIX" != "1"
       then
+        # assign PTHREAD for pkg-config use
+        PTHREAD=" -pthread"
+
         case $host in
         *-ibm-aix*)
            dnl Check if compiler is xlC
@@ -3627,12 +3630,14 @@ if test "$want_pthreads" != "no"; then
              CFLAGS="$CFLAGS -qthreaded"
            fi
            ;;
+        powerpc-*amigaos*)
+           dnl No -pthread option, but link with -lpthread
+           PTHREAD=" -lpthread"
+           ;;
         *)
            CFLAGS="$CFLAGS -pthread"
            ;;
         esac
-        # assign PTHREAD for pkg-config use
-        PTHREAD=" -pthread"
         AC_CHECK_LIB(pthread, pthread_create,
                      [USE_THREADS_POSIX=1],
                      [ CFLAGS="$save_CFLAGS"])