From fbd9de1830209ec810ef1bac614c2c57031728bf Mon Sep 17 00:00:00 2001 From: stephan Date: Tue, 19 Nov 2024 15:20:47 +0000 Subject: [PATCH 1/9] Initial configure support for linking certain binaries to libsqlite3.so instead of embedding it dynamically (which they typically do). This currently applies only to sqldiff, but support for adding the same for other tools is planned. This requires disabling the soname because setting it causes the build to link to whatever libsqlite3.so.0 is installed system-wide, so the soname now defaults to off. FossilOrigin-Name: 9192c146e2898456a6b8ea43a6f02c0227ddce5b584374fbeb2d63bd2ecd5d8c --- Makefile.in | 1 + auto.def | 8 ++++++-- main.mk | 15 +++++++++++++-- manifest | 21 ++++++++++++--------- manifest.uuid | 2 +- 5 files changed, 33 insertions(+), 14 deletions(-) diff --git a/Makefile.in b/Makefile.in index b374bd4838..219347c301 100644 --- a/Makefile.in +++ b/Makefile.in @@ -287,6 +287,7 @@ AS_AUTO_DEF = $(TOP)/auto.def AS_AUTORECONFIG = @SQLITE_AUTORECONFIG@ USE_AMALGAMATION ?= @USE_AMALGAMATION@ +LINK_TOOLS_DYNAMICALLY ?= @LINK_TOOLS_DYNAMICALLY@ AMALGAMATION_GEN_FLAGS ?= --linemacros=@AMALGAMATION_LINE_MACROS@ # diff --git a/auto.def b/auto.def index 919df0101f..addaf408e3 100644 --- a/auto.def +++ b/auto.def @@ -198,7 +198,9 @@ set flags { linemacros => {Enable #line macros in the amalgamation} dev => {Enable dev-mode build: automatically enables certain other flags} dump-defines=0 => {Dump autosetup defines to $DUMP_DEFINES_TXT (for build debugging)} - soname:=legacy => {SONAME for libsqlite3.so. Must be one of: none, auto, legacy} + link-tools-dynamically => {Dynamically link libsqlite3 to certain tools which normally statically embed it.} + soname:=none => {SONAME for libsqlite3.so. Must be one of: none, auto, legacy} + # --soname has a long story behind it, as well as no small amount of uncertainty. # } if {"" ne $DUMP_DEFINES_JSON} { @@ -327,6 +329,8 @@ proj-if-opt-truthy dev { define CFLAGS [get-env CFLAGS {-O0 -g}] } +define LINK_TOOLS_DYNAMICALLY [proj-opt-was-provided link-tools-dynamically] + ######################################################################## # Handle --with-wasi-sdk=DIR # @@ -468,7 +472,7 @@ apply {{} { if {[proj-opt-was-provided soname]} { set soname [opt-val soname] } else { - set soname legacy + set soname none; # enabling soname breaks linking for the --link-tools-dynamically feature } switch -exact -- $soname { none { return 0 } diff --git a/main.mk b/main.mk index a22c0fe775..20a54adfc3 100644 --- a/main.mk +++ b/main.mk @@ -205,6 +205,14 @@ ENABLE_STATIC ?= 1 # USE_AMALGAMATION ?= 1 # +# $(LINK_TOOLS_DYNAMICALLY) +# +# If true, certain binaries which typically statically link against +# libsqlite3 or its component object files will instead link against +# the DLL. +# +LINK_TOOLS_DYNAMICALLY ?= 0 +# # $(AMALGAMATION_GEN_FLAGS) = # # Optional flags for the amalgamation generator. @@ -1950,8 +1958,11 @@ install-shell-0: sqlite3$(T.exe) $(install-dir.bin) install-shell-1 install-shell-: install: install-shell-$(HAVE_WASI_SDK) -sqldiff$(T.exe): $(TOP)/tool/sqldiff.c $(TOP)/ext/misc/sqlite3_stdio.h sqlite3.o sqlite3.h - $(T.link) -o $@ $(TOP)/tool/sqldiff.c sqlite3.o $(LDFLAGS.libsqlite3) +sqldiff$(T.exe): sqldiff.$(LINK_TOOLS_DYNAMICALLY) +sqldiff.0: $(TOP)/tool/sqldiff.c $(TOP)/ext/misc/sqlite3_stdio.h sqlite3.o sqlite3.h + $(T.link) -o sqldiff$(T.exe) $(TOP)/tool/sqldiff.c sqlite3.o $(LDFLAGS.libsqlite3) +sqldiff.1: $(TOP)/tool/sqldiff.c $(TOP)/ext/misc/sqlite3_stdio.h $(libsqlite3.SO) + $(T.link) -o sqldiff$(T.exe) $(TOP)/tool/sqldiff.c -L. -lsqlite3 $(LDFLAGS.configure) install-diff: sqldiff$(T.exe) $(install-dir.bin) $(INSTALL) -s sqldiff$(T.exe) "$(install-dir.bin)" diff --git a/manifest b/manifest index 0ed54a2c71..5d62160222 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Fix\sa\sproblem\shandling\sOOM\serrors\sin\sfts3\sthat\scould\soccur\swhen\sparsing\smulti-token\sstrings. -D 2024-11-19T11:58:32.252 +C Initial\sconfigure\ssupport\sfor\slinking\scertain\sbinaries\sto\slibsqlite3.so\sinstead\sof\sembedding\sit\sdynamically\s(which\sthey\stypically\sdo).\sThis\scurrently\sapplies\sonly\sto\ssqldiff,\sbut\ssupport\sfor\sadding\sthe\ssame\sfor\sother\stools\sis\splanned.\sThis\srequires\sdisabling\sthe\ssoname\sbecause\ssetting\sit\scauses\sthe\sbuild\sto\slink\sto\swhatever\slibsqlite3.so.0\sis\sinstalled\ssystem-wide,\sso\sthe\ssoname\snow\sdefaults\sto\soff. +D 2024-11-19T15:20:47.506 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d -F Makefile.in c3a01e98bd2ae6a4631df02f11249ac07ffa3d540d3034e2675f66cc259f2ea7 +F Makefile.in 5461b1125a3039fef49f4896519d164ebe22ee394d20d69913ab0fdc8c464b63 F Makefile.linux-generic bd3e3cacd369821a6241d4ea1967395c962dfe3057e38cb0a435cee0e8b789d0 F Makefile.msc a92237976eb92c5efaa0dd2524746aec12c196e12df8d4dbff9543a4648c3312 F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159 @@ -13,7 +13,7 @@ F art/icon-80x90.gif 65509ce3e5f86a9cd64fe7fca2d23954199f31fe44c1e09e208c80fb83d F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2 F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90 F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2 -F auto.def 94f0f4a697e8221d5c7ca561771a3afabb0e707922daad89b60908b87a8e399b +F auto.def 6aa362ceeeaaf2521b0c781a44489d6f5bd6c7a147e9a6e8e6ae68a928158357 F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903 F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347 F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac @@ -696,7 +696,7 @@ F ext/wasm/tests/opfs/concurrency/test.js d08889a5bb6e61937d0b8cbb78c9efbefbf65a F ext/wasm/tests/opfs/concurrency/worker.js 0a8c1a3e6ebb38aabbee24f122693f1fb29d599948915c76906681bb7da1d3d2 F ext/wasm/wasmfs.make bc8bb227f35d5bd3863a7bd2233437c37472a0d81585979f058f9b9b503bef35 F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0 -F main.mk c4e37e3015f9c2d8fd20fa3071ba86e7396959c8d5960e37e95aa85421e2b739 +F main.mk d82de0fbdb6b7521c55e47feced1e76204058a19d860266a7c77b194cb298321 F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271 F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504 F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421 @@ -2198,8 +2198,11 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 84d41e9d04c62601e84621e8edb3b81abbacc366a6b5e7059f8b6796fade7ffa -R 15d5c68f2ffe8e979f466eec5e117ba3 -U dan -Z 7f81f47d67e456b494dfb3b575661f30 +P 4c4d1db00bd2c522165876dcf1606116a72525d9ffc891b266213704e25cde55 +R 4e525e0050af78dd77407fe8fd687f7e +T *branch * link-tools-dynamically +T *sym-link-tools-dynamically * +T -sym-trunk * Cancelled\sby\sbranch. +U stephan +Z 39424480882931664661450c95279514 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index dea58b2d92..d1e075f2be 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -4c4d1db00bd2c522165876dcf1606116a72525d9ffc891b266213704e25cde55 +9192c146e2898456a6b8ea43a6f02c0227ddce5b584374fbeb2d63bd2ecd5d8c From 5ef61df185a26ea826aa79c94d6eee9329048f91 Mon Sep 17 00:00:00 2001 From: stephan Date: Tue, 19 Nov 2024 16:40:49 +0000 Subject: [PATCH 2/9] Reformulate sqldiff deps and rules so that the target matches the resulting file name, to avoid rebuilding it on every make invocation. Apply the same treatment to the sqlite3 CLI shell. FossilOrigin-Name: 9a17b83f859ef14629cb78d8c9af1b3f2493b0c8756bc2ebcf92f0872fb507c3 --- auto.def | 2 +- main.mk | 48 +++++++++++++++++++++++++++++------------------- manifest | 17 +++++++---------- manifest.uuid | 2 +- 4 files changed, 38 insertions(+), 31 deletions(-) diff --git a/auto.def b/auto.def index addaf408e3..1e388ac20e 100644 --- a/auto.def +++ b/auto.def @@ -199,7 +199,7 @@ set flags { dev => {Enable dev-mode build: automatically enables certain other flags} dump-defines=0 => {Dump autosetup defines to $DUMP_DEFINES_TXT (for build debugging)} link-tools-dynamically => {Dynamically link libsqlite3 to certain tools which normally statically embed it.} - soname:=none => {SONAME for libsqlite3.so. Must be one of: none, auto, legacy} + soname:=legacy => {SONAME for libsqlite3.so. Must be one of: none, auto, legacy} # --soname has a long story behind it, as well as no small amount of uncertainty. # } diff --git a/main.mk b/main.mk index 20a54adfc3..af616086be 100644 --- a/main.mk +++ b/main.mk @@ -1930,11 +1930,26 @@ xbin: threadtest5 # special compile-time options that are interpreted by individual # source files within the amalgamation. # -sqlite3$(T.exe): shell.c sqlite3.c - $(T.link) -o $@ \ - shell.c sqlite3.c \ - $(CFLAGS.readline) $(SHELL_OPT) $(CFLAGS.icu) \ - $(LDFLAGS.libsqlite3) $(LDFLAGS.readline) +# How/whether we build sqlite3$(T.exe) depends on both +# $(HAVE_WASI_SDK) and $(LINK_TOOLS_DYNAMICALLY), thus there are +# several targets here, only one of which the sqlite3$(T.exe) target +# indirectly resolves to. +# +sqlite3-shell.0.0.deps = shell.c sqlite3.c +sqlite3-shell.0.0.rules = \ + $(T.link) -o $@ \ + shell.c sqlite3.c \ + $(CFLAGS.readline) $(SHELL_OPT) $(CFLAGS.icu) \ + $(LDFLAGS.libsqlite3) $(LDFLAGS.readline) +sqlite3-shell.0.1.deps = shell.c $(libsqlite3.SO) +sqlite3-shell.0.1.rules = \ + $(T.link) -o $@ \ + shell.c -L. -lsqlite3 \ + $(CFLAGS.readline) $(SHELL_OPT) $(CFLAGS.icu) \ + $(LDFLAGS.configure) $(LDFLAGS.readline) $(LDFLAGS.zlib) +sqlite3$(T.exe): $(sqlite3-shell.$(HAVE_WASI_SDK).$(LINK_TOOLS_DYNAMICALLY).deps) + $(sqlite3-shell.$(HAVE_WASI_SDK).$(LINK_TOOLS_DYNAMICALLY).rules) +all: sqlite3$(T.exe) # The "sqlite3d" CLI is build using separate source files. This # is useful during development and debugging. @@ -1945,24 +1960,19 @@ sqlite3d$(T.exe): shell.c $(LIBOBJS0) $(CFLAGS.readline) $(SHELL_OPT) \ $(LDFLAGS.libsqlite3) $(LDFLAGS.readline) -# -# Build sqlite3$(T.exe) by default except in wasi-sdk builds. Yes, the -# semantics of 0 and 1 are confusingly swapped here. -# -sqlite3$(T.exe)-1: -sqlite3$(T.exe)-0 sqlite3$(T.exe)-: sqlite3$(T.exe) -all: sqlite3$(T.exe)-$(HAVE_WASI_SDK) - install-shell-0: sqlite3$(T.exe) $(install-dir.bin) $(INSTALL) -s sqlite3$(T.exe) "$(install-dir.bin)" -install-shell-1 install-shell-: +install-shell-1: install: install-shell-$(HAVE_WASI_SDK) -sqldiff$(T.exe): sqldiff.$(LINK_TOOLS_DYNAMICALLY) -sqldiff.0: $(TOP)/tool/sqldiff.c $(TOP)/ext/misc/sqlite3_stdio.h sqlite3.o sqlite3.h - $(T.link) -o sqldiff$(T.exe) $(TOP)/tool/sqldiff.c sqlite3.o $(LDFLAGS.libsqlite3) -sqldiff.1: $(TOP)/tool/sqldiff.c $(TOP)/ext/misc/sqlite3_stdio.h $(libsqlite3.SO) - $(T.link) -o sqldiff$(T.exe) $(TOP)/tool/sqldiff.c -L. -lsqlite3 $(LDFLAGS.configure) +# How to build sqldiff$(T.exe) depends on $(LINK_TOOLS_DYNAMICALLY) +# +sqldiff.0.deps = $(TOP)/tool/sqldiff.c $(TOP)/ext/misc/sqlite3_stdio.h sqlite3.o sqlite3.h +sqldiff.0.rules = $(T.link) -o $@ $(TOP)/tool/sqldiff.c sqlite3.o $(LDFLAGS.libsqlite3) +sqldiff.1.deps = $(TOP)/tool/sqldiff.c $(TOP)/ext/misc/sqlite3_stdio.h $(libsqlite3.SO) +sqldiff.1.rules = $(T.link) -o $@ $(TOP)/tool/sqldiff.c -L. -lsqlite3 $(LDFLAGS.configure) +sqldiff$(T.exe): $(sqldiff.$(LINK_TOOLS_DYNAMICALLY).deps) + $(sqldiff.$(LINK_TOOLS_DYNAMICALLY).rules) install-diff: sqldiff$(T.exe) $(install-dir.bin) $(INSTALL) -s sqldiff$(T.exe) "$(install-dir.bin)" diff --git a/manifest b/manifest index 5d62160222..3cfb99819a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Initial\sconfigure\ssupport\sfor\slinking\scertain\sbinaries\sto\slibsqlite3.so\sinstead\sof\sembedding\sit\sdynamically\s(which\sthey\stypically\sdo).\sThis\scurrently\sapplies\sonly\sto\ssqldiff,\sbut\ssupport\sfor\sadding\sthe\ssame\sfor\sother\stools\sis\splanned.\sThis\srequires\sdisabling\sthe\ssoname\sbecause\ssetting\sit\scauses\sthe\sbuild\sto\slink\sto\swhatever\slibsqlite3.so.0\sis\sinstalled\ssystem-wide,\sso\sthe\ssoname\snow\sdefaults\sto\soff. -D 2024-11-19T15:20:47.506 +C Reformulate\ssqldiff\sdeps\sand\srules\sso\sthat\sthe\starget\smatches\sthe\sresulting\sfile\sname,\sto\savoid\srebuilding\sit\son\severy\smake\sinvocation.\sApply\sthe\ssame\streatment\sto\sthe\ssqlite3\sCLI\sshell. +D 2024-11-19T16:40:49.154 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d @@ -13,7 +13,7 @@ F art/icon-80x90.gif 65509ce3e5f86a9cd64fe7fca2d23954199f31fe44c1e09e208c80fb83d F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2 F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90 F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2 -F auto.def 6aa362ceeeaaf2521b0c781a44489d6f5bd6c7a147e9a6e8e6ae68a928158357 +F auto.def b6fc55bf238320b58d06d6e5364374722aae3b8320c4f928e0e6c208405f2cfd F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903 F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347 F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac @@ -696,7 +696,7 @@ F ext/wasm/tests/opfs/concurrency/test.js d08889a5bb6e61937d0b8cbb78c9efbefbf65a F ext/wasm/tests/opfs/concurrency/worker.js 0a8c1a3e6ebb38aabbee24f122693f1fb29d599948915c76906681bb7da1d3d2 F ext/wasm/wasmfs.make bc8bb227f35d5bd3863a7bd2233437c37472a0d81585979f058f9b9b503bef35 F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0 -F main.mk d82de0fbdb6b7521c55e47feced1e76204058a19d860266a7c77b194cb298321 +F main.mk 8ef1c08eb0e644df88978d2b1db4e2af9efc430a0fe3dd152d00fa21593fee41 F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271 F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504 F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421 @@ -2198,11 +2198,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 4c4d1db00bd2c522165876dcf1606116a72525d9ffc891b266213704e25cde55 -R 4e525e0050af78dd77407fe8fd687f7e -T *branch * link-tools-dynamically -T *sym-link-tools-dynamically * -T -sym-trunk * Cancelled\sby\sbranch. +P 9192c146e2898456a6b8ea43a6f02c0227ddce5b584374fbeb2d63bd2ecd5d8c +R 9e3125f578c182d0fd3f116bcadb353b U stephan -Z 39424480882931664661450c95279514 +Z c9c941efe50c477f477a1622a4a0493c # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index d1e075f2be..5cd2262fb1 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -9192c146e2898456a6b8ea43a6f02c0227ddce5b584374fbeb2d63bd2ecd5d8c +9a17b83f859ef14629cb78d8c9af1b3f2493b0c8756bc2ebcf92f0872fb507c3 From 3cd93a0b67ccd688864782c2a2148d987f1c3001 Mon Sep 17 00:00:00 2001 From: stephan Date: Tue, 19 Nov 2024 17:41:13 +0000 Subject: [PATCH 3/9] Revert linking the shell to the dll for reasons explained in new makefile comments. Move the --with-debug configure flag into the developer options set and add commentary about why it should never be used for production builds. FossilOrigin-Name: 7b14309be42be4204c4d30e9741d56d75ab8ec34686791d032612337fe1c4dcf --- auto.def | 9 +++++++-- autosetup/proj.tcl | 10 +++++----- main.mk | 44 ++++++++++++++++++++++---------------------- manifest | 16 ++++++++-------- manifest.uuid | 2 +- 5 files changed, 43 insertions(+), 38 deletions(-) diff --git a/auto.def b/auto.def index 1e388ac20e..eee8c5aeff 100644 --- a/auto.def +++ b/auto.def @@ -123,7 +123,6 @@ set DUMP_DEFINES_JSON ""; #./config.defines.json ######################################################################## set flags { # - with-debug:=1 => {Enable debug build flags} shared=1 => {Disable build of shared libary} static=1 => {Disable build of static library (mostly)} amalgamation=1 => {Disable the amalgamation and instead build all files separately.} @@ -193,10 +192,16 @@ set flags { with-emsdk:=auto => {Top-most dir of the Emscripten SDK installation. Default = EMSDK env var.} # # + + # --with-debug does more than simply builds with a -g compilation + # flag and will impact performance by as much as 4x, as it includes + # large numbers of assert()s in performance-critical loops. Never + # use --with-debug for production builds. + with-debug:=1 => {Enable debug build flags} + dev => {Enable dev-mode build: automatically enables certain other flags} test-status => {Enable status of tests} gcov=0 => {Enable coverage testing using gcov} linemacros => {Enable #line macros in the amalgamation} - dev => {Enable dev-mode build: automatically enables certain other flags} dump-defines=0 => {Dump autosetup defines to $DUMP_DEFINES_TXT (for build debugging)} link-tools-dynamically => {Dynamically link libsqlite3 to certain tools which normally statically embed it.} soname:=legacy => {SONAME for libsqlite3.so. Must be one of: none, auto, legacy} diff --git a/autosetup/proj.tcl b/autosetup/proj.tcl index 863962c2f8..7da0b0fa35 100644 --- a/autosetup/proj.tcl +++ b/autosetup/proj.tcl @@ -311,11 +311,11 @@ proc proj-first-bin-of {args} { ######################################################################## # @proj-opt-was-provided key # -# Returns 1 if the user specifically provided the given configure -# flag, else 0. This can be used to distinguish between options which -# have a default value and those which were explicitly provided by the -# user, even if the latter is done in a way which uses the default -# value. +# Returns 1 if the user specifically provided the given configure flag +# or if it was specifically set using proj-opt-set, else 0. This can +# be used to distinguish between options which have a default value +# and those which were explicitly provided by the user, even if the +# latter is done in a way which uses the default value. # # For example, with a configure flag defined like: # diff --git a/main.mk b/main.mk index af616086be..3193e531d1 100644 --- a/main.mk +++ b/main.mk @@ -901,6 +901,9 @@ TESTOPTS = --verbose=file --output=test-out.txt # # Extra compiler options for various shell tools # +# Note that some of these will only apply when embedding sqlite3.c +# into the shell, as these flags are not otherwise passed on to the +# library. SHELL_OPT += -DSQLITE_DQS=0 SHELL_OPT += -DSQLITE_ENABLE_FTS4 #SHELL_OPT += -DSQLITE_ENABLE_FTS5 @@ -1926,30 +1929,27 @@ threadtest5: sqlite3.c $(TOP)/test/threadtest5.c $(T.link) $(TOP)/test/threadtest5.c sqlite3.c -o $@ $(LDFLAGS.libsqlite3) xbin: threadtest5 -# The standard CLI is built using the amalgamation since it uses -# special compile-time options that are interpreted by individual -# source files within the amalgamation. # -# How/whether we build sqlite3$(T.exe) depends on both -# $(HAVE_WASI_SDK) and $(LINK_TOOLS_DYNAMICALLY), thus there are -# several targets here, only one of which the sqlite3$(T.exe) target -# indirectly resolves to. +# When building sqlite3$(T.exe) we specifically embed a copy of +# sqlite3.c, and not link to libsqlite3.so or libsqlite3.a, because +# the shell needs to be able to enable arbitrary library features, +# some of which have significant performance impacts. For example,, +# SQLITE_ENABLE_EXPLAIN_COMMENTS has been measured as having a 5.2% +# runtime performance hit, which is fine for use in the shell but is +# not appropriate for the canonical library build. # -sqlite3-shell.0.0.deps = shell.c sqlite3.c -sqlite3-shell.0.0.rules = \ - $(T.link) -o $@ \ - shell.c sqlite3.c \ - $(CFLAGS.readline) $(SHELL_OPT) $(CFLAGS.icu) \ - $(LDFLAGS.libsqlite3) $(LDFLAGS.readline) -sqlite3-shell.0.1.deps = shell.c $(libsqlite3.SO) -sqlite3-shell.0.1.rules = \ - $(T.link) -o $@ \ - shell.c -L. -lsqlite3 \ - $(CFLAGS.readline) $(SHELL_OPT) $(CFLAGS.icu) \ - $(LDFLAGS.configure) $(LDFLAGS.readline) $(LDFLAGS.zlib) -sqlite3$(T.exe): $(sqlite3-shell.$(HAVE_WASI_SDK).$(LINK_TOOLS_DYNAMICALLY).deps) - $(sqlite3-shell.$(HAVE_WASI_SDK).$(LINK_TOOLS_DYNAMICALLY).rules) -all: sqlite3$(T.exe) +sqlite3$(T.exe): shell.c sqlite3.c + $(T.link) -o $@ \ + shell.c sqlite3.c \ + $(CFLAGS.readline) $(SHELL_OPT) $(CFLAGS.icu) \ + $(LDFLAGS.libsqlite3) $(LDFLAGS.readline) +# +# Build sqlite3$(T.exe) by default except in wasi-sdk builds. Yes, the +# semantics of 0 and 1 are confusingly swapped here. +# +sqlite3$(T.exe)-1: +sqlite3$(T.exe)-0: sqlite3$(T.exe) +all: sqlite3$(T.exe)-$(HAVE_WASI_SDK) # The "sqlite3d" CLI is build using separate source files. This # is useful during development and debugging. diff --git a/manifest b/manifest index 3cfb99819a..e7c415ad2b 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Reformulate\ssqldiff\sdeps\sand\srules\sso\sthat\sthe\starget\smatches\sthe\sresulting\sfile\sname,\sto\savoid\srebuilding\sit\son\severy\smake\sinvocation.\sApply\sthe\ssame\streatment\sto\sthe\ssqlite3\sCLI\sshell. -D 2024-11-19T16:40:49.154 +C Revert\slinking\sthe\sshell\sto\sthe\sdll\sfor\sreasons\sexplained\sin\snew\smakefile\scomments.\sMove\sthe\s--with-debug\sconfigure\sflag\sinto\sthe\sdeveloper\soptions\sset\sand\sadd\scommentary\sabout\swhy\sit\sshould\snever\sbe\sused\sfor\sproduction\sbuilds. +D 2024-11-19T17:41:13.115 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d @@ -13,7 +13,7 @@ F art/icon-80x90.gif 65509ce3e5f86a9cd64fe7fca2d23954199f31fe44c1e09e208c80fb83d F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2 F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90 F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2 -F auto.def b6fc55bf238320b58d06d6e5364374722aae3b8320c4f928e0e6c208405f2cfd +F auto.def 4f5ae3ed11bb110b1eda2a6b7ee46489b7371bc8f7c19f0ed944613c170e4951 F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903 F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347 F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac @@ -49,7 +49,7 @@ F autosetup/cc-shared.tcl 4f024e94a47f427ba61de1739f6381ef0080210f9fae89112d5c1d F autosetup/cc.tcl c0fcc50ca91deff8741e449ddad05bcd08268bc31177e613a6343bbd1fd3e45f F autosetup/jimsh0.c d40e381ea4526a067590e7b91bd4b2efa6d4980d286f908054c647b3df4aee14 F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba -F autosetup/proj.tcl 96fe16b87c9feb9c1cf2682280f678c659bc52c09fca5de02afc2f7ec5bfb154 +F autosetup/proj.tcl 22556a325c964aa5377d4d881722385f41fcd7c1b60102ba8965f7814c83e9ce F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9 F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad @@ -696,7 +696,7 @@ F ext/wasm/tests/opfs/concurrency/test.js d08889a5bb6e61937d0b8cbb78c9efbefbf65a F ext/wasm/tests/opfs/concurrency/worker.js 0a8c1a3e6ebb38aabbee24f122693f1fb29d599948915c76906681bb7da1d3d2 F ext/wasm/wasmfs.make bc8bb227f35d5bd3863a7bd2233437c37472a0d81585979f058f9b9b503bef35 F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0 -F main.mk 8ef1c08eb0e644df88978d2b1db4e2af9efc430a0fe3dd152d00fa21593fee41 +F main.mk 7cb02ba61e74ccab3ad6775b9207b12c6a26bbe3b2dd280039bc0cd532a52ceb F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271 F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504 F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421 @@ -2198,8 +2198,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 9192c146e2898456a6b8ea43a6f02c0227ddce5b584374fbeb2d63bd2ecd5d8c -R 9e3125f578c182d0fd3f116bcadb353b +P 9a17b83f859ef14629cb78d8c9af1b3f2493b0c8756bc2ebcf92f0872fb507c3 +R 0effbfea81177717d860b06a74ce79d8 U stephan -Z c9c941efe50c477f477a1622a4a0493c +Z aa386346708361b0b61a6d6560bd2986 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 5cd2262fb1..2cf57950de 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -9a17b83f859ef14629cb78d8c9af1b3f2493b0c8756bc2ebcf92f0872fb507c3 +7b14309be42be4204c4d30e9741d56d75ab8ec34686791d032612337fe1c4dcf From c73b85c156b93911ceb62a435b1566b0b6f41bcb Mon Sep 17 00:00:00 2001 From: stephan Date: Tue, 19 Nov 2024 19:47:51 +0000 Subject: [PATCH 4/9] Get sqlite3_analyzer optionally linking against libsqlite3.so instead of embedding sqlite3.c. Patch mkccode.tcl to accept digits in its IFDEF/IFNDEF checks and sqlite3_analyzer.c.in to only include sqlite3.c if -DINCLUDE_SQLITE3_C is passed to mkccode.tcl. FossilOrigin-Name: 80f3bf8c2ee31ba1ab9187d64d5dcbbf97a61845a21b036f89ea9133153575c0 --- main.mk | 31 ++++++++++++++++++++++++++----- manifest | 16 ++++++++-------- manifest.uuid | 2 +- tool/mkccode.tcl | 4 ++-- tool/sqlite3_analyzer.c.in | 3 ++- 5 files changed, 39 insertions(+), 17 deletions(-) diff --git a/main.mk b/main.mk index 3193e531d1..878be92ae6 100644 --- a/main.mk +++ b/main.mk @@ -1741,13 +1741,34 @@ smoketest: $(TESTPROGS) fuzzcheck$(T.exe) shelltest: $(TCLSH_CMD) $(TOP)/test/testrunner.tcl release shell +# +# sqlite3_analyzer.c build depends on $(LINK_TOOLS_DYNAMICALLY). +# +sqlite3_analyzer.c.flags.0 = -DINCLUDE_SQLITE3_C=1 +sqlite3_analyzer.c.flags.1 = sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl \ - $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in has_tclsh85 - $(B.tclsh) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c + $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in + $(B.tclsh) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in \ + $(sqlite3_analyzer.c.flags.$(LINK_TOOLS_DYNAMICALLY)) \ + $(OPT_FEATURE_FLAGS) \ + > $@ -sqlite3_analyzer$(T.exe): $(T.tcl.env.sh) sqlite3_analyzer.c - $(T.link.tcl) sqlite3_analyzer.c -o $@ $$TCL_LIB_SPEC $$TCL_INCLUDE_SPEC \ - $(LDFLAGS.libsqlite3) +# +# sqlite3_analyzer's build mode depends on $(LINK_TOOLS_DYNAMICALLY). +# +sqlite3_analyzer.flags.1 = -L. -lsqlite3 $(LDFLAGS.math) +sqlite3_analyzer.flags.0 = $(LDFLAGS.libsqlite3) +sqlite3_analyzer.deps.1 = $(libsqlite3.SO) +sqlite3_analyzer.deps.0 = +sqlite3_analyzer$(T.exe): $(T.tcl.env.sh) sqlite3_analyzer.c \ + $(sqlite3_analyzer.deps.$(LINK_TOOLS_DYNAMICALLY)) + $(T.link.tcl) sqlite3_analyzer.c -o $@ \ + $(sqlite3_analyzer.flags.$(LINK_TOOLS_DYNAMICALLY)) \ + $$TCL_LIB_SPEC $$TCL_INCLUDE_SPEC +# ^^^^ the order of those flags is relevant for +# $(sqlite3_analyzer.flags.1): if the $$TCL_... flags come first they +# can cause the $@ to link to an out-of-tree libsqlite3.so, which may +# or may not fail or otherwise cause confusion. sqltclsh.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl \ $(TOP)/ext/misc/appendvfs.c $(TOP)/tool/mkccode.tcl \ diff --git a/manifest b/manifest index efd82a70ad..8c13ab27c3 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Merge\strunk\sinto\sthis\sbranch.\sFix\sa\ssmall\sjimtcl/tclsh\sregex\sincompatibility\sin\smkccode.tcl. -D 2024-11-19T19:16:58.734 +C Get\ssqlite3_analyzer\soptionally\slinking\sagainst\slibsqlite3.so\sinstead\sof\sembedding\ssqlite3.c.\sPatch\smkccode.tcl\sto\saccept\sdigits\sin\sits\sIFDEF/IFNDEF\schecks\sand\ssqlite3_analyzer.c.in\sto\sonly\sinclude\ssqlite3.c\sif\s-DINCLUDE_SQLITE3_C\sis\spassed\sto\smkccode.tcl. +D 2024-11-19T19:47:51.323 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d @@ -696,7 +696,7 @@ F ext/wasm/tests/opfs/concurrency/test.js d08889a5bb6e61937d0b8cbb78c9efbefbf65a F ext/wasm/tests/opfs/concurrency/worker.js 0a8c1a3e6ebb38aabbee24f122693f1fb29d599948915c76906681bb7da1d3d2 F ext/wasm/wasmfs.make bc8bb227f35d5bd3863a7bd2233437c37472a0d81585979f058f9b9b503bef35 F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0 -F main.mk 7cb02ba61e74ccab3ad6775b9207b12c6a26bbe3b2dd280039bc0cd532a52ceb +F main.mk b1f78ccd8b6db3fbc6a7e9952fc3e60433ad8d25798eb0b55632b1eb502ab30a F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271 F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504 F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421 @@ -2135,7 +2135,7 @@ F tool/logest.c c34e5944318415de513d29a6098df247a9618c96d83c38d4abd88641fe46e669 F tool/max-limits.c cbb635fbb37ae4d05f240bfb5b5270bb63c54439 F tool/merge-test.tcl de76b62f2de2a92d4c1ca4f976bce0aea6899e0229e250479b229b2a1914b176 F tool/mkautoconfamal.sh cbdcf993fa83dccbef7fb77b39cdeb31ef9f77d9d88c9e343b58d35ca3898a6a -F tool/mkccode.tcl 0e7488b7218128271b93a4b16e60a169097b6cb555446ce4d6a131be039bb536 x +F tool/mkccode.tcl 210159febe0ef0ecbc53c79833500663ceaba0115b2b374405818dc835b5f84b x F tool/mkctimec.tcl ef6a67ec82e5b6fc19152a4c79f237227b18bf67ff16d155bac7adb94355d9cf x F tool/mkkeywordhash.c 6b0be901c47f9ad42215fc995eb2f4384ac49213b1fba395102ec3e999acf559 F tool/mkmsvcmin.tcl d76c45efda1cce2d4005bcea7b8a22bb752e3256009f331120fb4fecb14ebb7a @@ -2178,7 +2178,7 @@ F tool/speedtest8inst1.c 7ce07da76b5e745783e703a834417d725b7d45fd F tool/spellsift.tcl 52b4b04dc4333c7ab024f09d9d66ed6b6f7c6eb00b38497a09f338fa55d40618 x F tool/split-sqlite3c.tcl 5aa60643afca558bc732b1444ae81a522326f91e1dc5665b369c54f09e20de60 F tool/sqldiff.c 2a0987d183027c795ced13d6749061c1d2f38e24eddb428f56fa64c3a8f51e4b -F tool/sqlite3_analyzer.c.in 39690af454d2866e87e2b475ec5eabee366f211f2307e90b918345f35bb1a643 +F tool/sqlite3_analyzer.c.in fc7735c499d226a49d843d8209b2543e4e5229eeb71a674c331323a2217b65b4 F tool/sqlite3_rsync.c 9a1cca2ab1271c59b37a6493c15dc1bcd0ab9149197a9125926bc08dd26b83fb F tool/sqltclsh.c.in 1bcc2e9da58fadf17b0bf6a50e68c1159e602ce057210b655d50bad5aaaef898 F tool/sqltclsh.tcl 862f4cf1418df5e1315b5db3b5ebe88969e2a784525af5fbf9596592f14ed848 @@ -2198,8 +2198,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 7b14309be42be4204c4d30e9741d56d75ab8ec34686791d032612337fe1c4dcf 7fec209290aa1a6dbbca8de154edaac5d8d0ce042bc0617d27fb2095c8d580f1 -R 0da2647f2e208e5fa5304d40f71239b4 +P 7fb3ebfec634e0508267049fddb2b513201dbefce4d378ca3ec261c5d8336d7f +R 631735400a3a45c7eca237a47c49e579 U stephan -Z bed720f65fe4f336de4e69b585a4a039 +Z b91791961d3936264eb9b5de6178a0fb # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index d9f567ad70..22db0ea473 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -7fb3ebfec634e0508267049fddb2b513201dbefce4d378ca3ec261c5d8336d7f +80f3bf8c2ee31ba1ab9187d64d5dcbbf97a61845a21b036f89ea9133153575c0 diff --git a/tool/mkccode.tcl b/tool/mkccode.tcl index b95f0c679d..ecafbdadb9 100755 --- a/tool/mkccode.tcl +++ b/tool/mkccode.tcl @@ -125,12 +125,12 @@ while {1} { puts "/* END_STRING */" continue } - if {[regexp {^IFNDEF +([A-Za-z_]+)} $line all name]} { + if {[regexp {^IFNDEF +([A-Za-z_0-9]+)} $line all name]} { set omit $omit[info exists DEF($name)] incr nomit continue } - if {[regexp {^IFDEF +([A-Za-z_]+)} $line all name]} { + if {[regexp {^IFDEF +([A-Za-z_0-9]+)} $line all name]} { set omit $omit[expr {![info exists DEF($name)]}] incr nomit continue diff --git a/tool/sqlite3_analyzer.c.in b/tool/sqlite3_analyzer.c.in index a934f05700..9c11752b81 100644 --- a/tool/sqlite3_analyzer.c.in +++ b/tool/sqlite3_analyzer.c.in @@ -3,7 +3,8 @@ ** text on standard output. */ #define TCLSH_INIT_PROC sqlite3_analyzer_init_proc -IFNDEF SQLITE_ENABLE_DBSTAT_VTAB +IFDEF INCLUDE_SQLITE3_C +#undef SQLITE_ENABLE_DBSTAT_VTAB #define SQLITE_ENABLE_DBSTAT_VTAB 1 #undef SQLITE_THREADSAFE #define SQLITE_THREADSAFE 0 From b81e11b25ba63403b26f5ed54d221861af730d8c Mon Sep 17 00:00:00 2001 From: stephan Date: Tue, 19 Nov 2024 20:14:31 +0000 Subject: [PATCH 5/9] Move the in-comment-code commentary about --with-debug, from [7b14309be4], into the --help text for that flag, where it's readily visible. FossilOrigin-Name: c938e5d783b3f015b2a1b9f3711664b13497c4b71e4a890c65d6665539522ff8 --- auto.def | 11 +++++------ manifest | 12 ++++++------ manifest.uuid | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/auto.def b/auto.def index eee8c5aeff..d5f1b694f9 100644 --- a/auto.def +++ b/auto.def @@ -192,12 +192,11 @@ set flags { with-emsdk:=auto => {Top-most dir of the Emscripten SDK installation. Default = EMSDK env var.} # # - - # --with-debug does more than simply builds with a -g compilation - # flag and will impact performance by as much as 4x, as it includes - # large numbers of assert()s in performance-critical loops. Never - # use --with-debug for production builds. - with-debug:=1 => {Enable debug build flags} + with-debug:=1 => {Enable debug build flags. --with-debug does more + than simply builds with a -g compilation flag and will impact + performance by as much as 4x, as it includes large numbers of + assert()s in performance-critical loops. Never use --with-debug + for production builds.} dev => {Enable dev-mode build: automatically enables certain other flags} test-status => {Enable status of tests} gcov=0 => {Enable coverage testing using gcov} diff --git a/manifest b/manifest index 8c13ab27c3..4cb68a5e80 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Get\ssqlite3_analyzer\soptionally\slinking\sagainst\slibsqlite3.so\sinstead\sof\sembedding\ssqlite3.c.\sPatch\smkccode.tcl\sto\saccept\sdigits\sin\sits\sIFDEF/IFNDEF\schecks\sand\ssqlite3_analyzer.c.in\sto\sonly\sinclude\ssqlite3.c\sif\s-DINCLUDE_SQLITE3_C\sis\spassed\sto\smkccode.tcl. -D 2024-11-19T19:47:51.323 +C Move\sthe\sin-comment-code\scommentary\sabout\s--with-debug,\sfrom\s[7b14309be4],\sinto\sthe\s--help\stext\sfor\sthat\sflag,\swhere\sit's\sreadily\svisible. +D 2024-11-19T20:14:31.784 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d @@ -13,7 +13,7 @@ F art/icon-80x90.gif 65509ce3e5f86a9cd64fe7fca2d23954199f31fe44c1e09e208c80fb83d F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2 F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90 F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2 -F auto.def 4f5ae3ed11bb110b1eda2a6b7ee46489b7371bc8f7c19f0ed944613c170e4951 +F auto.def 87c3d42428225c89dba75d399ea83c756f4a21b5c6ed591436d6c930c8d6c73a F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903 F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347 F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac @@ -2198,8 +2198,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 7fb3ebfec634e0508267049fddb2b513201dbefce4d378ca3ec261c5d8336d7f -R 631735400a3a45c7eca237a47c49e579 +P 80f3bf8c2ee31ba1ab9187d64d5dcbbf97a61845a21b036f89ea9133153575c0 +R 07c8458360fbc34333a873b33b8ca43f U stephan -Z b91791961d3936264eb9b5de6178a0fb +Z 3761f0fd6432507d765cfeef5912a493 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 22db0ea473..53fbd282cc 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -80f3bf8c2ee31ba1ab9187d64d5dcbbf97a61845a21b036f89ea9133153575c0 +c938e5d783b3f015b2a1b9f3711664b13497c4b71e4a890c65d6665539522ff8 From 457d9384a22d943abb9239a4043466feb2f88005 Mon Sep 17 00:00:00 2001 From: stephan Date: Tue, 19 Nov 2024 20:21:40 +0000 Subject: [PATCH 6/9] Rename --link-tools-dynamically to --dynlink-tools, per discussion. FossilOrigin-Name: 50b9f6fde44f9afda27e47badde6115ab6d9ccd5e22b446a8d8127499848815f --- auto.def | 6 +++--- main.mk | 5 ++++- manifest | 14 +++++++------- manifest.uuid | 2 +- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/auto.def b/auto.def index d5f1b694f9..e6c6dfc00a 100644 --- a/auto.def +++ b/auto.def @@ -202,7 +202,7 @@ set flags { gcov=0 => {Enable coverage testing using gcov} linemacros => {Enable #line macros in the amalgamation} dump-defines=0 => {Dump autosetup defines to $DUMP_DEFINES_TXT (for build debugging)} - link-tools-dynamically => {Dynamically link libsqlite3 to certain tools which normally statically embed it.} + dynlink-tools => {Dynamically link libsqlite3 to certain tools which normally statically embed it.} soname:=legacy => {SONAME for libsqlite3.so. Must be one of: none, auto, legacy} # --soname has a long story behind it, as well as no small amount of uncertainty. # @@ -333,7 +333,7 @@ proj-if-opt-truthy dev { define CFLAGS [get-env CFLAGS {-O0 -g}] } -define LINK_TOOLS_DYNAMICALLY [proj-opt-was-provided link-tools-dynamically] +define LINK_TOOLS_DYNAMICALLY [proj-opt-was-provided dynlink-tools] ######################################################################## # Handle --with-wasi-sdk=DIR @@ -476,7 +476,7 @@ apply {{} { if {[proj-opt-was-provided soname]} { set soname [opt-val soname] } else { - set soname none; # enabling soname breaks linking for the --link-tools-dynamically feature + set soname none; # enabling soname breaks linking for the --dynlink-tools feature } switch -exact -- $soname { none { return 0 } diff --git a/main.mk b/main.mk index 878be92ae6..f1c36b3575 100644 --- a/main.mk +++ b/main.mk @@ -209,7 +209,10 @@ USE_AMALGAMATION ?= 1 # # If true, certain binaries which typically statically link against # libsqlite3 or its component object files will instead link against -# the DLL. +# the DLL. The caveat is that running such builds from the source tree +# may require that the user specifically prepend "." to their +# $LD_LIBRARY_PATH so that the dynamic linker does not pick up a +# libsqlite3.so from outside the source tree. # LINK_TOOLS_DYNAMICALLY ?= 0 # diff --git a/manifest b/manifest index 4cb68a5e80..52a4d101ec 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Move\sthe\sin-comment-code\scommentary\sabout\s--with-debug,\sfrom\s[7b14309be4],\sinto\sthe\s--help\stext\sfor\sthat\sflag,\swhere\sit's\sreadily\svisible. -D 2024-11-19T20:14:31.784 +C Rename\s--link-tools-dynamically\sto\s--dynlink-tools,\sper\sdiscussion. +D 2024-11-19T20:21:40.498 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d @@ -13,7 +13,7 @@ F art/icon-80x90.gif 65509ce3e5f86a9cd64fe7fca2d23954199f31fe44c1e09e208c80fb83d F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2 F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90 F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2 -F auto.def 87c3d42428225c89dba75d399ea83c756f4a21b5c6ed591436d6c930c8d6c73a +F auto.def b81388775c7596c22d19ce7c5e0692d8cb6beb89ae591e2684a238084acabf61 F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903 F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347 F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac @@ -696,7 +696,7 @@ F ext/wasm/tests/opfs/concurrency/test.js d08889a5bb6e61937d0b8cbb78c9efbefbf65a F ext/wasm/tests/opfs/concurrency/worker.js 0a8c1a3e6ebb38aabbee24f122693f1fb29d599948915c76906681bb7da1d3d2 F ext/wasm/wasmfs.make bc8bb227f35d5bd3863a7bd2233437c37472a0d81585979f058f9b9b503bef35 F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0 -F main.mk b1f78ccd8b6db3fbc6a7e9952fc3e60433ad8d25798eb0b55632b1eb502ab30a +F main.mk de4824958a997377f0b661329699eb0b58e81c3076d68bf45898305d074fd3ee F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271 F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504 F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421 @@ -2198,8 +2198,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 80f3bf8c2ee31ba1ab9187d64d5dcbbf97a61845a21b036f89ea9133153575c0 -R 07c8458360fbc34333a873b33b8ca43f +P c938e5d783b3f015b2a1b9f3711664b13497c4b71e4a890c65d6665539522ff8 +R 2438fd2896d39f35fc299b3fd744f13f U stephan -Z 3761f0fd6432507d765cfeef5912a493 +Z e384122113bfcbb2fa4bae830787db35 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 53fbd282cc..ae727ec259 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -c938e5d783b3f015b2a1b9f3711664b13497c4b71e4a890c65d6665539522ff8 +50b9f6fde44f9afda27e47badde6115ab6d9ccd5e22b446a8d8127499848815f From 18c9e2638eed17bb3ed35581d0054c7404e56f33 Mon Sep 17 00:00:00 2001 From: drh <> Date: Tue, 19 Nov 2024 21:14:48 +0000 Subject: [PATCH 7/9] Add missing $TCL_LIBS to the link for sqlite3_analyzer. FossilOrigin-Name: bfab759611b0562837d8733ce56591854db08c122956524799dc1d5b3e2d0279 --- main.mk | 2 +- manifest | 14 +++++++------- manifest.uuid | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/main.mk b/main.mk index f1c36b3575..144c1e2b58 100644 --- a/main.mk +++ b/main.mk @@ -1767,7 +1767,7 @@ sqlite3_analyzer$(T.exe): $(T.tcl.env.sh) sqlite3_analyzer.c \ $(sqlite3_analyzer.deps.$(LINK_TOOLS_DYNAMICALLY)) $(T.link.tcl) sqlite3_analyzer.c -o $@ \ $(sqlite3_analyzer.flags.$(LINK_TOOLS_DYNAMICALLY)) \ - $$TCL_LIB_SPEC $$TCL_INCLUDE_SPEC + $$TCL_LIB_SPEC $$TCL_INCLUDE_SPEC $$TCL_LIBS # ^^^^ the order of those flags is relevant for # $(sqlite3_analyzer.flags.1): if the $$TCL_... flags come first they # can cause the $@ to link to an out-of-tree libsqlite3.so, which may diff --git a/manifest b/manifest index 52a4d101ec..fa0500c459 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Rename\s--link-tools-dynamically\sto\s--dynlink-tools,\sper\sdiscussion. -D 2024-11-19T20:21:40.498 +C Add\smissing\s$TCL_LIBS\sto\sthe\slink\sfor\ssqlite3_analyzer. +D 2024-11-19T21:14:48.228 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d @@ -696,7 +696,7 @@ F ext/wasm/tests/opfs/concurrency/test.js d08889a5bb6e61937d0b8cbb78c9efbefbf65a F ext/wasm/tests/opfs/concurrency/worker.js 0a8c1a3e6ebb38aabbee24f122693f1fb29d599948915c76906681bb7da1d3d2 F ext/wasm/wasmfs.make bc8bb227f35d5bd3863a7bd2233437c37472a0d81585979f058f9b9b503bef35 F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0 -F main.mk de4824958a997377f0b661329699eb0b58e81c3076d68bf45898305d074fd3ee +F main.mk 4e437d2c9cd67db9c1a0715b70e3c9f6b20f54cd97bd21b1b1a40a6181dfe874 F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271 F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504 F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421 @@ -2198,8 +2198,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 c938e5d783b3f015b2a1b9f3711664b13497c4b71e4a890c65d6665539522ff8 -R 2438fd2896d39f35fc299b3fd744f13f -U stephan -Z e384122113bfcbb2fa4bae830787db35 +P 50b9f6fde44f9afda27e47badde6115ab6d9ccd5e22b446a8d8127499848815f +R 550a68b5ea9d3db22b4d7e049a260626 +U drh +Z 02a349b181e8372ee68443f7fc5c2aa7 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index ae727ec259..a1aef6a738 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -50b9f6fde44f9afda27e47badde6115ab6d9ccd5e22b446a8d8127499848815f +bfab759611b0562837d8733ce56591854db08c122956524799dc1d5b3e2d0279 From a34fbd1b9b1817a9fc26b6231c1d5f8b9cb5601b Mon Sep 17 00:00:00 2001 From: stephan Date: Tue, 19 Nov 2024 21:19:12 +0000 Subject: [PATCH 8/9] Add fix from [bfab759611b0] to sqltclsh. Remove some now-unneeded has_tclsh84/5 checks in cases where jimsh can be used. FossilOrigin-Name: 9d389b998317c5006876f2f40d56cd763d1555bbeaf48b2bca9bd46dcd02b80e --- main.mk | 30 +++++++++++++++--------------- manifest | 14 +++++++------- manifest.uuid | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/main.mk b/main.mk index 144c1e2b58..e2458c5481 100644 --- a/main.mk +++ b/main.mk @@ -1031,7 +1031,7 @@ T.link.tcl = $(T.tcl.env.source); $(T.link) # all that automatic generation. # .target_source: $(MAKE_SANITY_CHECK) $(SRC) $(TOP)/tool/vdbe-compress.tcl \ - fts5.c $(B.tclsh) # has_tclsh84 + fts5.c $(B.tclsh) rm -rf tsrc mkdir tsrc cp -f $(SRC) tsrc @@ -1057,19 +1057,19 @@ mksourceid$(B.exe): $(MAKE_SANITY_CHECK) $(TOP)/tool/mksourceid.c sqlite3.h: $(MAKE_SANITY_CHECK) $(TOP)/src/sqlite.h.in \ $(TOP)/manifest mksourceid$(B.exe) \ - $(TOP)/VERSION $(B.tclsh) # has_tclsh84 + $(TOP)/VERSION $(B.tclsh) $(B.tclsh) $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h sqlite3.c: .target_source sqlite3.h $(TOP)/tool/mksqlite3c.tcl src-verify$(B.exe) \ - $(B.tclsh) # has_tclsh84 + $(B.tclsh) $(B.tclsh) $(TOP)/tool/mksqlite3c.tcl $(AMALGAMATION_GEN_FLAGS) $(EXTRA_SRC) cp tsrc/sqlite3ext.h . cp $(TOP)/ext/session/sqlite3session.h . -sqlite3r.h: sqlite3.h $(B.tclsh) # has_tclsh84 +sqlite3r.h: sqlite3.h $(B.tclsh) $(B.tclsh) $(TOP)/tool/mksqlite3h.tcl $(TOP) --enable-recover >sqlite3r.h -sqlite3r.c: sqlite3.c sqlite3r.h $(B.tclsh) # has_tclsh84 +sqlite3r.c: sqlite3.c sqlite3r.h $(B.tclsh) cp $(TOP)/ext/recover/sqlite3recover.c tsrc/ cp $(TOP)/ext/recover/sqlite3recover.h tsrc/ cp $(TOP)/ext/recover/dbdata.c tsrc/ @@ -1356,11 +1356,11 @@ tcl: tclsqlite3$(T.exe)-$(HAVE_TCL) # Rules to build opcodes.c and opcodes.h # -opcodes.c: opcodes.h $(TOP)/tool/mkopcodec.tcl $(B.tclsh) # has_tclsh84 +opcodes.c: opcodes.h $(TOP)/tool/mkopcodec.tcl $(B.tclsh) $(B.tclsh) $(TOP)/tool/mkopcodec.tcl opcodes.h >opcodes.c opcodes.h: parse.h $(TOP)/src/vdbe.c \ - $(TOP)/tool/mkopcodeh.tcl $(B.tclsh) # has_tclsh84 + $(TOP)/tool/mkopcodeh.tcl $(B.tclsh) cat parse.h $(TOP)/src/vdbe.c | $(B.tclsh) $(TOP)/tool/mkopcodeh.tcl >opcodes.h # Rules to build parse.c and parse.h - the outputs of lemon. @@ -1371,7 +1371,7 @@ parse.c: $(TOP)/src/parse.y lemon$(B.exe) cp $(TOP)/src/parse.y . ./lemon$(B.exe) $(OPT_FEATURE_FLAGS) $(OPTS) -S parse.y -sqlite3rc.h: $(TOP)/src/sqlite3.rc $(TOP)/VERSION $(B.tclsh) # has_tclsh84 +sqlite3rc.h: $(TOP)/src/sqlite3.rc $(TOP)/VERSION $(B.tclsh) echo '#ifndef SQLITE_RESOURCE_VERSION' >$@ echo -n '#define SQLITE_RESOURCE_VERSION ' >>$@ cat $(TOP)/VERSION | $(B.tclsh) $(TOP)/tool/replace.tcl exact . , >>$@ @@ -1385,7 +1385,7 @@ keywordhash.h: mkkeywordhash$(B.exe) # # sqlite3.c split into many smaller files. # -sqlite3-all.c: sqlite3.c $(TOP)/tool/split-sqlite3c.tcl $(B.tclsh) # has_tclsh84 +sqlite3-all.c: sqlite3.c $(TOP)/tool/split-sqlite3c.tcl $(B.tclsh) $(B.tclsh) $(TOP)/tool/split-sqlite3c.tcl # @@ -1591,7 +1591,7 @@ fts5parse.c: $(TOP)/ext/fts5/fts5parse.y lemon$(B.exe) fts5parse.h: fts5parse.c -fts5.c: $(FTS5_SRC) $(B.tclsh) # has_tclsh84 +fts5.c: $(FTS5_SRC) $(B.tclsh) $(B.tclsh) $(TOP)/ext/fts5/tool/mkfts5c.tcl cp $(TOP)/ext/fts5/fts5.h . @@ -1759,7 +1759,7 @@ sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl \ # # sqlite3_analyzer's build mode depends on $(LINK_TOOLS_DYNAMICALLY). # -sqlite3_analyzer.flags.1 = -L. -lsqlite3 $(LDFLAGS.math) +sqlite3_analyzer.flags.1 = -L. -lsqlite3 sqlite3_analyzer.flags.0 = $(LDFLAGS.libsqlite3) sqlite3_analyzer.deps.1 = $(libsqlite3.SO) sqlite3_analyzer.deps.0 = @@ -1775,12 +1775,12 @@ sqlite3_analyzer$(T.exe): $(T.tcl.env.sh) sqlite3_analyzer.c \ sqltclsh.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl \ $(TOP)/ext/misc/appendvfs.c $(TOP)/tool/mkccode.tcl \ - $(TOP)/tool/sqltclsh.c.in has_tclsh85 + $(TOP)/tool/sqltclsh.c.in $(B.tclsh) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c sqltclsh$(T.exe): $(T.tcl.env.sh) sqltclsh.c $(T.link.tcl) sqltclsh.c -o $@ $$TCL_INCLUDE_SPEC $(CFLAGS.libsqlite3) \ - $$TCL_LIB_SPEC $(LDFLAGS.libsqlite3) + $(LDFLAGS.libsqlite3) $$TCL_LIB_SPEC $$TCL_LIBS # xbin: target for generic binaries which aren't usually built. It is # used primarily for testing the build process. xbin: sqltclsh$(T.exe) sqlite3_analyzer$(T.exe) @@ -1801,7 +1801,7 @@ CHECKER_DEPS =\ $(TOP)/ext/misc/btreeinfo.c \ $(TOP)/ext/repair/sqlite3_checker.c.in -sqlite3_checker.c: $(CHECKER_DEPS) has_tclsh85 +sqlite3_checker.c: $(CHECKER_DEPS) $(B.tclsh) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@ sqlite3_checker$(T.exe): $(T.tcl.env.sh) sqlite3_checker.c @@ -2177,7 +2177,7 @@ SHELL_DEP = \ $(TOP)/src/test_windirent.c \ $(TOP)/src/test_windirent.h -shell.c: $(SHELL_DEP) $(TOP)/tool/mkshellc.tcl $(B.tclsh) # has_tclsh84 +shell.c: $(SHELL_DEP) $(TOP)/tool/mkshellc.tcl $(B.tclsh) $(B.tclsh) $(TOP)/tool/mkshellc.tcl >shell.c # diff --git a/manifest b/manifest index fa0500c459..3c0334288c 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\smissing\s$TCL_LIBS\sto\sthe\slink\sfor\ssqlite3_analyzer. -D 2024-11-19T21:14:48.228 +C Add\sfix\sfrom\s[bfab759611b0]\sto\ssqltclsh.\sRemove\ssome\snow-unneeded\shas_tclsh84/5\schecks\sin\scases\swhere\sjimsh\scan\sbe\sused. +D 2024-11-19T21:19:12.706 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d @@ -696,7 +696,7 @@ F ext/wasm/tests/opfs/concurrency/test.js d08889a5bb6e61937d0b8cbb78c9efbefbf65a F ext/wasm/tests/opfs/concurrency/worker.js 0a8c1a3e6ebb38aabbee24f122693f1fb29d599948915c76906681bb7da1d3d2 F ext/wasm/wasmfs.make bc8bb227f35d5bd3863a7bd2233437c37472a0d81585979f058f9b9b503bef35 F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0 -F main.mk 4e437d2c9cd67db9c1a0715b70e3c9f6b20f54cd97bd21b1b1a40a6181dfe874 +F main.mk 87ce967497ff2fc81406fc91c290b1faf3dfa8bb7724e3980be297381369b4f8 F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271 F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504 F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421 @@ -2198,8 +2198,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 50b9f6fde44f9afda27e47badde6115ab6d9ccd5e22b446a8d8127499848815f -R 550a68b5ea9d3db22b4d7e049a260626 -U drh -Z 02a349b181e8372ee68443f7fc5c2aa7 +P bfab759611b0562837d8733ce56591854db08c122956524799dc1d5b3e2d0279 +R 0f52e38972daef31ec132c6a8f286547 +U stephan +Z 58d6b35becabf99bb64f154abaacc201 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index a1aef6a738..b0f59a8497 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -bfab759611b0562837d8733ce56591854db08c122956524799dc1d5b3e2d0279 +9d389b998317c5006876f2f40d56cd763d1555bbeaf48b2bca9bd46dcd02b80e From 914e32f24a4304c3d37766624f39912af10e898e Mon Sep 17 00:00:00 2001 From: drh <> Date: Wed, 20 Nov 2024 16:17:01 +0000 Subject: [PATCH 9/9] Use shared-library flags, not shared-object flags, to create shared libraries. This makes no difference on Linux, but is required for Mac. FossilOrigin-Name: bfaa3ee7588b6f6be9799882c6ed6472357d988fac31512d5e92fe28f57029c6 --- Makefile.in | 2 +- main.mk | 6 +++--- manifest | 16 ++++++++-------- manifest.uuid | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Makefile.in b/Makefile.in index 219347c301..3d2e736fd1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -143,7 +143,7 @@ LDFLAGS.configure = @LDFLAGS@ # CFLAGS.core is documented in main.mk. # CFLAGS.core = @SH_CFLAGS@ -LDFLAGS.shobj = @SHOBJ_LDFLAGS@ +LDFLAGS.shlib = @SH_LDFLAGS@ LDFLAGS.zlib = @LDFLAGS_ZLIB@ LDFLAGS.math = @LDFLAGS_MATH@ LDFLAGS.rpath = @LDFLAGS_RPATH@ diff --git a/main.mk b/main.mk index e2458c5481..b1f1635980 100644 --- a/main.mk +++ b/main.mk @@ -159,7 +159,7 @@ LDFLAGS.math ?= -lm LDFLAGS.rpath ?= -Wl,-rpath -Wl,$(prefix)/lib LDFLAGS.pthread ?= -lpthread LDFLAGS.dlopen ?= -ldl -LDFLAGS.shobj ?= -shared +LDFLAGS.shlib ?= -shared LDFLAGS.icu ?= # -licui18n -licuuc -licudata CFLAGS.icu ?= LDFLAGS.soname.libsqlite3 ?= @@ -385,7 +385,7 @@ T.link = $(T.cc.sqlite) $(T.link.extras) # # $(T.link.shared) = $(T.link) invocation specifically for shared libraries # -T.link.shared = $(T.link) $(LDFLAGS.shobj) +T.link.shared = $(T.link) $(LDFLAGS.shlib) # # $(LDFLAGS.libsqlite3) should be used with any deliverable for which @@ -2245,7 +2245,7 @@ sqlite3.def: $(LIBOBJ) | sed 's/^.* _//' >>sqlite3.def sqlite3.dll: $(LIBOBJ) sqlite3.def - $(T.cc.sqlite) $(LDFLAGS.shobj) -o $@ sqlite3.def \ + $(T.cc.sqlite) $(LDFLAGS.shlib) -o $@ sqlite3.def \ -Wl,"--strip-all" $(LIBOBJ) $(LDFLAGS.configure) # diff --git a/manifest b/manifest index 3c0334288c..f1118f4bfd 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Add\sfix\sfrom\s[bfab759611b0]\sto\ssqltclsh.\sRemove\ssome\snow-unneeded\shas_tclsh84/5\schecks\sin\scases\swhere\sjimsh\scan\sbe\sused. -D 2024-11-19T21:19:12.706 +C Use\sshared-library\sflags,\snot\sshared-object\sflags,\sto\screate\sshared\slibraries.\nThis\smakes\sno\sdifference\son\sLinux,\sbut\sis\srequired\sfor\sMac. +D 2024-11-20T16:17:01.857 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d -F Makefile.in 5461b1125a3039fef49f4896519d164ebe22ee394d20d69913ab0fdc8c464b63 +F Makefile.in b22a52dc08b8a727c298af4f93171b2862df1d6fce4c255b15f6ce1011a9ee7d F Makefile.linux-generic bd3e3cacd369821a6241d4ea1967395c962dfe3057e38cb0a435cee0e8b789d0 F Makefile.msc a92237976eb92c5efaa0dd2524746aec12c196e12df8d4dbff9543a4648c3312 F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159 @@ -696,7 +696,7 @@ F ext/wasm/tests/opfs/concurrency/test.js d08889a5bb6e61937d0b8cbb78c9efbefbf65a F ext/wasm/tests/opfs/concurrency/worker.js 0a8c1a3e6ebb38aabbee24f122693f1fb29d599948915c76906681bb7da1d3d2 F ext/wasm/wasmfs.make bc8bb227f35d5bd3863a7bd2233437c37472a0d81585979f058f9b9b503bef35 F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0 -F main.mk 87ce967497ff2fc81406fc91c290b1faf3dfa8bb7724e3980be297381369b4f8 +F main.mk e3873a2363bef0fb8e3a65a21e548ce1aa9aeeb3795362c3e78346e655d501a4 F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271 F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504 F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421 @@ -2198,8 +2198,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 bfab759611b0562837d8733ce56591854db08c122956524799dc1d5b3e2d0279 -R 0f52e38972daef31ec132c6a8f286547 -U stephan -Z 58d6b35becabf99bb64f154abaacc201 +P 9d389b998317c5006876f2f40d56cd763d1555bbeaf48b2bca9bd46dcd02b80e +R 8bdca5a71a238d4249a2b123157a4e29 +U drh +Z 1e9ca84e1d99022a8171dd65daab42e8 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index b0f59a8497..a58ebcec98 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -9d389b998317c5006876f2f40d56cd763d1555bbeaf48b2bca9bd46dcd02b80e +bfaa3ee7588b6f6be9799882c6ed6472357d988fac31512d5e92fe28f57029c6