From: stephan Date: Fri, 14 Feb 2025 18:07:04 +0000 (+0000) Subject: Make failure to find pthreads support non-fatal unless --enable-threadsafe is specifi... X-Git-Tag: version-3.49.1~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e3ef1e52459c984afe6ae907d97b23e6bdc014c;p=thirdparty%2Fsqlite.git Make failure to find pthreads support non-fatal unless --enable-threadsafe is specifically passed in. Build regression reported in [8e0fdb8c0d]. FossilOrigin-Name: f8843b82921621f24c81092debd3c9a5225b498efd47e494c70378342f06b060 --- diff --git a/autosetup/sqlite-config.tcl b/autosetup/sqlite-config.tcl index 338eb2408b..1c0e859042 100644 --- a/autosetup/sqlite-config.tcl +++ b/autosetup/sqlite-config.tcl @@ -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 } ######################################################################## diff --git a/manifest b/manifest index 6137ce31ef..45da330030 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Simplify\sthe\s--help\sworkaround\sintroduced\sin\s[6a21d6a2ed]. -D 2025-02-14T17:53:52.159 +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:07:04.752 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 42119a2e899e319b92f3159952b7ef7219c82cb45eeb636aaf8d909def8150f8 -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 @@ -2209,10 +2209,9 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 61726358c57348a9537c6a83abfabbdc25fc2f94a9a7ea31c8e97066bf822571 -Q +6a21d6a2ed627ba0a864bef85369ed17553b808ae5c19891fa1f70505dfcbe39 -Q +b0928f2043ed2a5d445c65f0d7271431e182f5a6fcd24ddcd57ea1cdcf4bbaa2 -R 552f2aa476b747a5d546bcc10cae728f +P 03d0c19289b06a05a08091d23a253fa660c6d94a0c8d18742e68da5c37a00dcc +Q +806ad1ac173d7c0d6d94bfccd3b961fc5c9541b32773c063a8c4082380d7a90d +R 380b3ef47da15204a261a5c2e6a0e692 U stephan -Z 3057a97b520ffc72b03bc1f5801f8a27 +Z 6bf21aa6a9bd6f8c3f70f65f5821ba1e # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 6d127d38c4..de4a782cbd 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -03d0c19289b06a05a08091d23a253fa660c6d94a0c8d18742e68da5c37a00dcc +f8843b82921621f24c81092debd3c9a5225b498efd47e494c70378342f06b060