lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

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.