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

Dan Nicholson dbn.lists at gmail.com
Tue Jun 14 20:20:35 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 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index b6264db..a36d997 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -46,13 +46,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 \
@@ -60,14 +59,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)
 
-- 
1.7.3.4



More information about the xorg-devel mailing list