[pulseaudio-discuss] Enabling --as-needed by default?
tanuk at iki.fi
Tue Mar 13 08:27:14 PDT 2012
On Mon, 2012-03-12 at 17:26 +0000, Colin Guthrie wrote:
> 'Twas brillig, and Tanu Kaskinen at 12/03/12 17:01 did gyre and gimble:
> > The recent build problems introduced me to the --as-needed linker
> > option. The as-needed behavior sounds sensible to me, so I wonder why we
> > don't use it by default?
> Mostly due to Lennart not liking it IIRC (or was that -Wl,no-undefined?)
> All of our distro packages are build with as-needed and no-undefined
> options anyway (via various libtool hacks IIRC) and can be disabled on a
> per-package basis via some macros.
> So generally speaking I'm in favour of this if at all possible.
> (I've personally had --as-needed option disabled in my packages despite
> distro policy for years as it caused issues long ago and I never
> actually turned it back on!)
I interpret this thread so that --as-needed and --no-undefined are
not used, because they can't be used with the cyclical library setup
that we have (or had, until  added (some of) the duplication back).
The libraries were set up like they are because Lennart wanted to avoid
compiling stuff twice. Now we have broken that goal by adding some
libpulse stuff also to libpulsecommon.
So, what to do? Currently both --as-needed and --no-undefined seem to
work, which is nice. OTOH, we compile some stuff twice, which is not so
nice. There haven't been any complaints about the duplication, but there
was a complaint immediately after breaking --as-needed (and
coincidentally also a bug report about 0.9.23 not building either for
the same reason). My feeling is that the duplication isn't too severe,
and we should build with --as-needed and --no-undefined, because the
only reason to avoid them seemed to be that they just couldn't be used,
but now that has changed. If there are other arguments against the
flags, I'd like to learn about them.
More information about the pulseaudio-discuss