lua-users home
lua-l archive

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


2013/12/7 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
>> BTW, I would love to see lua in an amalgamated version
>
> See this message of exactly 2 years ago:
>         http://lua-users.org/lists/lua-l/2011-12/msg00249.html
>
> You'll need to provide your own compilation and link flags, e.g.:
>         cc -O2 -DLUA_USE_LINUX one.c -lm -ldl -lreadline -Wl,-E
>
> See src/Makefile in the distribution for those.

With that command line, I get an executable of 204406 bytes on
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5).

With `make linux`, it's 214894 bytes.

I guessed the difference is 5.1 compatibility. So:

cc -O2 -DLUA_USE_LINUX -DLUA_COMPAT_ALL one.c -lm -ldl -lreadline -Wl,-E

Now the excutable is 204637 bytes. So that's not it.