[PATCH v2 3/3] xfree86: Remove libxorg convenience library to speed up build

Dan Nicholson dbn.lists at gmail.com
Tue Jun 14 23:02:15 PDT 2011


libxorg.la served to collect all the Xorg convenience libraries into one
massive archive to link into Xorg. This made things easy for symbol
resolution, but it tremendously slowed down the build since each change
caused libxorg.la to be rebuilt. This is an extremely slow process of
extracting all the objects from the sub-libraries and recombining them.

Instead, the archives are linked directly into Xorg. The order of the
libraries had to be tweaked a bit to make symbols resolve correctly with
the lower level code moving later in the link command.

Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
---
 hw/xfree86/Makefile.am |   16 ++++++----------
 test/Makefile.am       |    1 -
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 6580e8d..67c8773 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -44,13 +44,12 @@ AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
 INCLUDES = $(XORG_INCS) -I$(srcdir)/parser -I$(top_srcdir)/miext/cw \
 	-I$(srcdir)/ddc -I$(srcdir)/i2c -I$(srcdir)/modes -I$(srcdir)/ramdac
 
-noinst_LTLIBRARIES = libxorg.la
-libxorg_la_SOURCES =
-libxorg_la_LIBADD = \
+Xorg_LDADD = \
+            $(MAIN_LIB) \
             $(XSERVER_LIBS) \
             loader/libloader.la \
-            os-support/libxorgos.la \
             common/libcommon.la \
+            os-support/libxorgos.la \
             parser/libxf86config_internal.la \
             dixmods/libdixmods.la \
             modes/libxf86modes.la \
@@ -58,14 +57,11 @@ libxorg_la_LIBADD = \
             ddc/libddc.la \
             i2c/libi2c.la \
             dixmods/libxorgxkb.la \
+            $(XORG_LIBS) \
             $(top_builddir)/mi/libmi.la \
             $(top_builddir)/os/libos.la \
-            @XORG_LIBS@
-
-libxorg_la_DEPENDENCIES = $(libxorg_la_LIBADD)
-
-Xorg_DEPENDENCIES = libxorg.la
-Xorg_LDADD = $(MAIN_LIB) libxorg.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS)
+            $(XORG_SYS_LIBS) \
+            $(XSERVER_SYS_LIBS)
 
 Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
 
diff --git a/test/Makefile.am b/test/Makefile.am
index 04c255b..370e09a 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -37,7 +37,6 @@ libxservertest_la_LIBADD = \
             $(top_builddir)/hw/xfree86/ddc/libddc.la \
             $(top_builddir)/hw/xfree86/i2c/libi2c.la \
             $(top_builddir)/hw/xfree86/dixmods/libxorgxkb.la \
-            $(top_builddir)/hw/xfree86/libxorg.la \
             $(top_builddir)/mi/libmi.la \
             $(top_builddir)/os/libos.la \
             @XORG_LIBS@
-- 
1.7.3.4



More information about the xorg-devel mailing list