Mail Archives: djgpp/2007/08/06/14:45:50
On Aug 3, 8:02 pm, DJ Delorie <d DOT DOT DOT AT delorie DOT com> wrote:
> > I am compiling a 40 lines tee exe and it gets too 59 Ko.
> > How do I reduce this?
>
> http://www.delorie.com/djgpp/v2faq/faq8_14.html
Just for the record (although it's probably obvious), that UPX link is
broken: http://upx.sf.net works (currently 3.01)
"--ultra-brute" (kinda slow) works best for DJGPP stuff (76 passes,
LZMA support).
Also, the mention of "-O2" is probably an old reference, too, since
fairly newer GCCs all support "-Os" (optimize for size).
Jean Pierre,
If you just need ANSI C compatibility (without the POSIX
compatibility), there are various other C compilers that will compile
smaller binaries: OpenWatcom, old Turbo C/C++ for DOS, Pacific C
(yuck), CC386 (32-bit only), etc.
And for old, 16-bit, mostly K&R-ish C, you can use Micro-C or BCC/
Dev86 or Small C, Desmet C, etc. (Oh, and Digital Mars targets DOS at
least, but needs Win32 for the compiler).
Sphinx C-- is kinda C-ish and outputs pretty small stuff, too.
And there's always HXRT (partial Win32 emulation), which you can use
with some Win32 binaries (but that slightly negates any size savings,
IMO).
Hope this helps (and e-mail me if you need links to any of these
things.)
P.S. You can get a copy of FreeDOS' tee for DOS from here:
(teex.zip, tees.zip)
http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/pkgs/
- Raw text -