diff options
| -rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-m4-pthread-update.patch | 731 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf_3.14.0.bb | 1 |
2 files changed, 732 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-m4-pthread-update.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-m4-pthread-update.patch new file mode 100644 index 0000000000..7e4aa103a2 --- /dev/null +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-m4-pthread-update.patch | |||
| @@ -0,0 +1,731 @@ | |||
| 1 | From 8cfb4284b4e8b2893bd30e9c764d45f288e71efb Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Adam Cozzette <acozzette@google.com> | ||
| 3 | Date: Fri, 20 Nov 2020 16:36:56 -0800 | ||
| 4 | Subject: [PATCH] Updated ax_pthread.m4 to its most recent upstream version | ||
| 5 | |||
| 6 | This should fix #8059. | ||
| 7 | |||
| 8 | Upstream-Status: Backport [471317f03adc09a0436670c31d58264b3bef6561] | ||
| 9 | Signed-off-by: Adrian Herrera <adrian.herrera@arm.com> | ||
| 10 | Expected version: v4.0.0+ | ||
| 11 | --- | ||
| 12 | m4/ax_pthread.m4 | 614 ++++++++++++++++++++++++----------------------- | ||
| 13 | 1 file changed, 318 insertions(+), 296 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4 | ||
| 16 | index d218d1af73..1598d077ff 100644 | ||
| 17 | --- a/m4/ax_pthread.m4 | ||
| 18 | +++ b/m4/ax_pthread.m4 | ||
| 19 | @@ -1,5 +1,5 @@ | ||
| 20 | # =========================================================================== | ||
| 21 | -# http://www.gnu.org/software/autoconf-archive/ax_pthread.html | ||
| 22 | +# https://www.gnu.org/software/autoconf-archive/ax_pthread.html | ||
| 23 | # =========================================================================== | ||
| 24 | # | ||
| 25 | # SYNOPSIS | ||
| 26 | @@ -55,6 +55,7 @@ | ||
| 27 | # | ||
| 28 | # Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> | ||
| 29 | # Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG> | ||
| 30 | +# Copyright (c) 2019 Marc Stevens <marc.stevens@cwi.nl> | ||
| 31 | # | ||
| 32 | # This program is free software: you can redistribute it and/or modify it | ||
| 33 | # under the terms of the GNU General Public License as published by the | ||
| 34 | @@ -67,7 +68,7 @@ | ||
| 35 | # Public License for more details. | ||
| 36 | # | ||
| 37 | # You should have received a copy of the GNU General Public License along | ||
| 38 | -# with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 39 | +# with this program. If not, see <https://www.gnu.org/licenses/>. | ||
| 40 | # | ||
| 41 | # As a special exception, the respective Autoconf Macro's copyright owner | ||
| 42 | # gives unlimited permission to copy, distribute and modify the configure | ||
| 43 | @@ -82,7 +83,7 @@ | ||
| 44 | # modified version of the Autoconf Macro, you may extend this special | ||
| 45 | # exception to the GPL to apply to your modified version as well. | ||
| 46 | |||
| 47 | -#serial 22 | ||
| 48 | +#serial 27 | ||
| 49 | |||
| 50 | AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) | ||
| 51 | AC_DEFUN([AX_PTHREAD], [ | ||
| 52 | @@ -100,22 +101,22 @@ ax_pthread_ok=no | ||
| 53 | # etcetera environment variables, and if threads linking works using | ||
| 54 | # them: | ||
| 55 | if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then | ||
| 56 | - ax_pthread_save_CC="$CC" | ||
| 57 | - ax_pthread_save_CFLAGS="$CFLAGS" | ||
| 58 | - ax_pthread_save_LIBS="$LIBS" | ||
| 59 | - AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) | ||
| 60 | - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | ||
| 61 | - LIBS="$PTHREAD_LIBS $LIBS" | ||
| 62 | - AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) | ||
| 63 | - AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes]) | ||
| 64 | - AC_MSG_RESULT([$ax_pthread_ok]) | ||
| 65 | - if test "x$ax_pthread_ok" = "xno"; then | ||
| 66 | - PTHREAD_LIBS="" | ||
| 67 | - PTHREAD_CFLAGS="" | ||
| 68 | - fi | ||
| 69 | - CC="$ax_pthread_save_CC" | ||
| 70 | - CFLAGS="$ax_pthread_save_CFLAGS" | ||
| 71 | - LIBS="$ax_pthread_save_LIBS" | ||
| 72 | + ax_pthread_save_CC="$CC" | ||
| 73 | + ax_pthread_save_CFLAGS="$CFLAGS" | ||
| 74 | + ax_pthread_save_LIBS="$LIBS" | ||
| 75 | + AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) | ||
| 76 | + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | ||
| 77 | + LIBS="$PTHREAD_LIBS $LIBS" | ||
| 78 | + AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) | ||
| 79 | + AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes]) | ||
| 80 | + AC_MSG_RESULT([$ax_pthread_ok]) | ||
| 81 | + if test "x$ax_pthread_ok" = "xno"; then | ||
| 82 | + PTHREAD_LIBS="" | ||
| 83 | + PTHREAD_CFLAGS="" | ||
| 84 | + fi | ||
| 85 | + CC="$ax_pthread_save_CC" | ||
| 86 | + CFLAGS="$ax_pthread_save_CFLAGS" | ||
| 87 | + LIBS="$ax_pthread_save_LIBS" | ||
| 88 | fi | ||
| 89 | |||
| 90 | # We must check for the threads library under a number of different | ||
| 91 | @@ -123,10 +124,12 @@ fi | ||
| 92 | # (e.g. DEC) have both -lpthread and -lpthreads, where one of the | ||
| 93 | # libraries is broken (non-POSIX). | ||
| 94 | |||
| 95 | -# Create a list of thread flags to try. Items starting with a "-" are | ||
| 96 | -# C compiler flags, and other items are library names, except for "none" | ||
| 97 | -# which indicates that we try without any flags at all, and "pthread-config" | ||
| 98 | -# which is a program returning the flags for the Pth emulation library. | ||
| 99 | +# Create a list of thread flags to try. Items with a "," contain both | ||
| 100 | +# C compiler flags (before ",") and linker flags (after ","). Other items | ||
| 101 | +# starting with a "-" are C compiler flags, and remaining items are | ||
| 102 | +# library names, except for "none" which indicates that we try without | ||
| 103 | +# any flags at all, and "pthread-config" which is a program returning | ||
| 104 | +# the flags for the Pth emulation library. | ||
| 105 | |||
| 106 | ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" | ||
| 107 | |||
| 108 | @@ -152,319 +155,338 @@ ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread -- | ||
| 109 | |||
| 110 | case $host_os in | ||
| 111 | |||
| 112 | - freebsd*) | ||
| 113 | + freebsd*) | ||
| 114 | |||
| 115 | - # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) | ||
| 116 | - # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) | ||
| 117 | + # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) | ||
| 118 | + # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) | ||
| 119 | |||
| 120 | - ax_pthread_flags="-kthread lthread $ax_pthread_flags" | ||
| 121 | - ;; | ||
| 122 | + ax_pthread_flags="-kthread lthread $ax_pthread_flags" | ||
| 123 | + ;; | ||
| 124 | |||
| 125 | - hpux*) | ||
| 126 | + hpux*) | ||
| 127 | |||
| 128 | - # From the cc(1) man page: "[-mt] Sets various -D flags to enable | ||
| 129 | - # multi-threading and also sets -lpthread." | ||
| 130 | + # From the cc(1) man page: "[-mt] Sets various -D flags to enable | ||
| 131 | + # multi-threading and also sets -lpthread." | ||
| 132 | |||
| 133 | - ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" | ||
| 134 | - ;; | ||
| 135 | + ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" | ||
| 136 | + ;; | ||
| 137 | |||
| 138 | - openedition*) | ||
| 139 | + openedition*) | ||
| 140 | |||
| 141 | - # IBM z/OS requires a feature-test macro to be defined in order to | ||
| 142 | - # enable POSIX threads at all, so give the user a hint if this is | ||
| 143 | - # not set. (We don't define these ourselves, as they can affect | ||
| 144 | - # other portions of the system API in unpredictable ways.) | ||
| 145 | + # IBM z/OS requires a feature-test macro to be defined in order to | ||
| 146 | + # enable POSIX threads at all, so give the user a hint if this is | ||
| 147 | + # not set. (We don't define these ourselves, as they can affect | ||
| 148 | + # other portions of the system API in unpredictable ways.) | ||
| 149 | |||
| 150 | - AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING], | ||
| 151 | - [ | ||
| 152 | -# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) | ||
| 153 | - AX_PTHREAD_ZOS_MISSING | ||
| 154 | -# endif | ||
| 155 | - ], | ||
| 156 | - [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])]) | ||
| 157 | - ;; | ||
| 158 | + AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING], | ||
| 159 | + [ | ||
| 160 | +# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) | ||
| 161 | + AX_PTHREAD_ZOS_MISSING | ||
| 162 | +# endif | ||
| 163 | + ], | ||
| 164 | + [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])]) | ||
| 165 | + ;; | ||
| 166 | |||
| 167 | - solaris*) | ||
| 168 | + solaris*) | ||
| 169 | |||
| 170 | - # On Solaris (at least, for some versions), libc contains stubbed | ||
| 171 | - # (non-functional) versions of the pthreads routines, so link-based | ||
| 172 | - # tests will erroneously succeed. (N.B.: The stubs are missing | ||
| 173 | - # pthread_cleanup_push, or rather a function called by this macro, | ||
| 174 | - # so we could check for that, but who knows whether they'll stub | ||
| 175 | - # that too in a future libc.) So we'll check first for the | ||
| 176 | - # standard Solaris way of linking pthreads (-mt -lpthread). | ||
| 177 | + # On Solaris (at least, for some versions), libc contains stubbed | ||
| 178 | + # (non-functional) versions of the pthreads routines, so link-based | ||
| 179 | + # tests will erroneously succeed. (N.B.: The stubs are missing | ||
| 180 | + # pthread_cleanup_push, or rather a function called by this macro, | ||
| 181 | + # so we could check for that, but who knows whether they'll stub | ||
| 182 | + # that too in a future libc.) So we'll check first for the | ||
| 183 | + # standard Solaris way of linking pthreads (-mt -lpthread). | ||
| 184 | |||
| 185 | - ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" | ||
| 186 | - ;; | ||
| 187 | + ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" | ||
| 188 | + ;; | ||
| 189 | esac | ||
| 190 | |||
| 191 | +# Are we compiling with Clang? | ||
| 192 | + | ||
| 193 | +AC_CACHE_CHECK([whether $CC is Clang], | ||
| 194 | + [ax_cv_PTHREAD_CLANG], | ||
| 195 | + [ax_cv_PTHREAD_CLANG=no | ||
| 196 | + # Note that Autoconf sets GCC=yes for Clang as well as GCC | ||
| 197 | + if test "x$GCC" = "xyes"; then | ||
| 198 | + AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], | ||
| 199 | + [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ | ||
| 200 | +# if defined(__clang__) && defined(__llvm__) | ||
| 201 | + AX_PTHREAD_CC_IS_CLANG | ||
| 202 | +# endif | ||
| 203 | + ], | ||
| 204 | + [ax_cv_PTHREAD_CLANG=yes]) | ||
| 205 | + fi | ||
| 206 | + ]) | ||
| 207 | +ax_pthread_clang="$ax_cv_PTHREAD_CLANG" | ||
| 208 | + | ||
| 209 | + | ||
| 210 | # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) | ||
| 211 | |||
| 212 | +# Note that for GCC and Clang -pthread generally implies -lpthread, | ||
| 213 | +# except when -nostdlib is passed. | ||
| 214 | +# This is problematic using libtool to build C++ shared libraries with pthread: | ||
| 215 | +# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 | ||
| 216 | +# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 | ||
| 217 | +# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 | ||
| 218 | +# To solve this, first try -pthread together with -lpthread for GCC | ||
| 219 | + | ||
| 220 | AS_IF([test "x$GCC" = "xyes"], | ||
| 221 | - [ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"]) | ||
| 222 | + [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"]) | ||
| 223 | + | ||
| 224 | +# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first | ||
| 225 | + | ||
| 226 | +AS_IF([test "x$ax_pthread_clang" = "xyes"], | ||
| 227 | + [ax_pthread_flags="-pthread,-lpthread -pthread"]) | ||
| 228 | + | ||
| 229 | |||
| 230 | # The presence of a feature test macro requesting re-entrant function | ||
| 231 | # definitions is, on some systems, a strong hint that pthreads support is | ||
| 232 | # correctly enabled | ||
| 233 | |||
| 234 | case $host_os in | ||
| 235 | - darwin* | hpux* | linux* | osf* | solaris*) | ||
| 236 | - ax_pthread_check_macro="_REENTRANT" | ||
| 237 | - ;; | ||
| 238 | + darwin* | hpux* | linux* | osf* | solaris*) | ||
| 239 | + ax_pthread_check_macro="_REENTRANT" | ||
| 240 | + ;; | ||
| 241 | |||
| 242 | - aix* | freebsd*) | ||
| 243 | - ax_pthread_check_macro="_THREAD_SAFE" | ||
| 244 | - ;; | ||
| 245 | + aix*) | ||
| 246 | + ax_pthread_check_macro="_THREAD_SAFE" | ||
| 247 | + ;; | ||
| 248 | |||
| 249 | - *) | ||
| 250 | - ax_pthread_check_macro="--" | ||
| 251 | - ;; | ||
| 252 | + *) | ||
| 253 | + ax_pthread_check_macro="--" | ||
| 254 | + ;; | ||
| 255 | esac | ||
| 256 | AS_IF([test "x$ax_pthread_check_macro" = "x--"], | ||
| 257 | [ax_pthread_check_cond=0], | ||
| 258 | [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) | ||
| 259 | |||
| 260 | -# Are we compiling with Clang? | ||
| 261 | |||
| 262 | -AC_CACHE_CHECK([whether $CC is Clang], | ||
| 263 | - [ax_cv_PTHREAD_CLANG], | ||
| 264 | - [ax_cv_PTHREAD_CLANG=no | ||
| 265 | - # Note that Autoconf sets GCC=yes for Clang as well as GCC | ||
| 266 | - if test "x$GCC" = "xyes"; then | ||
| 267 | - AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], | ||
| 268 | - [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ | ||
| 269 | -# if defined(__clang__) && defined(__llvm__) | ||
| 270 | - AX_PTHREAD_CC_IS_CLANG | ||
| 271 | -# endif | ||
| 272 | - ], | ||
| 273 | - [ax_cv_PTHREAD_CLANG=yes]) | ||
| 274 | - fi | ||
| 275 | - ]) | ||
| 276 | -ax_pthread_clang="$ax_cv_PTHREAD_CLANG" | ||
| 277 | +if test "x$ax_pthread_ok" = "xno"; then | ||
| 278 | +for ax_pthread_try_flag in $ax_pthread_flags; do | ||
| 279 | + | ||
| 280 | + case $ax_pthread_try_flag in | ||
| 281 | + none) | ||
| 282 | + AC_MSG_CHECKING([whether pthreads work without any flags]) | ||
| 283 | + ;; | ||
| 284 | + | ||
| 285 | + *,*) | ||
| 286 | + PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` | ||
| 287 | + PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` | ||
| 288 | + AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"]) | ||
| 289 | + ;; | ||
| 290 | + | ||
| 291 | + -*) | ||
| 292 | + AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) | ||
| 293 | + PTHREAD_CFLAGS="$ax_pthread_try_flag" | ||
| 294 | + ;; | ||
| 295 | + | ||
| 296 | + pthread-config) | ||
| 297 | + AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) | ||
| 298 | + AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) | ||
| 299 | + PTHREAD_CFLAGS="`pthread-config --cflags`" | ||
| 300 | + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" | ||
| 301 | + ;; | ||
| 302 | + | ||
| 303 | + *) | ||
| 304 | + AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) | ||
| 305 | + PTHREAD_LIBS="-l$ax_pthread_try_flag" | ||
| 306 | + ;; | ||
| 307 | + esac | ||
| 308 | + | ||
| 309 | + ax_pthread_save_CFLAGS="$CFLAGS" | ||
| 310 | + ax_pthread_save_LIBS="$LIBS" | ||
| 311 | + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | ||
| 312 | + LIBS="$PTHREAD_LIBS $LIBS" | ||
| 313 | + | ||
| 314 | + # Check for various functions. We must include pthread.h, | ||
| 315 | + # since some functions may be macros. (On the Sequent, we | ||
| 316 | + # need a special flag -Kthread to make this header compile.) | ||
| 317 | + # We check for pthread_join because it is in -lpthread on IRIX | ||
| 318 | + # while pthread_create is in libc. We check for pthread_attr_init | ||
| 319 | + # due to DEC craziness with -lpthreads. We check for | ||
| 320 | + # pthread_cleanup_push because it is one of the few pthread | ||
| 321 | + # functions on Solaris that doesn't have a non-functional libc stub. | ||
| 322 | + # We try pthread_create on general principles. | ||
| 323 | + | ||
| 324 | + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h> | ||
| 325 | +# if $ax_pthread_check_cond | ||
| 326 | +# error "$ax_pthread_check_macro must be defined" | ||
| 327 | +# endif | ||
| 328 | + static void *some_global = NULL; | ||
| 329 | + static void routine(void *a) | ||
| 330 | + { | ||
| 331 | + /* To avoid any unused-parameter or | ||
| 332 | + unused-but-set-parameter warning. */ | ||
| 333 | + some_global = a; | ||
| 334 | + } | ||
| 335 | + static void *start_routine(void *a) { return a; }], | ||
| 336 | + [pthread_t th; pthread_attr_t attr; | ||
| 337 | + pthread_create(&th, 0, start_routine, 0); | ||
| 338 | + pthread_join(th, 0); | ||
| 339 | + pthread_attr_init(&attr); | ||
| 340 | + pthread_cleanup_push(routine, 0); | ||
| 341 | + pthread_cleanup_pop(0) /* ; */])], | ||
| 342 | + [ax_pthread_ok=yes], | ||
| 343 | + []) | ||
| 344 | + | ||
| 345 | + CFLAGS="$ax_pthread_save_CFLAGS" | ||
| 346 | + LIBS="$ax_pthread_save_LIBS" | ||
| 347 | + | ||
| 348 | + AC_MSG_RESULT([$ax_pthread_ok]) | ||
| 349 | + AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) | ||
| 350 | + | ||
| 351 | + PTHREAD_LIBS="" | ||
| 352 | + PTHREAD_CFLAGS="" | ||
| 353 | +done | ||
| 354 | +fi | ||
| 355 | |||
| 356 | -ax_pthread_clang_warning=no | ||
| 357 | |||
| 358 | # Clang needs special handling, because older versions handle the -pthread | ||
| 359 | # option in a rather... idiosyncratic way | ||
| 360 | |||
| 361 | if test "x$ax_pthread_clang" = "xyes"; then | ||
| 362 | |||
| 363 | - # Clang takes -pthread; it has never supported any other flag | ||
| 364 | - | ||
| 365 | - # (Note 1: This will need to be revisited if a system that Clang | ||
| 366 | - # supports has POSIX threads in a separate library. This tends not | ||
| 367 | - # to be the way of modern systems, but it's conceivable.) | ||
| 368 | - | ||
| 369 | - # (Note 2: On some systems, notably Darwin, -pthread is not needed | ||
| 370 | - # to get POSIX threads support; the API is always present and | ||
| 371 | - # active. We could reasonably leave PTHREAD_CFLAGS empty. But | ||
| 372 | - # -pthread does define _REENTRANT, and while the Darwin headers | ||
| 373 | - # ignore this macro, third-party headers might not.) | ||
| 374 | - | ||
| 375 | - PTHREAD_CFLAGS="-pthread" | ||
| 376 | - PTHREAD_LIBS= | ||
| 377 | - | ||
| 378 | - ax_pthread_ok=yes | ||
| 379 | - | ||
| 380 | - # However, older versions of Clang make a point of warning the user | ||
| 381 | - # that, in an invocation where only linking and no compilation is | ||
| 382 | - # taking place, the -pthread option has no effect ("argument unused | ||
| 383 | - # during compilation"). They expect -pthread to be passed in only | ||
| 384 | - # when source code is being compiled. | ||
| 385 | - # | ||
| 386 | - # Problem is, this is at odds with the way Automake and most other | ||
| 387 | - # C build frameworks function, which is that the same flags used in | ||
| 388 | - # compilation (CFLAGS) are also used in linking. Many systems | ||
| 389 | - # supported by AX_PTHREAD require exactly this for POSIX threads | ||
| 390 | - # support, and in fact it is often not straightforward to specify a | ||
| 391 | - # flag that is used only in the compilation phase and not in | ||
| 392 | - # linking. Such a scenario is extremely rare in practice. | ||
| 393 | - # | ||
| 394 | - # Even though use of the -pthread flag in linking would only print | ||
| 395 | - # a warning, this can be a nuisance for well-run software projects | ||
| 396 | - # that build with -Werror. So if the active version of Clang has | ||
| 397 | - # this misfeature, we search for an option to squash it. | ||
| 398 | - | ||
| 399 | - AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread], | ||
| 400 | - [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG], | ||
| 401 | - [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown | ||
| 402 | - # Create an alternate version of $ac_link that compiles and | ||
| 403 | - # links in two steps (.c -> .o, .o -> exe) instead of one | ||
| 404 | - # (.c -> exe), because the warning occurs only in the second | ||
| 405 | - # step | ||
| 406 | - ax_pthread_save_ac_link="$ac_link" | ||
| 407 | - ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' | ||
| 408 | - ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` | ||
| 409 | - ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" | ||
| 410 | - ax_pthread_save_CFLAGS="$CFLAGS" | ||
| 411 | - for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do | ||
| 412 | - AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) | ||
| 413 | - CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" | ||
| 414 | - ac_link="$ax_pthread_save_ac_link" | ||
| 415 | - AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], | ||
| 416 | - [ac_link="$ax_pthread_2step_ac_link" | ||
| 417 | - AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], | ||
| 418 | - [break]) | ||
| 419 | - ]) | ||
| 420 | - done | ||
| 421 | - ac_link="$ax_pthread_save_ac_link" | ||
| 422 | - CFLAGS="$ax_pthread_save_CFLAGS" | ||
| 423 | - AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no]) | ||
| 424 | - ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" | ||
| 425 | - ]) | ||
| 426 | - | ||
| 427 | - case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in | ||
| 428 | - no | unknown) ;; | ||
| 429 | - *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; | ||
| 430 | - esac | ||
| 431 | + # Clang takes -pthread; it has never supported any other flag | ||
| 432 | + | ||
| 433 | + # (Note 1: This will need to be revisited if a system that Clang | ||
| 434 | + # supports has POSIX threads in a separate library. This tends not | ||
| 435 | + # to be the way of modern systems, but it's conceivable.) | ||
| 436 | + | ||
| 437 | + # (Note 2: On some systems, notably Darwin, -pthread is not needed | ||
| 438 | + # to get POSIX threads support; the API is always present and | ||
| 439 | + # active. We could reasonably leave PTHREAD_CFLAGS empty. But | ||
| 440 | + # -pthread does define _REENTRANT, and while the Darwin headers | ||
| 441 | + # ignore this macro, third-party headers might not.) | ||
| 442 | + | ||
| 443 | + # However, older versions of Clang make a point of warning the user | ||
| 444 | + # that, in an invocation where only linking and no compilation is | ||
| 445 | + # taking place, the -pthread option has no effect ("argument unused | ||
| 446 | + # during compilation"). They expect -pthread to be passed in only | ||
| 447 | + # when source code is being compiled. | ||
| 448 | + # | ||
| 449 | + # Problem is, this is at odds with the way Automake and most other | ||
| 450 | + # C build frameworks function, which is that the same flags used in | ||
| 451 | + # compilation (CFLAGS) are also used in linking. Many systems | ||
| 452 | + # supported by AX_PTHREAD require exactly this for POSIX threads | ||
| 453 | + # support, and in fact it is often not straightforward to specify a | ||
| 454 | + # flag that is used only in the compilation phase and not in | ||
| 455 | + # linking. Such a scenario is extremely rare in practice. | ||
| 456 | + # | ||
| 457 | + # Even though use of the -pthread flag in linking would only print | ||
| 458 | + # a warning, this can be a nuisance for well-run software projects | ||
| 459 | + # that build with -Werror. So if the active version of Clang has | ||
| 460 | + # this misfeature, we search for an option to squash it. | ||
| 461 | + | ||
| 462 | + AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread], | ||
| 463 | + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG], | ||
| 464 | + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown | ||
| 465 | + # Create an alternate version of $ac_link that compiles and | ||
| 466 | + # links in two steps (.c -> .o, .o -> exe) instead of one | ||
| 467 | + # (.c -> exe), because the warning occurs only in the second | ||
| 468 | + # step | ||
| 469 | + ax_pthread_save_ac_link="$ac_link" | ||
| 470 | + ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' | ||
| 471 | + ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` | ||
| 472 | + ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" | ||
| 473 | + ax_pthread_save_CFLAGS="$CFLAGS" | ||
| 474 | + for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do | ||
| 475 | + AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) | ||
| 476 | + CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" | ||
| 477 | + ac_link="$ax_pthread_save_ac_link" | ||
| 478 | + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], | ||
| 479 | + [ac_link="$ax_pthread_2step_ac_link" | ||
| 480 | + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], | ||
| 481 | + [break]) | ||
| 482 | + ]) | ||
| 483 | + done | ||
| 484 | + ac_link="$ax_pthread_save_ac_link" | ||
| 485 | + CFLAGS="$ax_pthread_save_CFLAGS" | ||
| 486 | + AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no]) | ||
| 487 | + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" | ||
| 488 | + ]) | ||
| 489 | + | ||
| 490 | + case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in | ||
| 491 | + no | unknown) ;; | ||
| 492 | + *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; | ||
| 493 | + esac | ||
| 494 | |||
| 495 | fi # $ax_pthread_clang = yes | ||
| 496 | |||
| 497 | -if test "x$ax_pthread_ok" = "xno"; then | ||
| 498 | -for ax_pthread_try_flag in $ax_pthread_flags; do | ||
| 499 | |||
| 500 | - case $ax_pthread_try_flag in | ||
| 501 | - none) | ||
| 502 | - AC_MSG_CHECKING([whether pthreads work without any flags]) | ||
| 503 | - ;; | ||
| 504 | - | ||
| 505 | - -mt,pthread) | ||
| 506 | - AC_MSG_CHECKING([whether pthreads work with -mt -lpthread]) | ||
| 507 | - PTHREAD_CFLAGS="-mt" | ||
| 508 | - PTHREAD_LIBS="-lpthread" | ||
| 509 | - ;; | ||
| 510 | - | ||
| 511 | - -*) | ||
| 512 | - AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) | ||
| 513 | - PTHREAD_CFLAGS="$ax_pthread_try_flag" | ||
| 514 | - ;; | ||
| 515 | - | ||
| 516 | - pthread-config) | ||
| 517 | - AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) | ||
| 518 | - AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) | ||
| 519 | - PTHREAD_CFLAGS="`pthread-config --cflags`" | ||
| 520 | - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" | ||
| 521 | - ;; | ||
| 522 | - | ||
| 523 | - *) | ||
| 524 | - AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) | ||
| 525 | - PTHREAD_LIBS="-l$ax_pthread_try_flag" | ||
| 526 | - ;; | ||
| 527 | - esac | ||
| 528 | - | ||
| 529 | - ax_pthread_save_CFLAGS="$CFLAGS" | ||
| 530 | - ax_pthread_save_LIBS="$LIBS" | ||
| 531 | - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | ||
| 532 | - LIBS="$PTHREAD_LIBS $LIBS" | ||
| 533 | - | ||
| 534 | - # Check for various functions. We must include pthread.h, | ||
| 535 | - # since some functions may be macros. (On the Sequent, we | ||
| 536 | - # need a special flag -Kthread to make this header compile.) | ||
| 537 | - # We check for pthread_join because it is in -lpthread on IRIX | ||
| 538 | - # while pthread_create is in libc. We check for pthread_attr_init | ||
| 539 | - # due to DEC craziness with -lpthreads. We check for | ||
| 540 | - # pthread_cleanup_push because it is one of the few pthread | ||
| 541 | - # functions on Solaris that doesn't have a non-functional libc stub. | ||
| 542 | - # We try pthread_create on general principles. | ||
| 543 | - | ||
| 544 | - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h> | ||
| 545 | -# if $ax_pthread_check_cond | ||
| 546 | -# error "$ax_pthread_check_macro must be defined" | ||
| 547 | -# endif | ||
| 548 | - static void routine(void *a) { a = 0; } | ||
| 549 | - static void *start_routine(void *a) { return a; }], | ||
| 550 | - [pthread_t th; pthread_attr_t attr; | ||
| 551 | - pthread_create(&th, 0, start_routine, 0); | ||
| 552 | - pthread_join(th, 0); | ||
| 553 | - pthread_attr_init(&attr); | ||
| 554 | - pthread_cleanup_push(routine, 0); | ||
| 555 | - pthread_cleanup_pop(0) /* ; */])], | ||
| 556 | - [ax_pthread_ok=yes], | ||
| 557 | - []) | ||
| 558 | - | ||
| 559 | - CFLAGS="$ax_pthread_save_CFLAGS" | ||
| 560 | - LIBS="$ax_pthread_save_LIBS" | ||
| 561 | - | ||
| 562 | - AC_MSG_RESULT([$ax_pthread_ok]) | ||
| 563 | - AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) | ||
| 564 | - | ||
| 565 | - PTHREAD_LIBS="" | ||
| 566 | - PTHREAD_CFLAGS="" | ||
| 567 | -done | ||
| 568 | -fi | ||
| 569 | |||
| 570 | # Various other checks: | ||
| 571 | if test "x$ax_pthread_ok" = "xyes"; then | ||
| 572 | - ax_pthread_save_CFLAGS="$CFLAGS" | ||
| 573 | - ax_pthread_save_LIBS="$LIBS" | ||
| 574 | - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | ||
| 575 | - LIBS="$PTHREAD_LIBS $LIBS" | ||
| 576 | - | ||
| 577 | - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. | ||
| 578 | - AC_CACHE_CHECK([for joinable pthread attribute], | ||
| 579 | - [ax_cv_PTHREAD_JOINABLE_ATTR], | ||
| 580 | - [ax_cv_PTHREAD_JOINABLE_ATTR=unknown | ||
| 581 | - for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do | ||
| 582 | - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>], | ||
| 583 | - [int attr = $ax_pthread_attr; return attr /* ; */])], | ||
| 584 | - [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break], | ||
| 585 | - []) | ||
| 586 | - done | ||
| 587 | - ]) | ||
| 588 | - AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ | ||
| 589 | - test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ | ||
| 590 | - test "x$ax_pthread_joinable_attr_defined" != "xyes"], | ||
| 591 | - [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], | ||
| 592 | - [$ax_cv_PTHREAD_JOINABLE_ATTR], | ||
| 593 | - [Define to necessary symbol if this constant | ||
| 594 | - uses a non-standard name on your system.]) | ||
| 595 | - ax_pthread_joinable_attr_defined=yes | ||
| 596 | - ]) | ||
| 597 | - | ||
| 598 | - AC_CACHE_CHECK([whether more special flags are required for pthreads], | ||
| 599 | - [ax_cv_PTHREAD_SPECIAL_FLAGS], | ||
| 600 | - [ax_cv_PTHREAD_SPECIAL_FLAGS=no | ||
| 601 | - case $host_os in | ||
| 602 | - solaris*) | ||
| 603 | - ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" | ||
| 604 | - ;; | ||
| 605 | - esac | ||
| 606 | - ]) | ||
| 607 | - AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ | ||
| 608 | - test "x$ax_pthread_special_flags_added" != "xyes"], | ||
| 609 | - [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" | ||
| 610 | - ax_pthread_special_flags_added=yes]) | ||
| 611 | - | ||
| 612 | - AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], | ||
| 613 | - [ax_cv_PTHREAD_PRIO_INHERIT], | ||
| 614 | - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], | ||
| 615 | - [[int i = PTHREAD_PRIO_INHERIT;]])], | ||
| 616 | - [ax_cv_PTHREAD_PRIO_INHERIT=yes], | ||
| 617 | - [ax_cv_PTHREAD_PRIO_INHERIT=no]) | ||
| 618 | - ]) | ||
| 619 | - AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ | ||
| 620 | - test "x$ax_pthread_prio_inherit_defined" != "xyes"], | ||
| 621 | - [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.]) | ||
| 622 | - ax_pthread_prio_inherit_defined=yes | ||
| 623 | - ]) | ||
| 624 | - | ||
| 625 | - CFLAGS="$ax_pthread_save_CFLAGS" | ||
| 626 | - LIBS="$ax_pthread_save_LIBS" | ||
| 627 | - | ||
| 628 | - # More AIX lossage: compile with *_r variant | ||
| 629 | - if test "x$GCC" != "xyes"; then | ||
| 630 | - case $host_os in | ||
| 631 | - aix*) | ||
| 632 | - AS_CASE(["x/$CC"], | ||
| 633 | - [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], | ||
| 634 | - [#handle absolute path differently from PATH based program lookup | ||
| 635 | - AS_CASE(["x$CC"], | ||
| 636 | - [x/*], | ||
| 637 | - [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], | ||
| 638 | - [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) | ||
| 639 | - ;; | ||
| 640 | - esac | ||
| 641 | - fi | ||
| 642 | + ax_pthread_save_CFLAGS="$CFLAGS" | ||
| 643 | + ax_pthread_save_LIBS="$LIBS" | ||
| 644 | + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | ||
| 645 | + LIBS="$PTHREAD_LIBS $LIBS" | ||
| 646 | + | ||
| 647 | + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. | ||
| 648 | + AC_CACHE_CHECK([for joinable pthread attribute], | ||
| 649 | + [ax_cv_PTHREAD_JOINABLE_ATTR], | ||
| 650 | + [ax_cv_PTHREAD_JOINABLE_ATTR=unknown | ||
| 651 | + for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do | ||
| 652 | + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>], | ||
| 653 | + [int attr = $ax_pthread_attr; return attr /* ; */])], | ||
| 654 | + [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break], | ||
| 655 | + []) | ||
| 656 | + done | ||
| 657 | + ]) | ||
| 658 | + AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ | ||
| 659 | + test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ | ||
| 660 | + test "x$ax_pthread_joinable_attr_defined" != "xyes"], | ||
| 661 | + [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], | ||
| 662 | + [$ax_cv_PTHREAD_JOINABLE_ATTR], | ||
| 663 | + [Define to necessary symbol if this constant | ||
| 664 | + uses a non-standard name on your system.]) | ||
| 665 | + ax_pthread_joinable_attr_defined=yes | ||
| 666 | + ]) | ||
| 667 | + | ||
| 668 | + AC_CACHE_CHECK([whether more special flags are required for pthreads], | ||
| 669 | + [ax_cv_PTHREAD_SPECIAL_FLAGS], | ||
| 670 | + [ax_cv_PTHREAD_SPECIAL_FLAGS=no | ||
| 671 | + case $host_os in | ||
| 672 | + solaris*) | ||
| 673 | + ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" | ||
| 674 | + ;; | ||
| 675 | + esac | ||
| 676 | + ]) | ||
| 677 | + AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ | ||
| 678 | + test "x$ax_pthread_special_flags_added" != "xyes"], | ||
| 679 | + [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" | ||
| 680 | + ax_pthread_special_flags_added=yes]) | ||
| 681 | + | ||
| 682 | + AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], | ||
| 683 | + [ax_cv_PTHREAD_PRIO_INHERIT], | ||
| 684 | + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], | ||
| 685 | + [[int i = PTHREAD_PRIO_INHERIT; | ||
| 686 | + return i;]])], | ||
| 687 | + [ax_cv_PTHREAD_PRIO_INHERIT=yes], | ||
| 688 | + [ax_cv_PTHREAD_PRIO_INHERIT=no]) | ||
| 689 | + ]) | ||
| 690 | + AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ | ||
| 691 | + test "x$ax_pthread_prio_inherit_defined" != "xyes"], | ||
| 692 | + [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.]) | ||
| 693 | + ax_pthread_prio_inherit_defined=yes | ||
| 694 | + ]) | ||
| 695 | + | ||
| 696 | + CFLAGS="$ax_pthread_save_CFLAGS" | ||
| 697 | + LIBS="$ax_pthread_save_LIBS" | ||
| 698 | + | ||
| 699 | + # More AIX lossage: compile with *_r variant | ||
| 700 | + if test "x$GCC" != "xyes"; then | ||
| 701 | + case $host_os in | ||
| 702 | + aix*) | ||
| 703 | + AS_CASE(["x/$CC"], | ||
| 704 | + [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], | ||
| 705 | + [#handle absolute path differently from PATH based program lookup | ||
| 706 | + AS_CASE(["x$CC"], | ||
| 707 | + [x/*], | ||
| 708 | + [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], | ||
| 709 | + [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) | ||
| 710 | + ;; | ||
| 711 | + esac | ||
| 712 | + fi | ||
| 713 | fi | ||
| 714 | |||
| 715 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" | ||
| 716 | @@ -475,11 +497,11 @@ AC_SUBST([PTHREAD_CC]) | ||
| 717 | |||
| 718 | # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: | ||
| 719 | if test "x$ax_pthread_ok" = "xyes"; then | ||
| 720 | - ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) | ||
| 721 | - : | ||
| 722 | + ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) | ||
| 723 | + : | ||
| 724 | else | ||
| 725 | - ax_pthread_ok=no | ||
| 726 | - $2 | ||
| 727 | + ax_pthread_ok=no | ||
| 728 | + $2 | ||
| 729 | fi | ||
| 730 | AC_LANG_POP | ||
| 731 | ])dnl AX_PTHREAD | ||
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.14.0.bb b/meta-oe/recipes-devtools/protobuf/protobuf_3.14.0.bb index 31e3bcc5b1..00f1e99d35 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf_3.14.0.bb +++ b/meta-oe/recipes-devtools/protobuf/protobuf_3.14.0.bb | |||
| @@ -17,6 +17,7 @@ SRC_URI = "git://github.com/protocolbuffers/protobuf.git \ | |||
| 17 | file://0001-protobuf-fix-configure-error.patch \ | 17 | file://0001-protobuf-fix-configure-error.patch \ |
| 18 | file://0001-Makefile.am-include-descriptor.cc-when-building-libp.patch \ | 18 | file://0001-Makefile.am-include-descriptor.cc-when-building-libp.patch \ |
| 19 | file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ | 19 | file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ |
| 20 | file://0001-fix-m4-pthread-update.patch \ | ||
| 20 | " | 21 | " |
| 21 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |
| 22 | 23 | ||
