Bug#909396: systemd: FTBFS on hppa and x32 - relocation can not be used when making a shared object

John David Anglin dave.anglin at bell.net
Mon Nov 26 13:34:27 GMT 2018


On 2018-11-18 3:08 p.m., Michael Biebl wrote:
>> It's not at all clear how we get
>> both the -fPIE and -fPIC
>> options in various compilations.  The don't seem to be explicitly
>> specified in the systemd
>> package.  Do you know?
> Unfortunately not. You could talk to Jussi Pakkanen, our meson
> maintainer and upstream of meson, maybe he can help here.
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

This is a highly questionable method of enabling PIE support in the 
presence of files
where -fPIC may be used.  It also adds -pie to link commands with -shared.

Since 0.49.0, meson has a b_pie option.  Another option that is relevant 
here is b_staticpic.
I don't know if they can work together.

It looks like the merging fix in gcc will be backported to gcc-8.

As a work around, you could disable LTO on hppa by setting 'b_lto=false' 
in debian/rules.

Dave

-- 
John David Anglin  dave.anglin at bell.net



More information about the Pkg-systemd-maintainers mailing list