]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
More closely emulate the legacy build's handling of LDFLAGS, permitting them to be...
authorstephan <stephan@noemail.net>
Fri, 8 Nov 2024 07:37:12 +0000 (07:37 +0000)
committerstephan <stephan@noemail.net>
Fri, 8 Nov 2024 07:37:12 +0000 (07:37 +0000)
FossilOrigin-Name: d1af9f31831dc99a808b916df4d414943f5d56796c8342411ee4a57abfde85e2

Makefile.in
main.mk
manifest
manifest.uuid

index 4a702114304a39dac1b0c044f55ff488caca2e69..530d82e4f7d07d83e72c51bf3480e6bfbefa6d9b 100644 (file)
@@ -135,9 +135,10 @@ T.cc = $(CC)
 #
 CFLAGS = @CFLAGS@ @CPPFLAGS@
 #
-# $(LDFLAGS) is documented in main.mk.
+# $(LDFLAGS.configure) represents any LDFLAGS=... the client passes to
+# configure. See main.mk.
 #
-LDFLAGS = @LDFLAGS@
+LDFLAGS.configure = @LDFLAGS@
 
 #
 # CFLAGS.core is documented in main.mk.
diff --git a/main.mk b/main.mk
index 5afd5186931540aa50c06ecdc89b385c256f484c..b09de2a3b3e960929a38589c6064045763dea4b0 100644 (file)
--- a/main.mk
+++ b/main.mk
@@ -264,7 +264,8 @@ all:        sqlite3.h sqlite3.c
 ########################################################################
 
 #
-# $(CFLAGS.env) holds the environment-provided $(CFLAGS).
+# $(CFLAGS.env) holds the any $(CFLAGS) provided at configure- or
+# make-time (the latter overriding the former).
 #
 # $(CFLAGS) should ideally only contain flags which are relevant for
 # all binaries built for the target platform. However, many people
@@ -277,27 +278,33 @@ all:      sqlite3.h sqlite3.c
 #
 # Historical note: the pre-3.48 build does not honor CPPFLAGS passed
 # to make, so we do not do so here. Both the legacy and 3.48+ builds
-# support CPPFLAGS passed at configure-time.
+# support CPPFLAGS passed at configure-time, and combines them with
+# the configure-time CFLAGS.
 #
 CFLAGS.core ?=
 CFLAGS.env  = $(CFLAGS)
 T.cc += $(CFLAGS.core) $(CFLAGS.env)
 
 #
-# $(LDFLAGS.env) represents any LDFLAGS=... the client passes to
-# make or configure. The historical build enabled passing-on of
-# user-provided LDFLAGS, and some folks rely on that for obscure uses,
-# so we do the same here, with the caveats that:
+# $(LDFLAGS.configure) represents any LDFLAGS=... the client passes to
+# the configure process.  The historical build enabled passing-on of
+# user-provided LDFLAGS at configure-time but not make-time. That
+# behavior is not possible to fully emulate here because this makefile
+# is not filtered by the configure script, so we instead
+# "soft-enforce" it by using a level of indirection, which clients who
+# read this can (but are not advised to!) bypass by passing
+# LDFLAGS.configure=... to this makefile. (We do not guaranty this
+# variable name to be stable, so do not rely on that capability!)
 #
-# 1) The legacy build applied such LDFLAGS to all link operations for
-#    all deliverables.
+# A significant difference from the legacy build:
 #
-# 2) The 3.48+ build applies them (as of this writing) more
-#    selectively: search this file LDFLAGS.env to see where they're
-#    set. As of this writing, they only affect targets which use
-#    $(LDFLAGS.libsqlite3) - see that var's docs for details.
+# The legacy build applied such LDFLAGS to all link operations for all
+# deliverables. The 3.48+ build applies them (as of this writing) more
+# selectively: search this file LDFLAGS.configure to see where they're
+# set. As of this writing, they only affect targets which use
+# $(LDFLAGS.libsqlite3) - see that var's docs for details.
 #
