lua-users home
lua-l archive

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


On Dec 1, 2012 12:10 AM, <meino.cramer@gmx.de> wrote:

> What CFLAGS do you suggest in general?

-g -O2 -fpic -Wall

If it's somebody else's code, you can leave out the -Wall, at least until you're debugging it. Fixing compiler warnings seems to be the best return on investment for troubleshooting.

You can leave out the -fpic if you're compiling a static library, or main executable. You can leave out the -g if you're going to throw away the source.

I don't really care if you use -fPIC instead, as long as you always use one of them in shared libraries and other dynamically loaded objects.