From: drh Date: Sun, 30 Mar 2003 18:58:58 +0000 (+0000) Subject: Remove the obsolete documentation on how to crosscompile version 1.0 of X-Git-Tag: version-3.6.10~5181 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9077ba8ee516d84610cd63c00c41692fd1362093;p=thirdparty%2Fsqlite.git Remove the obsolete documentation on how to crosscompile version 1.0 of SQLite. (CVS 888) FossilOrigin-Name: ac0622bf5fca9c8907319a20158e991efdaa6402 --- diff --git a/Makefile.in b/Makefile.in index bff52564e0..49e80eb5e8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -321,9 +321,6 @@ arch.png: $(TOP)/www/arch.png opcode.html: $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c tclsh $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c >opcode.html -crosscompile.html: $(TOP)/www/crosscompile.tcl - tclsh $(TOP)/www/crosscompile.tcl >crosscompile.html - mingw.html: $(TOP)/www/mingw.tcl tclsh $(TOP)/www/mingw.tcl >mingw.html @@ -373,7 +370,6 @@ DOC = \ arch.png \ vdbe.html \ c_interface.html \ - crosscompile.html \ mingw.html \ tclsqlite.html \ download.html \ diff --git a/main.mk b/main.mk index 1ed5046065..d8e0c56bea 100644 --- a/main.mk +++ b/main.mk @@ -310,9 +310,6 @@ arch.png: $(TOP)/www/arch.png opcode.html: $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c tclsh $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c >opcode.html -crosscompile.html: $(TOP)/www/crosscompile.tcl - tclsh $(TOP)/www/crosscompile.tcl >crosscompile.html - mingw.html: $(TOP)/www/mingw.tcl tclsh $(TOP)/www/mingw.tcl >mingw.html @@ -362,7 +359,6 @@ DOC = \ arch.png \ vdbe.html \ c_interface.html \ - crosscompile.html \ mingw.html \ tclsqlite.html \ download.html \ diff --git a/manifest b/manifest index 168203e137..d19a4559c0 100644 --- a/manifest +++ b/manifest @@ -1,6 +1,6 @@ -C Detect\swhen\sa\schild\snode\sof\sa\sbtree\spage\shas\szero\sentries\sand\sreport\sthat\nas\sa\scase\sof\sdatabase\scorruption.\s(CVS\s887) -D 2003-03-30T18:41:22 -F Makefile.in 6917c2149a586f11b47c428f2ba748eb1da04f69 +C Remove\sthe\sobsolete\sdocumentation\son\show\sto\scrosscompile\sversion\s1.0\sof\nSQLite.\s(CVS\s888) +D 2003-03-30T18:58:58 +F Makefile.in 3c4ba24253e61c954d67adbbb4245e7117c5357e F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd F VERSION e5b03976c56deafa24511d6ef17d64a28679e9bd @@ -14,7 +14,7 @@ F doc/report1.txt a031aaf37b185e4fa540223cb516d3bccec7eeac F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 F libtool bbbea7d79c23323e4100103836028e4fad0d9242 F ltmain.sh abfb9387049fff6996afc6e325736597795baf11 -F main.mk 8b10c5df8a21cdd343986a90c75247bafaebb3aa +F main.mk 23b24112064bd14656a540abf1699a98ecdd9851 F publish.sh 86b5e8535830a2588f62ce1d5d1ef00e1dede23a F spec.template 238f7db425a78dc1bb7682e56e3834c7270a3f5e F sqlite.1 83f4a9d37bdf2b7ef079a82d54eaf2e3509ee6ea @@ -138,7 +138,6 @@ F www/audit.tcl 90e09d580f79c7efec0c7d6f447b7ec5c2dce5c0 F www/c_interface.tcl 5b54a6f65b70b02da2f6df4f8a23a4b10032e89e F www/changes.tcl 7eb04deffbe116cdb558443f8f7df74ebd021daa F www/conflict.tcl 81dd21f9a679e60aae049e9dd8ab53d59570cda2 -F www/crosscompile.tcl 3622ebbe518927a3854a12de51344673eb2dd060 F www/datatypes.tcl 0cb28565580554fa7e03e8fcb303e87ce57757ae F www/download.tcl 0932d7f4f0e8b2adbbd22fac73132f86e43ab4a9 F www/dynload.tcl 02eb8273aa78cfa9070dd4501dca937fb22b466c @@ -147,7 +146,7 @@ F www/fileformat.tcl d9b586416c0d099b82e02e469d532c9372f98f3f F www/formatchng.tcl cbaf0f410096c71f86a7537cf9249fa04b9a659c F www/index.tcl b155eba45136d19e7aa6ba979d4093180c335cf7 F www/lang.tcl 9bd9380dceba83d11fe268e0142c05ee06c757db -F www/mingw.tcl f1c7c0a7f53387dd9bb4f8c7e8571b7561510ebc +F www/mingw.tcl d96b451568c5d28545fefe0c80bee3431c73f69c F www/nulls.tcl 29497dac2bc5b437aa7e2e94577dad4d8933ed26 F www/omitted.tcl 118062f40a203fcb88b8d68ef1d7c0073ac191ec F www/opcode.tcl 33c5f2061a05c5d227c72b84c080b3bf74c74f8b @@ -156,7 +155,7 @@ F www/speed.tcl cb4c10a722614aea76d2c51f32ee43400d5951be F www/sqlite.tcl ae3dcfb077e53833b59d4fcc94d8a12c50a44098 F www/tclsqlite.tcl 1db15abeb446aad0caf0b95b8b9579720e4ea331 F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218 -P b90d9de32d10a71fe81f5bfd0cf57faae8c5c3b4 -R 2edd0e7412987cbf5566b47c204bebb0 +P 66c80ae232a78ecb010280ab1aa684cb78b0662f +R 208f37d602235a28fca3e23d11ba2cbf U drh -Z 4b34ca6a145e046d4b78a760de2492ba +Z 125b0a7be77e859c6623ad865623b75e diff --git a/manifest.uuid b/manifest.uuid index e2930f0e23..9e80a712d3 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -66c80ae232a78ecb010280ab1aa684cb78b0662f \ No newline at end of file +ac0622bf5fca9c8907319a20158e991efdaa6402 \ No newline at end of file diff --git a/www/crosscompile.tcl b/www/crosscompile.tcl deleted file mode 100644 index 82357fd3d8..0000000000 --- a/www/crosscompile.tcl +++ /dev/null @@ -1,193 +0,0 @@ -# -# Run this Tcl script to generate the crosscompile.html file. -# -set rcsid {$Id: crosscompile.tcl,v 1.5 2001/11/24 13:23:05 drh Exp $} - -puts { - - Notes On How To Compile SQLite Using The MinGW Cross-Compiler - - -

