On Sun, May 14, 2006 at 11:32:13AM +0200, Kevin F. Quinn (Gentoo) wrote:
[...]
> In summary, for Duncan's issue I suggest adding:
> 
> # Xorg server is unaviodably suid with lazy bindings
> RESTRICT="stricter" 
> 
> to the xorg-server ebuild to stop it dying for people with
> FEATURES=stricter (the comment helps people who have enabled STRICTER
> to see why it's disabled, in case anything else crops up) and also to
> add:
> 
> filter-ldflags -Wl,-z,now
> 
> to the eclass (perhaps in x-modular_src_compile, or in both
> x-modular_src_config and x-modular_src_make). If you do it just on the
> xorg-server ebuild, and people do what Duncan did and set LDFLAGS in
> make.conf, it'll set BIND_NOW on everything which at the very least
> will cause the radeon and GL drivers to fail to load.

The idea of filter-ldflags is a bad one, IMO. There are an infinite
number of ways to enable a flag (for -z now: -Wl,-z,now;
 -Wl,-z -Wl,now; -Xlinker -z -Xlinker -now; -Wl,-O1,-z,now; ...). Even
if you restrict yourself to the sane ones, you can't reasonably catch
them all. Normally, the proper fix would be
 `append-ldflags -Wl,-z,nonow`, but as binutils completely ignores this,
that's not going to work either (as also noted earlier). I think the
only sane thing to do (treating -Wl,-z,now -Wl,-O1 differently from
-Wl,-z,now,-O1 is not sane) is to give a warning message telling users
not to enable -z now even if portage states otherwise. Ideally, binutils
would also be patched to support -z nonow, and -Wl,-z,nonow would be
appended to LDFLAGS, but that's something for later concern.
-- 
gentoo-dev@gentoo.org mailing list

Reply via email to