[ANNOUNCE] xorg-server 1.7.5.901
Dan Nicholson
dbn.lists at gmail.com
Fri Mar 5 08:45:56 PST 2010
On Fri, Mar 5, 2010 at 8:15 AM, Alan Coopersmith
<Alan.Coopersmith at sun.com> wrote:
> Dan Nicholson wrote:
>> Is X at least linked to the right libraries? If not, then I think what
>> we need to do is add them Xext/libXextmodule.la. Something like the
>> attached patch should work, but I'm not sure it's the right thing.
>
> I've been carrying around some similar patches in our builds to add library
> linking to the modules (not libselinux of course, but others) to resolve
> symbols since we build most of the drivers with -z defs to catch missing
> symbol errors at build time instead of runtime, and the modules they link
> against thus need to resolve their symbols. I've been slacking on
> upstreaming it, but it hasn't seemed to cause any problems in the several
> years we've had it. (The -R path is to handle our multilib layout, and
> that part is definitely Solaris-specific.)
>
> --- hw/xfree86/dixmods/Makefile.am 2009-05-08 17:45:57.848078000 -0700
> +++ hw/xfree86/dixmods/Makefile.am 2009-05-08 17:46:07.162324000 -0700
> @@ -36,6 +36,7 @@ libdbe_la_SOURCES = dbemodule.c
>
> libfb_la_LDFLAGS = -avoid-version
> libfb_la_LIBADD = $(top_builddir)/fb/libfb.la
> +libfb_la_LIBADD += -lpixman-1
> libfb_la_SOURCES = $(top_builddir)/fb/fbcmap_mi.c fbmodule.c
> libfb_la_CFLAGS = $(AM_CFLAGS)
>
> @@ -47,6 +48,8 @@ libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACC
> libglx_la_LDFLAGS = -avoid-version -mimpure-text
> if AIGLX
> GLXDRI_LIBRARY = $(top_builddir)/glx/libglxdri.la
> +libglx_la_LDFLAGS += -R$(extsmoduledir:amd64/extensions=extensions/amd64)
> +libglx_la_LDFLAGS += -Wl,-N,libdri.so -Wl,-N,libdri2.so
> endif
> libglx_la_LIBADD = \
> $(top_builddir)/glx/libglx.la \
> diff -urp -x '*~' -x '*.orig' hw/xfree86/int10/Makefile.am
> hw/xfree86/int10/Makefile.am
> --- hw/xfree86/int10/Makefile.am 2007-10-17 07:01:23.000000000 -0700
> +++ hw/xfree86/int10/Makefile.am 2009-05-08 17:46:07.162854000 -0700
> @@ -42,3 +42,5 @@ libint10_la_SOURCES = stub.c xf86int10mo
> endif
>
> EXTRA_DIST = xf86x86emu.h INT10.HOWTO
> +
> +libint10_la_LIBADD = $(PCIACCESS_LIBS)
>
> There's also a bunch to add a ton of -l flags to every driver too, but full
> -z defs linking of those relies on us building a linker mapfile in our builds
> that lists the symbols exported from the Xorg binary so that the linker can
> record those as resolved already, and I've not checked to see if the way I've
> done that is portable at all. An example of just adding the -l flags:
> http://src.opensolaris.org/source/xref/x-cons/xnv-clone/open-src/driver/xf86-video-intel/libraries.patch
Yeah, this seems like a good idea. Just for sanity's sake, we should
be doing the LIBADD at the level where the symbols are actually used
instead of just piling a bunch of libraries onto the ddx. libtool will
take care of pulling together the correct linking for us. I've been
thinking about this for a while, but wading into the
XORG_LIBS/XSERVER_LIBS/XSERVER_SYS_LIBS/X_PLEASE_GIVE_ME_A_HOME_LIBS
quagmire doesn't seem like a fun way to spend my time.
If I had to guess, Arkadiusz's issue is that he is linking with
--as-needed, and the linker throws out -lselinux because Xorg doesn't
actually need it. If the linking was done on libextmod.la, it would
match to the actual symbols used.
--
Dan
More information about the xorg-devel
mailing list