Closed p-kraszewski closed 6 years ago
Thanks! I'm confused as to why a "hardened" gcc wouldn't want PIE.
Oh, it's the other way around. Hardened GCC wants PIC in so many places, that it can't be easily fulfilled due to conflicts between 32/64 bits and that's why you want to disable PIE (which effectively disables hardened path). I had the same situation with Haskell/stack on Ubuntu 16.10 - it refused to compile with quite the similar error. That's what pointed me in the right direction with Rust/IntermezzOS.
If compilation gives something like:
this is due to hardened compiler chain: at least on Hardened-Gentoo and Ubuntu 16.10+.
To fix it, you need to change
x86_64-unknown-intermezzos-gnu.json
by adding"-no-pie"
to"pre-link-args"
. This will disable hardening for the project.Hope this helps!