Disable setting of the SONAME (enabled by [2a2419ef742]), as it's not clear whether blindly setting the SONAME, which now differs from its historical value, will cause more grief than it solves. Add a (disabled) experiment which permits setting (or not) the SONAME to the legacy or current values. This change is up for further change as experimentation proves whether we truly need/want the SONAME. See discussion in/around [forum:0c6fc6f46b2cb3|forum post 0c6fc6f46b2cb3].

FossilOrigin-Name: d931456805e7d5c3379ca68b97a0a1d4ab1eb80c5e90c169cf43fc8239247d25
This commit is contained in:
stephan 2024-11-08 05:26:26 +00:00
parent d42855e404
commit 6f95d95015
4 changed files with 56 additions and 14 deletions

View File

@ -195,6 +195,12 @@ 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)}
#soname:=none => {SONAME for libsqlite3.so}
#^^^ we "could", but arguably shouldn't, support clients passing a
# value of libsqlite3.so.0 for compatibility with clients which
# linked against a pre-3.48 build.
# Maybe we should support values of --soname=(none,auto,legacy), where auto means
# to use the 3.48+ value of libsqlite3.so.3..
# </developer>
}
if {"" ne $DUMP_DEFINES_JSON} {
@ -427,13 +433,41 @@ if {[cc-check-includes zlib.h] && [proj-check-function-in-lib deflate z]} {
}
proj-check-rpath ; # Determine proper rpath-handling flag
if {[proj-check-soname libsqlite3.so.3]} {
# It's not yet clear whether we gain anything from setting -soname,
# but not having it has been a source of anxiety for some users.
define LDFLAGS_SONAME_LIBSQLITE3 [get-define LDFLAGS_SONAME_PREFIX]libsqlite3.so.3
} else {
########################################################################
# It's not yet clear whether we gain anything from setting -soname,
# but not having it has been a source of anxiety for some users.
# Setting it to any value other than its historical value of
# libsqlite3.so.0 may (this is not certain) break dynamic linking of
# clients which initially linked against a legacy build.
#
# See discussion in/around:
# https://sqlite.org/forum/forumpost/0c6fc6f46b2cb3
proc sqlite-check-soname {} {
define LDFLAGS_SONAME_LIBSQLITE3 ""
if {[proj-opt-was-provided soname]} {
set soname [opt-val soname]
} else {
return 0
}
switch -exact -- $soname {
none { return 0 }
auto - 3 { set soname libsqlite3.so.3 }
legacy - 0 { set soname libsqlite3.so.0 }
default {
proj-fatal "Invalid value for --soname. Use one of (none, auto, legacy)."
}
}
msg-debug "soname=$soname"
if {[proj-check-soname $soname]} {
define LDFLAGS_SONAME_LIBSQLITE3 [get-define LDFLAGS_SONAME_PREFIX]$soname
msg-result "Setting SONAME: [get-define LDFLAGS_SONAME_LIBSQLITE3]"
} else {
proj-fatal "This environment does not support SONAME."
}
return sqlite-check-soname ""
}
sqlite-check-soname
proj-define-if-opt-truthy shared ENABLE_SHARED "Build shared library?"

View File

@ -319,6 +319,14 @@ proc proj-first-bin-of {args} {
# passes --foo-bar to configure, even if that invocation would resolve
# to the default value of baz. If the user does not explicitly pass in
# --foo-bar (with or without a value) then this returns 0.
#
# Note: unlike most functions which deal with configure --flags, this
# one does not validate that $key refers to a pre-defined flag. i.e.
# it accepts arbitrary keys, even those not defined via an [options]
# call. [proj-opt-set] manipulates the internal list of flags, such
# that new options set via that function will cause this function to
# return true. (That's an unintended and unavoidable side-effect, not
# specifically a feature which should be made use of.)
proc proj-opt-was-provided {key} {
dict exists $::autosetup(optset) $key
}

View File

@ -1,5 +1,5 @@
C Fix\san\sOOB\swrite\sthat\scould\soccur\sin\sfts3\swhen\sdealing\swith\scorrupt\sdatabase\srecords.
D 2024-11-07T17:34:53.573
C Disable\ssetting\sof\sthe\sSONAME\s(enabled\sby\s[2a2419ef742]),\sas\sit's\snot\sclear\swhether\sblindly\ssetting\sthe\sSONAME,\swhich\snow\sdiffers\sfrom\sits\shistorical\svalue,\swill\scause\smore\sgrief\sthan\sit\ssolves.\sAdd\sa\s(disabled)\sexperiment\swhich\spermits\ssetting\s(or\snot)\sthe\sSONAME\sto\sthe\slegacy\sor\scurrent\svalues.\sThis\schange\sis\sup\sfor\sfurther\schange\sas\sexperimentation\sproves\swhether\swe\struly\sneed/want\sthe\sSONAME.\sSee\sdiscussion\sin/around\s[forum:0c6fc6f46b2cb3|forum\spost\s0c6fc6f46b2cb3].
D 2024-11-08T05:26:26.094
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 6fc759447a556c36ac78d426d9c243cd0e2896b25fb76965fb33d05e88e83b60
F auto.def d59912edf010b39c9643979668b298945e86d7cedcfd9f6e82bb6b67460c3750
F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347
F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
@ -50,7 +50,7 @@ F autosetup/cc.tcl c0fcc50ca91deff8741e449ddad05bcd08268bc31177e613a6343bbd1fd3e
F autosetup/default.auto 5cdf016de2140e50f1db190a02039dc42fb390af1dda4cc4853e3042a9ef0e82
F autosetup/jimsh0.c d40e381ea4526a067590e7b91bd4b2efa6d4980d286f908054c647b3df4aee14
F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
F autosetup/proj.tcl 638db0bc38e0890610c8dd2dbabb80d3ddf19c9a77d4baad2f2ebf5fb74c384d
F autosetup/proj.tcl 93e1d99ffa8a75fe2f488605c4d36cb57a75f1500bccc5c5954ae45eb7da89d7
F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9
F autosetup/tmake.auto eaebc74ad538dfdd3c817c27eefc31930c20510c4f3a3704071f6cb0629ed71f
F autosetup/tmake.tcl a275793ec1b6f8708179af0acef1f6f10d46c2920739743f7a8720c6d700c7a9
@ -2201,8 +2201,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 2a2419ef742c9f37c32be04d417337c1fa22503305d2df154fa38b2b69eae943
R 580b9efafd7ec3d49d176dafa65089bc
U dan
Z f282e2ce9844d566093a01c30fea97c9
P 108863ec7998e0a35569e3c6534b538f00d4ef87fdb316bd6a4a9a7a272bba47
R f90970b8630851bf2dd23d5bfdfec6bf
U stephan
Z a7d1a2cb3cf805ad0ba907d86397dd96
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
108863ec7998e0a35569e3c6534b538f00d4ef87fdb316bd6a4a9a7a272bba47
d931456805e7d5c3379ca68b97a0a1d4ab1eb80c5e90c169cf43fc8239247d25