On Sat, Nov 24, 2018 at 6:09 PM John David Anglin <dave.ang...@bell.net> wrote:
> My understanding is -fPIE should be used when creating objects for a > PIE executable. -fPIC should be used when creating objects for a shared > library. Only one is recorded when -flto is specified. I reviewed the code and we only add -fPIE arguments when building executables. The discussion on the other bug seems to support this: ------------- Most of the problem is in systemd's top meson.build file: # the oss-fuzz fuzzers are not built with -fPIE, so don't # enable it when we are linking against them if not fuzzer_build possible_cc_flags += '-fPIE' possible_link_flags += '-pie' endif ------------ Thus it would seem that this is not a bug in Meson, but instead in systemd's build setup as the pie arguments are added by the latter.