Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / sqlite / patches / 0001-test-SQLite-tests-compiling-on-Linux.patch
blobd55d29d17e9eb5de889149ddfedfbbcc7629321d
1 From 3418fd3e3a60fe9f8b6c52f2aad93dcdf3b7af93 Mon Sep 17 00:00:00 2001
2 From: Scott Hess <shess@chromium.org>
3 Date: Fri, 16 Jan 2015 10:24:30 -0800
4 Subject: [PATCH 01/16] [test] SQLite tests compiling on Linux.
6 ---
7 third_party/sqlite/src/Makefile.linux-gcc | 42 ++++++++++++++++++++++---------
8 1 file changed, 30 insertions(+), 12 deletions(-)
10 diff --git a/third_party/sqlite/src/Makefile.linux-gcc b/third_party/sqlite/src/Makefile.linux-gcc
11 index 1c9f24f..6d67ba7 100644
12 --- a/third_party/sqlite/src/Makefile.linux-gcc
13 +++ b/third_party/sqlite/src/Makefile.linux-gcc
14 @@ -14,7 +14,7 @@
15 #### The toplevel directory of the source tree. This is the directory
16 # that contains this "Makefile.in" and the "configure.in" script.
18 -TOP = ../sqlite
19 +TOP = ..
21 #### C Compiler and options for use in building executables that
22 # will run on the platform that is doing the build.
23 @@ -32,19 +32,19 @@ USLEEP = -DHAVE_USLEEP=1
24 # multi-threaded program, then define the following macro
25 # appropriately:
27 -#THREADSAFE = -DTHREADSAFE=1
28 -THREADSAFE = -DTHREADSAFE=0
29 +THREADSAFE = -DTHREADSAFE=1
30 +#THREADSAFE = -DTHREADSAFE=0
32 #### Specify any extra linker options needed to make the library
33 # thread safe
35 -#THREADLIB = -lpthread
36 -THREADLIB =
37 +THREADLIB = -lpthread
38 +#THREADLIB =
40 #### Specify any extra libraries needed to access required functions.
42 #TLIBS = -lrt # fdatasync on Solaris 8
43 -TLIBS =
44 +TLIBS = -ldl
46 #### Leave SQLITE_DEBUG undefined for maximum speed. Use SQLITE_DEBUG=1
47 # to check for memory leaks. Use SQLITE_DEBUG=2 to print a log of all
48 @@ -58,7 +58,24 @@ TLIBS =
49 #OPTS = -DSQLITE_DEBUG=1
50 #OPTS =
51 OPTS = -DNDEBUG=1
52 -OPTS += -DHAVE_FDATASYNC=1
53 +#OPTS += -DHAVE_FDATASYNC=1
55 +# These flags match those for SQLITE_CFLAGS in config.mk.
57 +OPTS += -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600
58 +OPTS += -DHAVE_USLEEP=1
60 +# Additional SQLite tests.
61 +OPTS += -DSQLITE_MEMDEBUG=1
63 +# Don't include these ones, they break the SQLite tests.
64 +# -DSQLITE_OMIT_ATTACH=1 \
65 +# -DSQLITE_OMIT_LOAD_EXTENSION=1 \
66 +# -DSQLITE_OMIT_VACUUM=1 \
67 +# -DSQLITE_TRANSACTION_DEFAULT_IMMEDIATE=1 \
69 +# TODO(shess) I can't see why I need this setting.
70 +OPTS += -DOS_UNIX=1
72 #### The suffix to add to executable files. ".exe" for windows.
73 # Nothing for unix.
74 @@ -70,7 +88,7 @@ EXE =
75 # will run on the target platform. This is usually the same
76 # as BCC, unless you are cross-compiling.
78 -TCC = gcc -O6
79 +TCC = gcc -Os
80 #TCC = gcc -g -O0 -Wall
81 #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
82 #TCC = /opt/mingw/bin/i386-mingw32-gcc -O6
83 @@ -91,16 +109,16 @@ SHPREFIX = lib
85 #### Extra compiler options needed for programs that use the TCL library.
87 -#TCL_FLAGS =
88 +TCL_FLAGS = -I/usr/include/tcl8.5
89 #TCL_FLAGS = -DSTATIC_BUILD=1
90 -TCL_FLAGS = -I/home/drh/tcltk/8.5linux
91 +#TCL_FLAGS = -I/home/drh/tcltk/8.5linux
92 #TCL_FLAGS = -I/home/drh/tcltk/8.5win -DSTATIC_BUILD=1
93 #TCL_FLAGS = -I/home/drh/tcltk/8.3hpux
95 #### Linker options needed to link against the TCL library.
97 -#LIBTCL = -ltcl -lm -ldl
98 -LIBTCL = /home/drh/tcltk/8.5linux/libtcl8.5g.a -lm -ldl
99 +LIBTCL = -ltcl8.5 -lm -ldl
100 +#LIBTCL = /home/drh/tcltk/8.5linux/libtcl8.5g.a -lm -ldl
101 #LIBTCL = /home/drh/tcltk/8.5win/libtcl85s.a -lmsvcrt
102 #LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc
105 2.2.1