First a note: I removed -ffunction-sections from the compiler options, and it 
is now better, but not good enough (365KB). It was an options the AVR IDE 
defaulted to, that is why I not noticed it. OMIT_DISKIO is also NOT defined. I 
am using SQLite version 3.6.4. OTHER_OS=1 and THREADSAFE=0.

At first try, I just used the amalgamation from the site and put the 
SQLITE_OMIT_* lines at the beginining of the source file. It was only after 
then I noticed in the online docs that to correctly use the OMIT defines, I 
have to start from full sources. So I got the tarball, used Makefile.gcc-linux 
as a template to make my own makefile (I defined the OMIT options), and issued 
a "make -f Makefile.gcc-avr sqlite3.c". (Although I have no idea how the Tcl 
script would use defines from the makefile, I assume some of the tools (lemon?) 
involved try to parse the make- and source files like a very basic 
preprocessor, so it is possible.)

Again, OMITs are prepended to sqlite3.c. I use the (atmel supplied) AVR32 gcc 
compiler to compile with "-Os -fno-inline -Wall -c -fmessage-length=0 
-mpart=uc3b1256es". These are all the gcc options in use, and now I get 365KB. 
As an experiment, I also tried to compile with the x86 gcc 4.3.2 to see the 
size it produces, with the same options I got 315KB. Definitely better but 
still far too large. So, on one hand the AVR32 compiler is not that good for 
producing small code, but I am also missing something important, because the 
x86 object file is also much larger than the size you mentioned (315KB vs 
205KB). Not to mention that 315KB is without optional features, the 205KB you 
mentioned is with them.

These are the exact actions I took. Any help is appretiated. Thanks,
Károly

> Date: Wed, 29 Oct 2008 21:50:37 -0400
> From: [EMAIL PROTECTED]
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] Making the binary small
> 
> Are you compiling the SQLite shell utility, or just the library?   The
> Windows and Linux versions of the lib available from the download page
> which are compiled with all the optional features are 235kb and 205kb
> respectively.   It's surprising that the compiled version for AVR32 is
> more than twice as large with all the optional features compiled out.
>   Can you provide anymore information on how you are compiling it?
> Which version are you compiling?   Are you using the amalgamation?
> Are you compiling without debugging information?
> 
> -Shane
> 
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to