xserver: Branch 'master' - 4 commits

Keith Packard keithp at kemper.freedesktop.org
Mon Jul 2 12:36:37 PDT 2012


 configure.ac                |   20 ++++++++++++++++++++
 dix/dixfonts.c              |    9 +++++++++
 hw/xfree86/Makefile.am      |    6 +++---
 hw/xfree86/dri/Makefile.am  |    2 +-
 hw/xfree86/dri2/Makefile.am |    2 +-
 hw/xfree86/i2c/Makefile.am  |    5 +----
 hw/xfree86/xaa/Makefile.am  |    3 ++-
 include/dixfont.h           |   13 +++++++------
 8 files changed, 44 insertions(+), 16 deletions(-)

New commits:
commit 4cd91bd4c6325b2e617ca90a725f02ac124c2372
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sat May 12 10:11:33 2012 -0700

    Enable no-undefined symbols mode in Solaris builds if -z parent is in ld
    
    The Solaris linker recently added a -z parent flag for easier checking
    of symbol definitions in plugins against the program that loads them.
    If that's present, this enables it, along with -z defs to error on
    undefined symbols to alert us if any modules call symbols that won't
    be found at runtime.
    
    This builds upon, and requires, the recent Cygwin work to build Xorg.
    It moves a couple more modules to be after the Xorg binary in the build
    order so that they can find the binary to check against, much as the
    Cygwin changes did (these would be modules built on Solaris but not
    Cygwin).
    
    v2: This version only sets the flags for the xorg-server build itself,
    and does not yet export them in xorg-server.pc to the drivers, since
    most of the drivers are not ready to build with -no-undefined yet.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

diff --git a/configure.ac b/configure.ac
index 7576dae..d5ddf6e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1499,6 +1499,26 @@ case "$host_os" in
 	XORG_DRIVER_LIBS="-lXorg.exe -L\${moduledir} -lshadow -lfb -no-undefined"
 	CYGWIN=yes
 	;;
+    solaris*)
+	# We use AC_LINK_IFELSE to generate a temporary program conftest$EXEEXT
+	# that we can link against for testing if the system linker is new
+	# enough to support -z parent=<program> for verifying loadable modules
+	# are only calling functions defined in either the loading program or
+	# the libraries they're linked with.
+	AC_LINK_IFELSE(
+	    [AC_LANG_SOURCE([int main(int argc, char **argv) { return 0; }])],
+	    [mv conftest$EXEEXT conftest.parent
+	     XORG_CHECK_LINKER_FLAGS([-Wl,-z,parent=conftest.parent -G],
+		[LD_NO_UNDEFINED_FLAG="-Wl,-z,defs -Wl,-z,parent=\$(top_builddir)/hw/xfree86/Xorg"
+# Not set yet, since this gets exported in xorg-server.pc to all the drivers,
+# and they're not all fixed to build correctly with it yet.
+#		 XORG_DRIVER_LIBS="-Wl,-z,defs -Wl,-z,parent=${bindir}/Xorg"
+         ],[],
+		[AC_LANG_SOURCE([extern int main(int argc, char **argv);
+			int call_main(void) { return main(0, NULL); }])])
+	     rm -f conftest.parent
+	    ])
+	;;
 esac
 AC_SUBST([LD_EXPORT_SYMBOLS_FLAG])
 AC_SUBST([LD_NO_UNDEFINED_FLAG])
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index e50cb88..4d5d576 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -26,9 +26,9 @@ INT10_SUBDIR = int10
 endif
 
 SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \
-	  ramdac $(VBE_SUBDIR) $(VGAHW_SUBDIR) $(XAA_SUBDIR) \
-	  loader modes . i2c dixmods fbdevhw shadowfb exa \
-	  $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) doc man
+	  ramdac $(VGAHW_SUBDIR) loader modes . $(VBE_SUBDIR) \
+	  $(XAA_SUBDIR) $(DRI_SUBDIR) $(DRI2_SUBDIR) i2c dixmods \
+	  fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man
 
 DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
                parser ramdac shadowfb vbe vgahw xaa \
commit d31942e15c619e9355ef8183223f9165902a9d56
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sat May 12 10:10:49 2012 -0700

    Add pixman to module dependencies for pixman_region_* functions
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

diff --git a/hw/xfree86/dri/Makefile.am b/hw/xfree86/dri/Makefile.am
index 194cf8e..9528d53 100644
--- a/hw/xfree86/dri/Makefile.am
+++ b/hw/xfree86/dri/Makefile.am
@@ -13,7 +13,7 @@ libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \
                    @LIBDRM_CFLAGS@ \
                    @DRI_CFLAGS@
 libdri_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
-libdri_la_LIBADD = @LIBDRM_LIBS@
+libdri_la_LIBADD = @LIBDRM_LIBS@ $(PIXMAN_LIBS)
 libdri_ladir = $(moduledir)/extensions
 libdri_la_SOURCES = \
 	dri.c \
