blt / port_compiler

A rebar3 port compiler
MIT License
65 stars 38 forks source link

Possibly missing `-fPIC` linker option #75

Open davisp opened 2 years ago

davisp commented 2 years ago

I had an interesting bug report in davisp/jiffy#208 that I think looks like an edge case issue with the default linker flags. I don't claim to be an expert on compiler and linker flags but the end question was:

However, the real question is: why does rebar add -fPIC during build but not during link? I think this is something that should be fixed at the level of rebar itself, not in individual packages.

Obviously I could always add -fPIC to Jiffy's linker options but it seemed like if it really is a missing option it'd be better to have it fixed in port_compiler itself.

A direct link to the failed build and follow up discussion can be found here:

https://patchwork.ozlabs.org/project/buildroot/patch/20201224101440.3427472-1-fontaine.fabrice@gmail.com/