[lttng-dev] [PATCH] Fix linker library order

Alexandre Montplaisir alexmonthy at voxpopuli.im
Tue May 14 16:51:01 EDT 2013


On 13-05-14 01:38 PM, Simon Marchi wrote:
> [...]
>
> If you read carefully the log sent by Alexandre, you see that it is
> when building the shared libs in this directory
> (lttng-ust-provider-ust-tests-demo.so) that the build fails. I don't
> know why it fails, but Alexandre hinted that passing "-fPIE -pie" to
> build a shared library is weird (it is usually -fPIC -pic). I am not
> sure where that comes from. This behaviour only happens when building
> the package, not when building manually.

We build the daily packages with all Debian security options (this is
kind of a future-proofing to find problems like this one, I don't think
the "real" Debian packages use it).

See
http://wiki.debian.org/Hardening#DEB_BUILD_HARDENING_PIE_.28gcc.2Fg.2B-.2B-_-fPIE_-pie.29

So far it handled the autotools-powered Makefiles correctly (libraries
are built with -fPIC, binaries with -fPIE), but it seems to cause
problems with hand-written Makefiles like the one in doc/examples/demo.

We could fix it with a package-specific patch, either by using autotools
to build this directory, or maybe not building it at all, since it's
just an example that we don't install...


Thanks all,
Alex



More information about the lttng-dev mailing list