]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add the ability to specify an alternative compiler (clang instead of gcc)
authordrh <drh@noemail.net>
Thu, 1 Jan 2015 19:53:10 +0000 (19:53 +0000)
committerdrh <drh@noemail.net>
Thu, 1 Jan 2015 19:53:10 +0000 (19:53 +0000)
on the default Makefile.  Use this in releasetest.tcl to implement an
-fsanitize=undefined test.

FossilOrigin-Name: c55c05fe22b9ddb61de55d473a411a11090d3d68

Makefile.in
manifest
manifest.uuid
test/releasetest.tcl

index cd024e950a326ef480dc030b7a4c7fec77a7573f..f9974d609bbb7d674d3496fa2cb36e5b7069b64b 100644 (file)
@@ -22,11 +22,15 @@ TOP = @srcdir@
 #
 BCC = @BUILD_CC@ @BUILD_CFLAGS@
 
-# C Compile and options for use in building executables that 
+# TCC is the C Compile and options for use in building executables that 
 # will run on the target platform.  (BCC and TCC are usually the
-# same unless your are cross-compiling.)
+# same unless your are cross-compiling.)  Separate CC and CFLAGS macros
+# are provide so that these aspects of the build process can be changed
+# on the "make" command-line.  Ex:  "make CC=clang CFLAGS=-fsanitize=undefined"
 #
-TCC = @CC@ @CPPFLAGS@ @CFLAGS@ -I. -I${TOP}/src -I${TOP}/ext/rtree
+CC = @CC@
+CFLAGS = @CPPFLAGS@ @CFLAGS@
+TCC = $(CC) $(CFLAGS) -I. -I${TOP}/src -I${TOP}/ext/rtree
 
 # Define this for the autoconf-based build, so that the code knows it can
 # include the generated config.h
index aac11a7aa5b98db7d9ae365479b4ac13e85df386..13a4c6435b5f8dd3b976ea72757b60c733e8254e 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,7 +1,7 @@
-C Enhance\sthe\s"lemon"\sexecutable\sso\sthat\sit\signores\s-f,\s-W,\s-O,\sand\s-I\ncommand-line\soptions.\s\sThis\spermits\smost\sof\sthe\ssame\soptions\sthat\sare\spassed\nto\sthe\scompiler\sto\salso\sbe\sharmlessly\spassed\sto\slemon,\sand\sthus\nsimplifies\smakefiles.
-D 2015-01-01T19:11:22.522
+C Add\sthe\sability\sto\sspecify\san\salternative\scompiler\s(clang\sinstead\sof\sgcc)\non\sthe\sdefault\sMakefile.\s\sUse\sthis\sin\sreleasetest.tcl\sto\simplement\san\n-fsanitize=undefined\stest.
+D 2015-01-01T19:53:10.337
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
-F Makefile.in 7cd23e4fc91004a6bd081623e1bc6932e44828c0
+F Makefile.in 335e2d3ff0f2455eacbfa3075fc37495e3321410
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
 F Makefile.msc b363b90fe1bfc3b87d190f2f728a126c00d9ce09
 F Makefile.vxworks 034289efa9d591b04b1a73598623119c306cbba0
@@ -801,7 +801,7 @@ F test/randexpr1.test eda062a97e60f9c38ae8d806b03b0ddf23d796df
 F test/rdonly.test dd30a4858d8e0fbad2304c2bd74a33d4df36412a
 F test/regexp1.test 497ea812f264d12b6198d6e50a76be4a1973a9d8
 F test/reindex.test 44edd3966b474468b823d481eafef0c305022254
-F test/releasetest.tcl 183f35a18840152f24bfe0a24d9346f815ccd218
+F test/releasetest.tcl dbb2dbbf82fbd05e30abac638c382a5b6f808407
 F test/resolver01.test 33abf37ff8335e6bf98f2b45a0af3e06996ccd9a
 F test/rollback.test 458fe73eb3ffdfdf9f6ba3e9b7350a6220414dea
 F test/rollback2.test fc14cf6d1a2b250d2735ef16124b971bce152f14
@@ -1234,7 +1234,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P e2b0ebe21cd8a63927decb645efd2db80bf88379
-R 5d6dc81c5e6fc0ccf7a552bd6bb1dd01
+P da408d128b4301d9fc7a3a00f219dce7ed48bc60
+R ca09f55008007dc6e5522170a985ac90
 U drh
-Z c56b05defbbdeecd31b9d2ca5ed09dfe
+Z 2d169330368dfa1bfb6338447f689c29
index 7f420ec644c9afb14223571d388be8203e973d51..48bbba87a322f8a3ecf7d6c1600b67aa53dc9d33 100644 (file)
@@ -1 +1 @@
-da408d128b4301d9fc7a3a00f219dce7ed48bc60
\ No newline at end of file
+c55c05fe22b9ddb61de55d473a411a11090d3d68
\ No newline at end of file
index 3a9ee3311a69ca414bda1eafd6a7b3c0bf4fd6d7..772e5e481a27e9a7e3948cfea6e6a0c2dd20444e 100644 (file)
@@ -34,7 +34,12 @@ array set ::Configs {
   }
   "Ftrapv" {
     -O2 -ftrapv
-    -DSQLITE_MAX_ATTACHED=55
+    -DSQLITE_MAX_ATTACHED=125
+    -DSQLITE_TCL_DEFAULT_FULLMUTEX=1
+  }
+  "Clang-Sanitize" {
+    CC=clang -fsanitize=undefined
+    -DSQLITE_MAX_ATTACHED=125
     -DSQLITE_TCL_DEFAULT_FULLMUTEX=1
   }
   "Unlock-Notify" {
@@ -119,6 +124,7 @@ array set ::Configs {
     -DSQLITE_ENABLE_LOCKING_STYLE=1
   }
   "OS-X" {
+    -O1   # Avoid a compiler bug in gcc 4.2.1 build 5658
     -DSQLITE_OMIT_LOAD_EXTENSION=1
     -DSQLITE_DEFAULT_MEMSTATUS=0
     -DSQLITE_THREADSAFE=2
@@ -166,6 +172,7 @@ array set ::Platforms {
     "Extra-Robustness"        test
     "Device-Two"              test
     "Ftrapv"                  test
+    "Clang-Sanitize"          test
     "No-lookaside"            test
     "Devkit"                  test
     "Default"                 "threadtest fulltest"
@@ -244,9 +251,12 @@ proc run_test_suite {name testtarget config} {
   #
   set cflags "-g"
   set opts ""
+  regsub -all {#[^\n]*\n} $config \n config
   foreach arg $config {
     if {[string match -D* $arg]} {
       lappend opts $arg
+    } elseif {[string match CC=* $arg]} {
+      lappend testtarget $arg
     } else {
       lappend cflags $arg
     }