]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Make failure to find pthreads support non-fatal unless --enable-threadsafe is specifi...
authorstephan <stephan@noemail.net>
Fri, 14 Feb 2025 18:06:28 +0000 (18:06 +0000)
committerstephan <stephan@noemail.net>
Fri, 14 Feb 2025 18:06:28 +0000 (18:06 +0000)
FossilOrigin-Name: 806ad1ac173d7c0d6d94bfccd3b961fc5c9541b32773c063a8c4082380d7a90d

autosetup/sqlite-config.tcl
manifest
manifest.uuid

index 338eb2408be288257c0c5e1ca8c3edc3aaab0c3c..1c0e859042617d2b3c5dab1796f8ef4c640ce187 100644 (file)
@@ -680,29 +680,32 @@ proc sqlite-handle-soname {} {
 }
 
 ########################################################################
-# If --enable-thresafe is set, this adds -DSQLITE_THREADSAFE=1 to
+# If --enable-threadsafe is set, this adds -DSQLITE_THREADSAFE=1 to
 # OPT_FEATURE_FLAGS and sets LDFLAGS_PTHREAD to the linker flags
-# needed for linking pthread. If --enable-threadsafe is not set, adds
-# -DSQLITE_THREADSAFE=0 to OPT_FEATURE_FLAGS and sets LDFLAGS_PTHREAD
-# to an empty string.
+# needed for linking pthread (possibly an empty string). If
+# --enable-threadsafe is not set, adds -DSQLITE_THREADSAFE=0 to
+# OPT_FEATURE_FLAGS and sets LDFLAGS_PTHREAD to an empty string.
 proc sqlite-handle-threadsafe {} {
   msg-checking "Support threadsafe operation? "
+  define LDFLAGS_PTHREAD ""
+  set enable 0
   proj-if-opt-truthy threadsafe {
-    msg-result yes
-    sqlite-add-feature-flag -DSQLITE_THREADSAFE=1
-    if {![proj-check-function-in-lib pthread_create pthread]
-        || ![proj-check-function-in-lib pthread_mutexattr_init pthread]} {
-      user-error "Missing required pthread bits"
+    if {[proj-check-function-in-lib pthread_create pthread]
+        && [proj-check-function-in-lib pthread_mutexattr_init pthread]} {
+      set enable 1
+      define LDFLAGS_PTHREAD [get-define lib_pthread_create]
+      undefine lib_pthread_create
+      undefine lib_pthread_mutexattr_init
+    } elseif {[proj-opt-was-provided threadsafe]} {
+      user-error "Missing required pthread libraries. Use --disable-threadsafe to disable this check."
     }
-    define LDFLAGS_PTHREAD [get-define lib_pthread_create]
-    undefine lib_pthread_create
     # Recall that LDFLAGS_PTHREAD might be empty even if pthreads if
     # found because it's in -lc on some platforms.
   } {
     msg-result no
-    sqlite-add-feature-flag -DSQLITE_THREADSAFE=0
-    define LDFLAGS_PTHREAD ""
   }
+  sqlite-add-feature-flag -DSQLITE_THREADSAFE=${enable}
+  return $enable
 }
 
 ########################################################################
index 4ae8152a9eff125945a241c0fd92eb8c2a56ee5b..ac1e73bf34d14d5e63685185881ba951d457a7a1 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Simplify\sthe\s--help\sworkaround\sintroduced\sin\s[6a21d6a2ed].
-D 2025-02-14T17:52:57.730
+C Make\sfailure\sto\sfind\spthreads\ssupport\snon-fatal\sunless\s--enable-threadsafe\sis\sspecifically\spassed\sin.\sBuild\sregression\sreported\sin\s[8e0fdb8c0d].
+D 2025-02-14T18:06:28.632
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -50,7 +50,7 @@ F autosetup/cc.tcl c0fcc50ca91deff8741e449ddad05bcd08268bc31177e613a6343bbd1fd3e
 F autosetup/jimsh0.c 6573f6bc6ff204de0139692648d7037ca0b6c067bac83a7b4e087f20a86866a4
 F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
 F autosetup/proj.tcl cef1e0aa0f2dee2042af66f28c97a9445f84d55d858ba9db4f6116846a1a325f
-F autosetup/sqlite-config.tcl 6a2f007f7c190a0077b99bd442d5bd41638f3d329c08a045653e096f21c9d16d
+F autosetup/sqlite-config.tcl 9d193c15975228021821cb3eed667491c6de340baf26d5b21a2ad861187d4936
 F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9
 F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x
 F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
@@ -2207,8 +2207,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
 F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 6a21d6a2ed627ba0a864bef85369ed17553b808ae5c19891fa1f70505dfcbe39
-R ccbb8a55e81df7376a41b6d85d79a9b1
+P b0928f2043ed2a5d445c65f0d7271431e182f5a6fcd24ddcd57ea1cdcf4bbaa2
+R deb7bf34e9c57df9897124263106b638
 U stephan
-Z 440d189d3f6211449eb539edd8ee3916
+Z 5ed369aff0b10c102cba383c3de65e06
 # Remove this line to create a well-formed Fossil manifest.
index 47d8d4598b196685287ec52b28c328793f09497d..cc8dc2bf44f3692b9322246d7a4457cb74916394 100644 (file)
@@ -1 +1 @@
-b0928f2043ed2a5d445c65f0d7271431e182f5a6fcd24ddcd57ea1cdcf4bbaa2
+806ad1ac173d7c0d6d94bfccd3b961fc5c9541b32773c063a8c4082380d7a90d