-Notes On How To Compile SQLite Using The MinGW Cross-Compiler -

} -puts "

-(This page was last modified on [lrange $rcsid 3 4] UTC) -

" - -puts { -

MinGW or -Minimalist GNU For Windows -is a version of the popular GCC compiler that builds Win95/Win98/WinNT -binaries. See the website for details.

- -

This page describes how you can use MinGW configured as a -cross-compiler running under RedHat 6.0 Linux to generate a -binary for SQLite that runs under WinNT. -Some additional steps (described below) -are needed to target Win95/98.

-} - -proc Code {body} { - puts {
}
-  regsub -all {&} [string trim $body] {\&} body
-  regsub -all {>} $body {\>} body
-  regsub -all {<} $body {\<} body
-  regsub -all {\(\(\(} $body {} body
-  regsub -all {\)\)\)} $body {} body
-  puts $body
-  puts {
} -} - -puts { -

Here are the steps:

- -
    -
  1. -

    Get a copy of the MinGW compiler and all -its associated tools that run under Linux. No binary versions of -MinGW in this configuration are available for net downloads, as far -as I know. You will probably have to download the source code and -compile it all yourself. -A separate bulletin describes how this -can be done. -When you are done, make sure the compiler and all its associated tools -are located somewhere on your PATH environment variable. -

    -
  2. - -
  3. -

    -Download the Win32 port of GDBM from -Roth Consulting. You can FTP a ZIP archive of the sources directly -from -ftp://ftp.roth.net/pub/ntperl/gdbm/source/Win32_GDBM_Source.zip. -

    -
  4. - -
  5. -

    Make a directory and unpack the Win32 port of GDBM.

    -
    -mkdir roth
    -cd roth
    -unzip ../Win32_GDBM_Source.zip
    -
    -
  6. - -
  7. -

    Manually build the GDBM library as follows:

    -
    -i386-mingw32-gcc -DWIN32=1 -O2 -c *.c
    -i386-mingw32-ar cr libgdbm.a *.o
    -i386-mingw32-ranlib libgdbm.a
    -cd ..
    -
    -
  8. - -
  9. -

    -Download the SQLite tarball from - -http://www.hwaci.com/sw/sqlite/sqlite.tar.gz. -Unpack the tarball and create a separate directory in which -to build the executable and library. -

    -
    -tar xzf sqlite.tar.gz
    -mkdir sqlite-bld
    -cd sqlite-bld
    -
    -
  10. - -
  11. -

    -Create a "hints" file that will tell the SQLite configuration script -to use the MinGW cross-compiler rather than the native linux compiler. -The hints file should looks something like this:

    -
    -cat >mingw.hints <<\END
    -  config_TARGET_CC=i386-mingw32-gcc
    -  config_TARGET_CFLAGS='-O2'
    -  config_TARGET_GDBM_LIBS=../roth/libgdbm.a
    -  config_TARGET_GDBM_INC=-I../roth
    -  config_TARGET_AR='i386-mingw32-ar cr'
    -  config_TARGET_RANLIB=i386-mingw32-ranlib
    -  config_TARGET_EXEEXT='.exe'
    -END
    -
    -
  12. - -
  13. -

    Configure and build SQLite:

    -
    -../sqlite/configure --with-hints=./mingw.hints
    -make
    -
    -
  14. -
- - -

Targetting Windows95/98 instead of WindowsNT

- -

A small amount of additional work is needed to get SQLite running -under Windows95/98. The first problem is that the LockFile() and -UnlockFile() API that the Roth GDBM port uses does not work under -Windows95. The easiest workaround is to just disable file locking -in the GDBM library. You can do so by appending a few lines of code -to the end of one of the GDBM source files and compiling the library -using a special command-line option. Replace step (4) above as -follows:

- -
    -
  1. -Append text to the systems.h source file as follows:

    - -
    -cat >>systems.h <<\END
    -#ifdef NO_LOCKS
    -#undef  UNLOCK_FILE
    -#define UNLOCK_FILE(x)
    -#undef  READLOCK_FILE
    -#define READLOCK_FILE(x)  lock_val=0;
    -#undef  WRITELOCK_FILE
    -#define WRITELOCK_FILE(x) lock_val=0;
    -#endif
    -END
    -
    - -

    Then manually build the GDBM library with the extra -"NO_LOCKS" define as follows:

    -
    -i386-mingw32-gcc -DWIN32=1 -DNO_LOCKS -O2 -c *.c
    -i386-mingw32-ar cr libgdbm.a *.o
    -i386-mingw32-ranlib libgdbm.a
    -cd ..
    -
    -

  2. -
- -

Note that the locking problem has been reported and may actually -be fixed in the Roth GDBM distribution by the time you read this. -You should probably check before you make the above changes.

- -

The above is all you have to do to get SQLite to work on Windows95. -But one more step is required to get it to work well. It -turns out that SQLite make heavy use of malloc() and -free() and the implementation of this functions -on Windows95 is particular poor. Large database queries will run -more than 10 times faster if you substitute a better memory allocator -such as the one by -Doug Lea. -A copy of Doug's allocator is included in the contrib -directory of the source tree. Speed improvements are also reported -on WindowsNT when alternative memory allocators are used, though -the speedup is not as dramatic as it is with WIndows95.

- -} -puts { -


-

-Back to the SQLite Home Page -

- -} diff --git a/www/mingw.tcl b/www/mingw.tcl index b89b135b9b..f1a0186630 100644 --- a/www/mingw.tcl +++ b/www/mingw.tcl @@ -1,7 +1,7 @@ # -# Run this Tcl script to generate the crosscompile.html file. +# Run this Tcl script to generate the mingw.html file. # -set rcsid {$Id: mingw.tcl,v 1.3 2001/11/24 13:23:05 drh Exp $} +set rcsid {$Id: mingw.tcl,v 1.4 2003/03/30 18:58:58 drh Exp $} puts {