How to disable compiler library link options (-lc -lgcc -lm)

classic Classic list List threaded Threaded
3 messages Options
varunwell10 varunwell10
Reply | Threaded
Open this post in threaded view
|

How to disable compiler library link options (-lc -lgcc -lm)

Hello eLua community,

I am porting eLua to new architecture and board. The compiler tool-chain doesn't have direct newlib/libc support [i.e. library files are also not available].
I have made some dirty hack to make tool-chain work and all sources are compiling and linking as well to create an ELF (a dummy one just to check if build process works fine)

During linking:
"-lc -lgcc -lm" options are generated by eLua build automatically which breaks the link process. However, when I remove these, linking process is going fine.

Can you please suggest how to disable these link options?

BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: How to disable compiler library link options (-lc -lgcc -lm)

Hi,

Each platform adds these libraries if it needs them, see for example https://github.com/elua/elua/blob/master/src/platform/stm32/conf.lua#L22. Your platform probably has its own conf.lua, so it should be enough to remove this line from your conf.lua
varunwell10 varunwell10
Reply | Threaded
Open this post in threaded view
|

Re: How to disable compiler library link options (-lc -lgcc -lm)

BogdanM wrote
Hi,

Each platform adds these libraries if it needs them, see for example https://github.com/elua/elua/blob/master/src/platform/stm32/conf.lua#L22. Your platform probably has its own conf.lua, so it should be enough to remove this line from your conf.lua
Awesome! it worked... thanks so very much. build process is now up! elf gets generated by command:
lua.exe build_elua.lua board=triboard-aurix1gtc2x5 target=lualong allocator=simple

=> Now I have to get basic startup routine up and running. If there are other questions, would expect some support to get hints.
Thanks again!