[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Compiling Lua for uClinux create larger file than expected
- From: Roland Illig <roland.illig@...>
- Date: Mon, 25 Oct 2004 00:05:55 +0200
Adrián Pérez wrote:
You might want to use the "-s" flag as well when compiling, it tells GCC
to avoid inclusion of _any_ kind of debugging information (Tip: check
with "-Os -s"). After linking use "strip" as mentioned by other: it may
erase unused sections of the executable image as well.
"-s" is a linker flag so you should use it when linking, not when
compiling. (Sorry, but I'm a language lawyer.)
MYCFLAGS="-Os -fomit-frame-pointer -fno-keep-static-consts
-fmerge-all-constants"
MYLDFLAGS="-s -O 3 --sort-common"
I did not try most of these options, so be sure to read the warnings in
the gcc and ld manuals/info pages.
Roland