diff --git a/hw/xfree86/dri2/Makefile.am b/hw/xfree86/dri2/Makefile.am
index 0e40fbc..390ed12 100644
--- a/hw/xfree86/dri2/Makefile.am
+++ b/hw/xfree86/dri2/Makefile.am
@@ -7,7 +7,7 @@ libdri2_la_CFLAGS = \
 	-I$(top_srcdir)/hw/xfree86/os-support/bus
 
 libdri2_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
-libdri2_la_LIBADD = @LIBDRM_LIBS@
+libdri2_la_LIBADD = @LIBDRM_LIBS@ $(PIXMAN_LIBS)
 libdri2_ladir = $(moduledir)/extensions
 libdri2_la_SOURCES = \
 	dri2.c \
diff --git a/hw/xfree86/xaa/Makefile.am b/hw/xfree86/xaa/Makefile.am
index f6480a7..5614d72 100644
--- a/hw/xfree86/xaa/Makefile.am
+++ b/hw/xfree86/xaa/Makefile.am
@@ -11,8 +11,9 @@ POLYSEG = s-xaaLine.c s-xaaDashLine.c
 if XAA
 
 libxaa_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
+libxaa_la_LIBADD = $(PIXMAN_LIBS)
 if COMPOSITE
-libxaa_la_LIBADD = $(top_builddir)/miext/cw/libcw.la
+libxaa_la_LIBADD += $(top_builddir)/miext/cw/libcw.la
 endif
 
 module_LTLIBRARIES = libxaa.la
commit 339f38ef380d750c4c7afd60331a559845e4184e
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sat May 12 10:09:41 2012 -0700

    Build tda9885.c functions into fi1236 to avoid libtool relinking problems
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

diff --git a/hw/xfree86/i2c/Makefile.am b/hw/xfree86/i2c/Makefile.am
index f08541c..cb18db1 100644
--- a/hw/xfree86/i2c/Makefile.am
+++ b/hw/xfree86/i2c/Makefile.am
@@ -25,10 +25,7 @@ bt829_drv_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
 bt829_drv_la_SOURCES = bt829.c bt829.h bt829_module.c
 
 fi1236_drv_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
-fi1236_drv_la_SOURCES = fi1236.c fi1236.h fi1236_module.c
-if NO_UNDEFINED
-fi1236_drv_la_LIBADD = tda9885_drv.la
-endif
+fi1236_drv_la_SOURCES = fi1236.c fi1236.h fi1236_module.c tda9885.c
 
 msp3430_drv_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
 msp3430_drv_la_SOURCES = msp3430.c msp3430.h msp3430_module.c
commit a00066d2916b6910429cc1c7feedafbaee0d4750
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Thu Jun 28 15:15:53 2012 -0700

    Add dixGetGlyphs to replace GetGlyphs from libXfont to simplify linking
    
    No other Xfont consumer used it, and this saves us from having to link
    callers against libXfont for one simple function when doing
    -no-undefined symbols builds.
    
    The function is given a new name to avoid clashing with existing libXfont
    binaries, but a #define is provided to preserve the API so we don't have
    to fix all the callers at the same time.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 19fd31e..dd93311 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -115,6 +115,15 @@ LoadGlyphs(ClientPtr client, FontPtr pfont, unsigned nchars, int item_size,
         return Successful;
 }
 
+void
+dixGetGlyphs(FontPtr font, unsigned long count, unsigned char *chars,
+             FontEncoding fontEncoding,
+             unsigned long *glyphcount,    /* RETURN */
+             CharInfoPtr *glyphs)          /* RETURN */
+{
+    (*font->get_glyphs) (font, count, chars, fontEncoding, glyphcount, glyphs);
+}
+
 /*
  * adding RT_FONT prevents conflict with default cursor font
  */
diff --git a/include/dixfont.h b/include/dixfont.h
index 9333041..3d09eb5 100644
--- a/include/dixfont.h
+++ b/include/dixfont.h
@@ -117,12 +117,13 @@ extern _X_EXPORT void FreeFonts(void);
 
 extern _X_EXPORT FontPtr find_old_font(XID /*id */ );
 
-extern _X_EXPORT void GetGlyphs(FontPtr /*font */ ,
-                                unsigned long /*count */ ,
-                                unsigned char * /*chars */ ,
-                                FontEncoding /*fontEncoding */ ,
-                                unsigned long * /*glyphcount */ ,
-                                CharInfoPtr * /*glyphs */ );
+#define GetGlyphs dixGetGlyphs
+extern _X_EXPORT void dixGetGlyphs(FontPtr /*font */ ,
+                                   unsigned long /*count */ ,
+                                   unsigned char * /*chars */ ,
+                                   FontEncoding /*fontEncoding */ ,
+                                   unsigned long * /*glyphcount */ ,
+                                   CharInfoPtr * /*glyphs */ );
 
 extern _X_EXPORT void QueryGlyphExtents(FontPtr /*pFont */ ,
                                         CharInfoPtr * /*charinfo */ ,


More information about the xorg-commit mailing list