Merge pull request #324471 from paparodeo/db-configure-fixes
db4: fix pthread configure detection
This commit is contained in:
commit
2c5b5ebf5e
@ -153,22 +153,42 @@ diff -ur a/dist/aclocal/clock.m4 b/dist/aclocal/clock.m4
|
||||
diff -ur a/dist/aclocal/mutex.m4 b/dist/aclocal/mutex.m4
|
||||
--- a/dist/aclocal/mutex.m4 1969-12-31 19:00:01.000000000 -0500
|
||||
+++ b/dist/aclocal/mutex.m4 2023-06-05 19:14:47.214158196 -0400
|
||||
@@ -4,6 +4,7 @@
|
||||
@@ -3,7 +3,9 @@
|
||||
# POSIX pthreads tests: inter-process safe and intra-process only.
|
||||
AC_DEFUN(AM_PTHREADS_SHARED, [
|
||||
AC_TRY_RUN([
|
||||
+#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
+int
|
||||
main() {
|
||||
pthread_cond_t cond;
|
||||
pthread_mutex_t mutex;
|
||||
@@ -46,6 +47,7 @@
|
||||
@@ -24,6 +26,7 @@ main() {
|
||||
pthread_mutexattr_destroy(&mutexattr));
|
||||
}], [db_cv_mutex="$1"],,
|
||||
AC_TRY_LINK([
|
||||
+#include <stdlib.h>
|
||||
#include <pthread.h>],[
|
||||
pthread_cond_t cond;
|
||||
pthread_mutex_t mutex;
|
||||
@@ -45,7 +48,9 @@ AC_TRY_LINK([
|
||||
], [db_cv_mutex="$1"]))])
|
||||
AC_DEFUN(AM_PTHREADS_PRIVATE, [
|
||||
AC_TRY_RUN([
|
||||
+#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
+int
|
||||
main() {
|
||||
pthread_cond_t cond;
|
||||
pthread_mutex_t mutex;
|
||||
@@ -64,6 +69,7 @@ main() {
|
||||
pthread_mutexattr_destroy(&mutexattr));
|
||||
}], [db_cv_mutex="$1"],,
|
||||
AC_TRY_LINK([
|
||||
+#include <stdlib.h>
|
||||
#include <pthread.h>],[
|
||||
pthread_cond_t cond;
|
||||
pthread_mutex_t mutex;
|
||||
diff -ur a/dist/aclocal/sequence.m4 b/dist/aclocal/sequence.m4
|
||||
--- a/dist/aclocal/sequence.m4 1969-12-31 19:00:01.000000000 -0500
|
||||
+++ b/dist/aclocal/sequence.m4 2023-06-05 19:14:02.007869956 -0400
|
||||
@ -183,7 +203,7 @@ diff -ur a/dist/aclocal/sequence.m4 b/dist/aclocal/sequence.m4
|
||||
$db_cv_seq_type l;
|
||||
unsigned $db_cv_seq_type u;
|
||||
@@ -59,7 +62,9 @@
|
||||
return (1);
|
||||
return (1);
|
||||
return (0);
|
||||
}],, [db_cv_build_sequence="no"],
|
||||
- AC_TRY_LINK(,[
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ lib, stdenv, fetchurl, autoreconfHook, targetPlatform, ... } @ args:
|
||||
{ lib, stdenv, fetchurl, autoreconfHook, ... } @ args:
|
||||
|
||||
import ./generic.nix (builtins.removeAttrs args ["targetPlatform"] // {
|
||||
import ./generic.nix (args // {
|
||||
version = "4.8.30";
|
||||
sha256 = "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0";
|
||||
extraPatches = [
|
||||
@ -9,8 +9,6 @@ import ./generic.nix (builtins.removeAttrs args ["targetPlatform"] // {
|
||||
./darwin-mutexes-4.8.patch
|
||||
];
|
||||
|
||||
drvArgs.configureFlags = lib.optional (targetPlatform.useLLVM or false) "--with-mutex=POSIX/pthreads";
|
||||
|
||||
drvArgs.hardeningDisable = [ "format" ];
|
||||
drvArgs.doCheck = false;
|
||||
})
|
||||
|
@ -67,8 +67,7 @@ stdenv.mkDerivation (rec {
|
||||
(if compat185 then "--enable-compat185" else "--disable-compat185")
|
||||
]
|
||||
++ lib.optional dbmSupport "--enable-dbm"
|
||||
++ lib.optional stdenv.isFreeBSD "--with-pic"
|
||||
++ (drvArgs.configureFlags or []);
|
||||
++ lib.optional stdenv.isFreeBSD "--with-pic";
|
||||
|
||||
preConfigure = ''
|
||||
cd build_unix
|
||||
@ -93,4 +92,4 @@ stdenv.mkDerivation (rec {
|
||||
license = license;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
} // builtins.removeAttrs drvArgs [ "configureFlags" ])
|
||||
} // drvArgs)
|
||||
|
Loading…
Reference in New Issue
Block a user