-LDFLAGS.env = $(LDFLAGS)
+LDFLAGS.configure ?=
 
 #
 # The difference between $(OPT_FEATURE_FLAGS) and $(OPTS) is that the
@@ -386,7 +393,7 @@ LDFLAGS.libsqlite3 = \
   $(LDFLAGS.rpath) $(LDFLAGS.pthread) \
   $(LDFLAGS.math) $(LDFLAGS.dlopen) \
   $(LDFLAGS.zlib) $(LDFLAGS.icu) \
-  $(LDFLAGS.env)
+  $(LDFLAGS.configure)
 
 #
 # $(install-dir.XYZ) = dirs for installation.
index b96c453c1b91b891fe2e0708cdad8cbf8acf8f94..6e36a7492d70a40596829d6e182a9cc987725d69 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,9 +1,9 @@
-C Support\sclients\spassing\sin\sLDFLAGS\sto\sconfigure/make,\sbut\sin\sa\smore\slimited\sform\sthan\sthe\slegacy\sbuild\sit\s(i.e.\sonly\sto\sselect\stargets\srather\sthan\sall\stargets).\sRename\smake-side\sinternal\suses\sof\sCFLAGS\sto\sCFLAGS.env\sfor\sconsistency\swith\sthe\snew\sLDFLAGS.env.\sSee\sdiscussion\sin\s[forum:5fcbea40f3|forum\sthread\s5fcbea40f3].
-D 2024-11-08T06:22:15.700
+C More\sclosely\semulate\sthe\slegacy\sbuild's\shandling\sof\sLDFLAGS,\spermitting\sthem\sto\sbe\spassed\sto\sconfigure\sbut\snot\sto\smake.\sWe\scannot\s100%\senforce\sthat\sbecause\smain.mk\sis\snot\sfiltered\sby\sthe\sconfigure\sscript,\sso\swe\sinstead\sadd\sa\slevel\sof\sindirection\sto\smake\spassing\sof\sLDFLAGS=...\sto\smake\sa\sno-op.
+D 2024-11-08T07:37:12.419
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
-F Makefile.in 007ddc95bc4954ea83219dae8205f124b6d4af247956de3d512af2efee79218a
+F Makefile.in 580a60aa8deb37060c7973d9399c51c4388f1e0ad0be6555dcd44bc8d2ac3260
 F Makefile.linux-generic bd3e3cacd369821a6241d4ea1967395c962dfe3057e38cb0a435cee0e8b789d0
 F Makefile.msc a92237976eb92c5efaa0dd2524746aec12c196e12df8d4dbff9543a4648c3312
 F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159
@@ -699,7 +699,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 28f98d4289bd9b07c3b9b7ee66b7128e798bf5ff8a195b8bd585637f7abf9dd8
+F main.mk e2a20a4612d8e1d1c3ad2e427d089e18f4831efdeab234dfeaa0a014e3a3d81d
 F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
 F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
 F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421
@@ -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 d931456805e7d5c3379ca68b97a0a1d4ab1eb80c5e90c169cf43fc8239247d25
-R 17f80016988fb1a73179c22ffceb038b
+P a5e07e8063ad50f2cf46b6be568717adc9604bd6dbf926a526de43bda2996ad0
+R bf7c848547bcf2bdf4e3ecfac76baab4
 U stephan
-Z a78bacddad60c62677dda4a3ed053059
+Z 41894f1532ad89c47f894ee85a9664de
 # Remove this line to create a well-formed Fossil manifest.
index d1bef5204e5f0125d5875679211f5c076ba68e11..3ffe554d4609973d4b1ec37262ffef9326a65089 100644 (file)
@@ -1 +1 @@
-a5e07e8063ad50f2cf46b6be568717adc9604bd6dbf926a526de43bda2996ad0
+d1af9f31831dc99a808b916df4d414943f5d56796c8342411ee4a57abfde85e2