Commit Graph

29088 Commits

Author SHA1 Message Date
drh
c6a6f1507c Fix harmless compiler warnings.
FossilOrigin-Name: bc93e17924f732468282c5e7a483811d27af573a47aec8ba806f4fe3c5919893
2024-11-04 19:18:19 +00:00
drh
bc60d7bee9 Ensure that the database encoding is detected before the code generator gets
too far down into byte-code generation and execution, but not so early that
it interferes with initialization.
[forum:/forumpost/bc75a4d20b756044|Forum thread bc75a4d20b756044].

FossilOrigin-Name: af7173a10ec6a4ab465207c1ee20393e8b5f06604c0f3b2fdc19e52c2fc013d5
2024-11-04 19:08:53 +00:00
dan
4bf24c8830 Avoid loading the entire record into memory for an sqlite3_preupdate_old() call that retrieves an IPK value.
FossilOrigin-Name: 7f4de43733200beeb3ff0a70d51bbc68f5331895698ea95a82741cfd7bb66834
2024-11-04 16:59:02 +00:00
stephan
88ef6be57d Fix two mismatched uses of malloc() and sqlite3_free() in sqlite3_stdio.c, as reported in [forum:7dd7c70038 | forum post 7dd7c70038].
FossilOrigin-Name: af0a345b3b287f82b54249cfa574ef3ce52305a6452058aac98cd473c361919e
2024-11-04 13:57:20 +00:00
stephan
2fd38836dc Fix typo of --libexec ==> --libexecdir, discovered via audit of a downstream build script. Unrelated doc touchups.
FossilOrigin-Name: a60e5d76d06ae0568fbc6e068a7012c77778607cd60da92a1b84ff8f33049a93
2024-11-04 12:11:20 +00:00
stephan
21d90a1607 Ensure that the ext/wasm fiddle build undefines certain shell feature flags which it cannot use but might be inherited from the top-level makefile.
FossilOrigin-Name: 99bb5d9b68edc3c5439f0776bce74532dd0131894c31dc8227d084e926c4638c
2024-11-04 10:16:15 +00:00
stephan
f3d279595e When installing the shared lib, re-activate the accommodation of legacy-style .so links (removed in [80584e165e4]) based on two reports that not having those will cause all clients linked against the legacy naming convention to fail to dynamically link (which would preclude an update of a system-level libsqlite3 package). Set up the infrastructure needed for adding an SONAME to the library but do not yet activate it. See discussion in/around [forum:046133a7da|forum post 046133a7da].
FossilOrigin-Name: 1586eaceb1716fbeafc4af691d0f80206cd5390388b099d4939e6be5d3eb975b
2024-11-04 08:29:02 +00:00
stephan
7860052209 Minor internal doc additions.
FossilOrigin-Name: 9edc8582c97f40f546699e6d1fb075773d5476df81b6c3f8900d1f2716549295
2024-11-04 06:38:44 +00:00
stephan
266685c7e7 Latest upstream autosetup to get handling of (==ignoring) autotools' x-includes and x-libraries flags and stop leakage of some autosetup-init-level vars into auto.def's global scope.
FossilOrigin-Name: 307349bf91df2935efeaeb5617f43c2223aa7523e55034fb532cc4386a29d74c
2024-11-04 05:27:21 +00:00
stephan
05e279fa46 Latest upstream jimsh0.c, which accounts for the problem patched locally by [29b944959568].
FossilOrigin-Name: c7a5b7d2dbfd5c44980f7e9d7efc1e8c7882f192b14f534537745d0a0125909f
2024-11-04 04:12:02 +00:00
stephan
eb83747441 Minor doc correction and proj.tcl-internal API renaming.
FossilOrigin-Name: c8b24c590ef318e687ab76cd1a5d6c8fed84389e3ebbe544aa8b15759324958a
2024-11-04 03:43:07 +00:00
stephan
88349483ef Move the .default-CFLAGS handling into a utility function, rename the corresponding file to .env-VAR, and apply that lookup to a couple more places.
FossilOrigin-Name: f01b61f21d105706e78eb1e3e7971e9ccb7a68250f8cda96ce285f0fd6b2f7f2
2024-11-03 21:32:24 +00:00
stephan
a9b00b0fb7 Fix a CFLAGS.jimsh typo in Makefile.in. Change default jimsh flags to include -O1, which slows down its build but speeds up its runtime considerably.
FossilOrigin-Name: a912c169152623f261fb5469a49f00aca1d8a273d8f7187744de12a26aede7cf
2024-11-03 20:15:38 +00:00
stephan
97c709b5be If any autotools-conventional dir names are explicitly overridden via ./configure --dirname=X then export those names as-is to the makefile, otherwise derive them from $prefix. This is, at least in part, a compromise to provide package maintainers a way to specify a libdir which will be incorporated into the -rpath link flag (which we can only determine at configure-time).
FossilOrigin-Name: 832abe8a8a347718e47f73a1f9be1fb084a1c28cac6b1c70f6c9a9cabeb0fb53
2024-11-03 19:42:41 +00:00
stephan
c6cdee8303 Workaround for a compiler-specific jimsh compilation error reported in [forum:18e420d0b1404d63|forum post 18e420d0]. Reported upstream as [https://github.com/msteveb/jimtcl/issues/322|ticket #322].
FossilOrigin-Name: 29b94495956802d0eedcd669e45308c56278e43aab62bd7c3bb7153b47c9d4c0
2024-11-03 18:30:45 +00:00
stephan
18d21497b2 Minor doc updates. Remove two outdated todos.
FossilOrigin-Name: ad19237845b7791dd90fa4b3586f39f6ab700462e826baf53d4cde7f7fa06449
2024-11-03 07:45:56 +00:00
stephan
e595a83856 Fix another T.exe typo and remove an outdated TODO.
FossilOrigin-Name: 02208e6bfa7b791b958d45ad25eaac3a16d3e9f6ab203b9fc760c67785525395
2024-11-03 05:33:45 +00:00
stephan
13f03afd17 Fix T.exe typos in main.mk which break installation on platforms where that value is not empty. Also some unrelated doc tweaks.
FossilOrigin-Name: ab97ff44e66fd3639adbae4e0cc387fbcd09fbd5cd90ec3df7294c3e7b3a446e
2024-11-03 01:31:34 +00:00
stephan
f0e7f4c1f2 An experiment in hybridizing overriding of autotools-conventional XYZdir vars, the goal being to be able to provide both overrriding of them at configure-time and make-time with sensible semantics. Based on notes from [forum:00d12a41f7|forum post 00d12a41f7].
FossilOrigin-Name: cc259bf5f176bf89b6effedfc716d19d2437fc761c20870d1c69205d4bcee12b
2024-11-02 05:50:22 +00:00
stephan
dea749acc3 Add autotools-compatible overridable dir name vars for the various installation targets, calculated at make-time instead of exported at configure-time for reasons explained at length in the accompanying comments.
FossilOrigin-Name: 24aba7ee58f3048d70ff0c2b2cda26bc04bfb46b3055d25d62ab5ff97b106be2
2024-11-02 03:34:04 +00:00
stephan
afb8798580 When configuring with --with-wasi-sdk, ensure that we use that SDK's 'ar' tool instead of whatever is in the PATH. When pushing/popping the define var scope for the jimsh compatility check, include more defines per consultation with autosetup's creator.
FossilOrigin-Name: 2dcc465a7090811ddbc210673f37b4c3a4439c501874abefd403efe1e98f5b17
2024-11-01 01:56:27 +00:00
drh
bce0d04c98 In testrunner.tcl, only show the ETC on the status line if it will fit within
the 80-character line limit.

FossilOrigin-Name: 45a3213d23f4691732ba2eb54d440355ce5757aad4cec8eb92f53b4bd7e7f5cd
2024-10-31 18:29:55 +00:00
drh
03cfce20c9 Fix the clean-autosetup target in Makefile.in so that it does not fail even
in cases where gmake is unavailable.

FossilOrigin-Name: 207ca21bd7060a163da60b432f61ffaad8bedb6c0d59f090f9c5addb5b56d82d
2024-10-31 17:38:30 +00:00
drh
d27f6d7881 Extra defenses against UAF when failing to allocate a transient cursor. No
known path to a UAF currently exists.  This change just helps with the static
analysis to prove it.

FossilOrigin-Name: bae05811116dae0d05bcc001655416d0316ca1c16cbde2bd49f691c832261b89
2024-10-31 17:23:40 +00:00
drh
f5187de2fb When building a shared library on Mac, one must specify the original *.o
files that go into that library.  It does not work to specify a prior shared
library containing a subset of the files to be included.

FossilOrigin-Name: 5adc7d5dabbd9e2b18b3e13ab4e6463bfa8b5c1d604c94c8e67e6b812873ed30
2024-10-31 11:53:18 +00:00
drh
583770af28 Omit unnecessary bold text in ./configure output.
FossilOrigin-Name: d1368dc12b05e9828cb86a608771b666914c0e027ac4c42dea0042b0345d8b22
2024-10-31 11:21:35 +00:00
drh
3764f632b8 Improved differentiation between antirez and msteveb linenoise.
FossilOrigin-Name: cfb4bfcf1498b3740d210c24a71be343e8e0f262f3d9bddd45a673011307068c
2024-10-31 11:19:22 +00:00
stephan
6d3f22cdc1 Add a missing 'close' call to proj-file-content-list.
FossilOrigin-Name: 005702f334e7c51d83fc1b142ab90fa6867c4c2e75c8a3d2a17e07669b47fb23
2024-10-31 09:25:58 +00:00
stephan
98eb4ad6ee Add -trim flag to proj-file-content.
FossilOrigin-Name: babf66f5c7074c24ca8ae898cd850964e99cef41fd1395a0d6c582cab75ae3bf
2024-10-31 08:12:48 +00:00
stephan
ec04c41be6 Remove some proj-assert checks which are not valid on OpenBSD. Ensure that queued up notices about TCL warnings are displayed before leaving sqlite-check-tcl.
FossilOrigin-Name: 3447308f3f66046ffedd502161757211bef0384d7a735ff675c06c04fbc22655
2024-10-31 08:03:35 +00:00
stephan
7be78606ff When reading in .default-CFLAGS, trim it.
FossilOrigin-Name: a62a5171ace53b79feda93701f90d6d6f88eb5542bd35ac76f962745c58588b0
2024-10-31 07:30:53 +00:00
stephan
07cdceed8e Add the .POSIX special target to the main makefiles to hint to the make impl that it should behave POSIXly-correct. Fix the default file extension for static libs in main.mk.
FossilOrigin-Name: 2c615d3a3206536f12c0723b8997bda9ab61f95a468f77697856213b46c0135e
2024-10-31 07:20:22 +00:00
stephan
cf758d23cd Add more deps to T.tcl.env.sh so that it gets rebuilt if configure is run with a different --with-tcl value. Remove all references to the superfluous XYZdir makefile vars conventionally set by the autotools (they're just noise in this build).
FossilOrigin-Name: 831665101e9c62cf49c173cb11705033eb9135a6a6965718285d81113ee5ba4c
2024-10-31 07:01:31 +00:00
stephan
343fe033c0 If a file named .default-CFLAGS exists in the build dir, use its contents as the default value of the CFLAGS unless it's overridden by being passed in or in the environment.
FossilOrigin-Name: 731d333c224e70190dadd214de1970ea541a3d716d1d7ff2c0ef6c63b8be9b13
2024-10-31 06:52:09 +00:00
stephan
0e07bc36d9 When --with-wasi-sdk is active, temporarily swap CC and CC_FOR_BUILD for purposes of looking for APIs required by B.cc.
FossilOrigin-Name: 435f2ee818d7181551c6860b6bc4db97f82d76b58fd82765a6cf49e2d02ff18c
2024-10-31 06:38:30 +00:00
stephan
c6cfc8e3ea Change default CFLAGS to {-g -O2} to match the legacy build.
FossilOrigin-Name: 511774942903277b3d38f28336599667df20f94a8de79746b6c236b827b7ffc6
2024-10-31 05:47:56 +00:00
stephan
fe9baec645 Fix a corner case in automatic TCLLIBDIR detection: if the $auto_path list is not empty but none of them refer to an existing dir, the last dir in that list would have been accepted as the TCLLIBDIR. It will now error out instead.
FossilOrigin-Name: 1d2ecae1304d9f677bd50eaae6bd9cb25cb75c611d88a30839f5287a7a97d7d5
2024-10-31 01:51:00 +00:00
stephan
7a55fe3a95 Reimplement how the TCL-related environment vars are made available to make recipes which need them, reducing the console noise and consolidating it with the has_tclconfig flag file. It now uses a generated shell snippet which it sources, rather than inlining all of that shell code.
FossilOrigin-Name: 0cdfd142e11824d41ebb6c6e508933e04ac6f6dc0dc375cc5b0032f56eb7f423
2024-10-31 00:56:05 +00:00
stephan
07a1e3eb91 Minor cleanups to the linenoise flavor detection test.
FossilOrigin-Name: 3be32de1626f940e256076df76388e7633de57f340aac937f6a48d3585b96ca4
2024-10-30 23:10:38 +00:00
stephan
1e563f4817 Move the linenoise flavor check from auto.def to proj.tcl for re-use in downstream projects.
FossilOrigin-Name: 84e503dc1e3672fe7787fb747ed70ca14ad181a743925bd1658c40baaa8a27cd
2024-10-30 22:49:40 +00:00
stephan
2d73547cdb Expand [c0048e4482e9] to determine the linenoise API flavor via a compile test rather than guessing based on the filename.
FossilOrigin-Name: dbf0079190d98ec1760cc3b55aa0116c9f85f215586bd864c5d6cede5a034fa5
2024-10-30 22:41:12 +00:00
stephan
26eccee741 proj.tcl/main.mk doc updates. No functional changes.
FossilOrigin-Name: e06574c6b4b666ef26f0fa06e6d60e5d896caaf1b1ca27f5369f5b7650d12b9b
2024-10-30 22:09:49 +00:00
drh
4f0529e33e Adjust Makefile.in to honor the CC environment variable. Add the
"show-variables" target to main.mk, for debugging.

FossilOrigin-Name: e5f1a01f9f574a64e464c66c1b88f76aeea83f0bbe697c53bb63d3592d93e55e
2024-10-30 19:13:07 +00:00
drh
9bcb0a510f Fix the CLI so that it can use either the canonical Antirez linenoise
(with HAVE_LINENOISE=1) or Steve Bennett's enhanced linenoise that works
on the Win32 console as well as on Unix (with HAVE_LINENOISE=2).  The
./configure script detects which one to use and sets HAVE_LINENOISE accordingly.

FossilOrigin-Name: c0048e4482e9cb9662637899922af9609e7c8fb002a37b71e6181074df7a0dd1
2024-10-30 14:03:56 +00:00
stephan
7d7e82c9b1 Clean up and add docs to the TCL vetting steps. Make warning and error messages bold if stdout isatty.
FossilOrigin-Name: 47157dcf9ec6b52b37578bcd5dc5ace8c36e62c8ca2625c94252c15db784b115
2024-10-30 05:07:18 +00:00
stephan
55865c47a7 Remove accommodation of the legacy-named shared libraries from the installation rules, per discussion. Rename install-includes to install-headers. Quote installation target dir names "just in case".
FossilOrigin-Name: 80584e165e4652e76cc3188befcee814f168298486743940bcf46696043686a0
2024-10-30 04:07:16 +00:00
stephan
fe5f721de6 Generic makefile cleanups.
FossilOrigin-Name: 6f86ff2e8c190e83c15dab532660a2a0c359621d1fcce4e6852e56ac6b7f71e3
2024-10-30 03:51:21 +00:00
stephan
067f809402 Re-enable exporting of TCLLIBDIR at configure-time so that clients can override it once there rather than having to override it on an arbitrary number of make invocations (which they can still do, but now need not). Based on feedback in [forum:38f6988e57b738e5|forum post 38f6988e57b].
FossilOrigin-Name: ee6e15f12ee55fd13cf31317d876e6ba03a7ae1fb9056f0013106948d81b31d9
2024-10-30 02:06:41 +00:00
stephan
49e7cfc9a3 When calculating the TCLLIBDIR in main.mk, allow the user to override it using an environment var or make var assignment, per feedback in [forum:38f6988e57b738e5|forum post 38f6988e57b].
FossilOrigin-Name: 838633182c3f9f9c4c1a23384ed025777c25427d9c4c1f1a47f1630cf4038ca5
2024-10-30 01:47:48 +00:00
stephan
5be33f7b3f Split the core-most CFLAGS, which should not be overridable (like -fPIC), into CFLAGS.core, so that went CFLAGS=... is passed on in a make invocation the -fPIC flag is not lost (as reported in [forum:39f8c54391d38c72 | forum post 39f8c543]).
FossilOrigin-Name: f5899d22c6c2e65383d7e1ca43da740d3a56fb87daa204a642ce1dc963a98de2
2024-10-29 23:42:24 +00:00