[pulseaudio-discuss] Enabling --as-needed by default?
arun.raghavan at collabora.co.uk
Wed Mar 14 21:56:36 PDT 2012
On Tue, 2012-03-13 at 19:38 +0000, Colin Guthrie wrote:
> 'Twas brillig, and Tanu Kaskinen at 13/03/12 15:27 did gyre and gimble:
> > 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.
> >  http://lists.freedesktop.org/archives/pulseaudio-discuss/2008-October/002402.html
> >  http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/Makefile.am?id=2de2c735c937c6724c14656acf01ce90f122b903
> Well if we add stuff in both libs, does the linker remove the duplicated
> stuff from the final build? If so, then perhaps the size of the install
> would be a factor for some of the embedded folks? You'll likely know
> more than me here and I suspect the size difference is minimal, but of
> course it could also translate into memory use during runtime too
> perhaps? I won't pretend to understand the intricate details of this!
Just to add to this, I'd like to defer this to post-2.0 to avoid any
last-minute build regressions.
More information about the pulseaudio-discuss