sqlite-3.16.0-full_tarball-build.patch 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. Link executables against libsqlite3.so.
  2. Increase timeout for fuzzcheck.
  3. Fix building with dlopen() not available.
  4. --- Makefile.in
  5. +++ Makefile.in
  6. @@ -562,6 +562,7 @@
  7. #
  8. SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4
  9. # SHELL_OPT += -DSQLITE_ENABLE_FTS5
  10. +SHELL_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB
  11. SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
  12. SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
  13. FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
  14. @@ -586,25 +587,25 @@
  15. libtclsqlite3.la: tclsqlite.lo libsqlite3.la
  16. $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
  17. - libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
  18. + libsqlite3.la @TCL_STUB_LIB_SPEC@ \
  19. -rpath "$(TCLLIBDIR)" \
  20. -version-info "8:6:8" \
  21. -avoid-version
  22. -sqlite3$(TEXE): $(TOP)/src/shell.c sqlite3.c
  23. - $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
  24. - $(TOP)/src/shell.c sqlite3.c \
  25. - $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
  26. +sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la
  27. + $(LTLINK) $(READLINE_FLAGS) -o $@ \
  28. + $(TOP)/src/shell.c libsqlite3.la \
  29. + $(LIBREADLINE)
  30. -sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
  31. - $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
  32. +sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
  33. + $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
  34. -dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
  35. - $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
  36. +dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
  37. + $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
  38. -scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
  39. +scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
  40. $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
  41. - $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
  42. + $(TOP)/ext/misc/scrub.c libsqlite3.la
  43. srcck1$(BEXE): $(TOP)/tool/srcck1.c
  44. $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
  45. @@ -679,7 +680,7 @@
  46. # Rule to build the amalgamation
  47. #
  48. sqlite3.lo: sqlite3.c
  49. - $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
  50. + $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
  51. # Rules to build the LEMON compiler generator
  52. #
  53. @@ -1105,13 +1106,13 @@
  54. # Fuzz testing
  55. fuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
  56. - ./fuzzcheck$(TEXE) $(FUZZDATA)
  57. + ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
  58. fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
  59. - ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
  60. + ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
  61. valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA)
  62. - valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
  63. + valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
  64. # The veryquick.test TCL tests.
  65. #
  66. @@ -1141,32 +1142,31 @@
  67. smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
  68. ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
  69. -sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
  70. +sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
  71. echo "#define TCLSH 2" > $@
  72. - echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
  73. - cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@
  74. + cat $(TOP)/src/tclsqlite.c >> $@
  75. echo "static const char *tclsh_main_loop(void){" >> $@
  76. echo "static const char *zMainloop = " >> $@
  77. $(TCLSH_CMD) $(TOP)/tool/tostr.tcl $(TOP)/tool/spaceanal.tcl >> $@
  78. echo "; return zMainloop; }" >> $@
  79. -sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
  80. - $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
  81. +sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
  82. + $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
  83. -showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
  84. - $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
  85. +showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
  86. + $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
  87. -showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
  88. - $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
  89. +showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
  90. + $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
  91. -showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
  92. - $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
  93. +showjournal$(TEXE): $(TOP)/tool/showjournal.c
  94. + $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
  95. -showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
  96. - $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
  97. +showwal$(TEXE): $(TOP)/tool/showwal.c
  98. + $(LTLINK) -o $@ $(TOP)/tool/showwal.c
  99. -changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
  100. - $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
  101. +changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
  102. + $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
  103. rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
  104. $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
  105. @@ -1180,8 +1180,8 @@
  106. speedtest1$(TEXE): $(TOP)/test/speedtest1.c sqlite3.lo
  107. $(LTLINK) -o $@ $(TOP)/test/speedtest1.c sqlite3.lo $(TLIBS)
  108. -rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
  109. - $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
  110. +rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
  111. + $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
  112. loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
  113. $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
  114. --- configure.ac
  115. +++ configure.ac
  116. @@ -584,6 +584,9 @@
  117. if test "${use_loadextension}" = "yes" ; then
  118. OPT_FEATURE_FLAGS=""
  119. AC_SEARCH_LIBS(dlopen, dl)
  120. + if test "${ac_cv_search_dlopen}" = "no" ; then
  121. + OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
  122. + fi
  123. else
  124. OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
  125. fi