From 7d5c8a12cbc295b3e33e1b60bd7330e2bc93a966 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Tue, 14 Jun 2011 17:21:48 -0700 Subject: [PATCH 1/3] Don't use empty source files When an empty _SOURCES variable is declared, automake will recognize that only linking is needed. Signed-off-by: Dan Nicholson Tested-by: Jamey Sharp Reviewed-by: Daniel Stone Tested-by: Peter Hutterer --- dix/.gitignore | 1 - dix/Makefile.am | 6 ++---- hw/xfree86/.gitignore | 2 -- hw/xfree86/Makefile.am | 11 +++-------- hw/xfree86/os-support/.gitignore | 2 -- hw/xfree86/os-support/Makefile.am | 7 +------ os/.gitignore | 2 -- os/Makefile.am | 6 +----- test/.gitignore | 1 - test/Makefile.am | 6 +----- 10 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 hw/xfree86/os-support/.gitignore delete mode 100644 os/.gitignore diff --git a/dix/.gitignore b/dix/.gitignore index 63ee76774c..c1b4f206b0 100644 --- a/dix/.gitignore +++ b/dix/.gitignore @@ -1,3 +1,2 @@ # Add & Override for this directory and it's subdirectories -dix.c Xserver-dtrace.h diff --git a/dix/Makefile.am b/dix/Makefile.am index 5435546692..f5af619e35 100644 --- a/dix/Makefile.am +++ b/dix/Makefile.am @@ -64,11 +64,9 @@ dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS) noinst_PROGRAMS = dix.O +dix_O_SOURCES = dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS) $(AM_V_GEN)ld -r -o $@ $(am_libdix_la_OBJECTS:%.lo=.libs/%.o) endif -dix.c: - touch $@ - -CLEANFILES = dix.c Xserver-dtrace.h +CLEANFILES = Xserver-dtrace.h diff --git a/hw/xfree86/.gitignore b/hw/xfree86/.gitignore index 2ddca49e3b..f9b3f4a9fe 100644 --- a/hw/xfree86/.gitignore +++ b/hw/xfree86/.gitignore @@ -1,4 +1,2 @@ -libxorg.c Xorg -xorg.c xorg.conf.example diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am index f1a759a279..697571e7f0 100644 --- a/hw/xfree86/Makefile.am +++ b/hw/xfree86/Makefile.am @@ -38,13 +38,13 @@ DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ utils doc man bin_PROGRAMS = Xorg -Xorg_SOURCES = xorg.c +Xorg_SOURCES = AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ INCLUDES = @XORG_INCS@ noinst_LTLIBRARIES = libxorg.la -libxorg_la_SOURCES = libxorg.c +libxorg_la_SOURCES = libxorg_la_LIBADD = \ $(XSERVER_LIBS) \ loader/libloader.la \ @@ -63,18 +63,13 @@ libxorg_la_LIBADD = \ libxorg_la_DEPENDENCIES = $(libxorg_la_LIBADD) -libxorg.c xorg.c: - touch $@ - -DISTCLEANFILES = libxorg.c xorg.c - Xorg_DEPENDENCIES = libxorg.la Xorg_LDADD = $(MAIN_LIB) libxorg.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) BUILT_SOURCES = xorg.conf.example -DISTCLEANFILES += xorg.conf.example +DISTCLEANFILES = xorg.conf.example EXTRA_DIST = xorgconf.cpp if SPECIAL_DTRACE_OBJECTS diff --git a/hw/xfree86/os-support/.gitignore b/hw/xfree86/os-support/.gitignore deleted file mode 100644 index f2206cdd23..0000000000 --- a/hw/xfree86/os-support/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Add & Override for this directory and it's subdirectories -xorgos.c diff --git a/hw/xfree86/os-support/Makefile.am b/hw/xfree86/os-support/Makefile.am index 3af4328ffb..348b7ffec5 100644 --- a/hw/xfree86/os-support/Makefile.am +++ b/hw/xfree86/os-support/Makefile.am @@ -9,18 +9,13 @@ EXTRA_DIST = int10Defines.h xf86OSpriv.h # as one library, otherwise libtool will actively defeat your attempts to # list them multiple times on the link line. noinst_LTLIBRARIES = libxorgos.la -libxorgos_la_SOURCES = xorgos.c +libxorgos_la_SOURCES = libxorgos_la_LIBADD = @XORG_OS_SUBDIR@/lib@XORG_OS_SUBDIR@.la \ bus/libbus.la \ misc/libmisc.la AM_CFLAGS = $(DIX_CFLAGS) -xorgos.c: - touch $@ - -DISTCLEANFILES = xorgos.c - # FIXME: These don't seem to be used anywhere EXTRA_DIST += \ shared/bios_devmem.c diff --git a/os/.gitignore b/os/.gitignore deleted file mode 100644 index 74b1d142c8..0000000000 --- a/os/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Add & Override for this directory and it's subdirectories -os.c diff --git a/os/Makefile.am b/os/Makefile.am index 91ca110f44..ef9ecddcf3 100644 --- a/os/Makefile.am +++ b/os/Makefile.am @@ -51,11 +51,7 @@ dtrace.o: $(top_srcdir)/dix/Xserver.d $(am_libos_la_OBJECTS) noinst_PROGRAMS = os.O +os_O_SOURCES = os.O: dtrace.o $(am_libos_la_OBJECTS) $(AM_V_GEN)ld -r -o $@ dtrace.o .libs/*.o endif - -os.c: - touch $@ - -CLEANFILES = os.c diff --git a/test/.gitignore b/test/.gitignore index 48e8abe24b..0e1ed4219e 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -1,4 +1,3 @@ -libxservertest.c xkb input xtest diff --git a/test/Makefile.am b/test/Makefile.am index 5574e7d1e6..29e483a263 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -21,6 +21,7 @@ list_LDADD=$(TEST_LDADD) misc_LDADD=$(TEST_LDADD) fixes_LDADD=$(TEST_LDADD) +libxservertest_la_SOURCES = libxservertest_la_LIBADD = \ $(XSERVER_LIBS) \ $(top_builddir)/hw/xfree86/loader/libloader.la \ @@ -39,8 +40,3 @@ libxservertest_la_LIBADD = \ @XORG_LIBS@ endif endif - -CLEANFILES=libxservertest.c - -libxservertest.c: - touch $@ From 6259b30111f568ec3d1b32dc6382bce46d8e6ccc Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Tue, 14 Jun 2011 19:47:02 -0700 Subject: [PATCH 2/3] xfree86: Move sdksyms generation to ddx toplevel The symbols in sdksyms.c cover the entire source tree. In order to make them resolve when libxorg.la goes away, move the objects from libloader to Xorg. Unfortunately, this means sdksyms needs to get built again for the test code. Signed-off-by: Dan Nicholson Tested-by: Jamey Sharp Reviewed-by: Daniel Stone Tested-by: Peter Hutterer --- hw/xfree86/.gitignore | 2 ++ hw/xfree86/Makefile.am | 14 ++++++++++++-- hw/xfree86/loader/.gitignore | 3 --- hw/xfree86/loader/Makefile.am | 14 +------------- hw/xfree86/{loader => }/sdksyms.sh | 0 test/Makefile.am | 7 +++++-- 6 files changed, 20 insertions(+), 20 deletions(-) delete mode 100644 hw/xfree86/loader/.gitignore rename hw/xfree86/{loader => }/sdksyms.sh (100%) diff --git a/hw/xfree86/.gitignore b/hw/xfree86/.gitignore index f9b3f4a9fe..997a94efec 100644 --- a/hw/xfree86/.gitignore +++ b/hw/xfree86/.gitignore @@ -1,2 +1,4 @@ Xorg xorg.conf.example +sdksyms.c +sdksyms.dep diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am index 697571e7f0..6580e8d8c8 100644 --- a/hw/xfree86/Makefile.am +++ b/hw/xfree86/Makefile.am @@ -38,10 +38,11 @@ DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ utils doc man bin_PROGRAMS = Xorg -Xorg_SOURCES = +nodist_Xorg_SOURCES = sdksyms.c AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ -INCLUDES = @XORG_INCS@ +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 = @@ -111,3 +112,12 @@ xorg.conf.example: xorgconf.cpp relink: $(AM_V_at)rm -f Xorg && $(MAKE) Xorg + +CLEANFILES = sdksyms.c sdksyms.dep +EXTRA_DIST += sdksyms.sh + +sdksyms.dep sdksyms.c: sdksyms.sh + CPP='$(CPP)' AWK='$(AWK)' $(srcdir)/sdksyms.sh $(top_srcdir) $(CFLAGS) $(AM_CFLAGS) $(INCLUDES) + +SDKSYMS_DEP = sdksyms.dep +include $(SDKSYMS_DEP) diff --git a/hw/xfree86/loader/.gitignore b/hw/xfree86/loader/.gitignore deleted file mode 100644 index 6b38d9ea9e..0000000000 --- a/hw/xfree86/loader/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Add & Override for this directory and it's subdirectories -sdksyms.c -sdksyms.dep diff --git a/hw/xfree86/loader/Makefile.am b/hw/xfree86/loader/Makefile.am index 0e5b304a45..ebe0c813a1 100644 --- a/hw/xfree86/loader/Makefile.am +++ b/hw/xfree86/loader/Makefile.am @@ -9,11 +9,7 @@ AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) EXTRA_DIST = \ loader.h \ - loaderProcs.h \ - sdksyms.sh - -nodist_libloader_la_SOURCES = \ - sdksyms.c + loaderProcs.h libloader_la_SOURCES = \ loader.c \ @@ -23,11 +19,3 @@ libloader_la_SOURCES = \ os.c libloader_la_LIBADD = $(DLOPEN_LIBS) - -CLEANFILES = sdksyms.c sdksyms.dep - -sdksyms.dep sdksyms.c: sdksyms.sh $(top_builddir)/include/do-not-use-config.h - CPP='$(CPP)' AWK='$(AWK)' $(srcdir)/sdksyms.sh $(top_srcdir) $(AM_CFLAGS) $(CFLAGS) $(INCLUDES) - -SDKSYMS_DEP = sdksyms.dep -include $(SDKSYMS_DEP) diff --git a/hw/xfree86/loader/sdksyms.sh b/hw/xfree86/sdksyms.sh similarity index 100% rename from hw/xfree86/loader/sdksyms.sh rename to hw/xfree86/sdksyms.sh diff --git a/test/Makefile.am b/test/Makefile.am index 29e483a263..04c255b683 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -7,7 +7,10 @@ check_LTLIBRARIES = libxservertest.la TESTS=$(noinst_PROGRAMS) AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ -INCLUDES = @XORG_INCS@ +INCLUDES = $(XORG_INCS) -I$(top_srcdir)/hw/xfree86/parser \ + -I$(top_srcdir)/miext/cw -I$(top_srcdir)/hw/xfree86/ddc \ + -I$(top_srcdir)/hw/xfree86/i2c -I$(top_srcdir)/hw/xfree86/modes \ + -I$(top_srcdir)/hw/xfree86/ramdac TEST_LDADD=libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) if SPECIAL_DTRACE_OBJECTS @@ -21,7 +24,7 @@ list_LDADD=$(TEST_LDADD) misc_LDADD=$(TEST_LDADD) fixes_LDADD=$(TEST_LDADD) -libxservertest_la_SOURCES = +nodist_libxservertest_la_SOURCES = $(top_builddir)/hw/xfree86/sdksyms.c libxservertest_la_LIBADD = \ $(XSERVER_LIBS) \ $(top_builddir)/hw/xfree86/loader/libloader.la \ From 163441fe531a77f7fa54bfa59c5ab49c78f44306 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Tue, 14 Jun 2011 20:03:06 -0700 Subject: [PATCH 3/3] xfree86: Remove libxorg convenience library to speed up build 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. As a side effect, since the dtrace objects are now being linked directly into Xorg, we don't need the SPECIAL_DTRACE_OBJECTS hack to add them twice. Signed-off-by: Dan Nicholson Tested-by: Jamey Sharp Reviewed-by: Daniel Stone Tested-by: Peter Hutterer --- hw/xfree86/Makefile.am | 26 ++++++++++---------------- test/Makefile.am | 1 - 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am index 6580e8d8c8..e3ef14fc12 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 = \ +LOCAL_LIBS = \ + $(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,14 @@ 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) + $(top_builddir)/os/libos.la +Xorg_LDADD = \ + $(LOCAL_LIBS) \ + $(XORG_SYS_LIBS) \ + $(XSERVER_SYS_LIBS) +Xorg_DEPENDENCIES = $(LOCAL_LIBS) Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) @@ -73,11 +72,6 @@ BUILT_SOURCES = xorg.conf.example DISTCLEANFILES = xorg.conf.example EXTRA_DIST = xorgconf.cpp -if SPECIAL_DTRACE_OBJECTS -# Re-add dtrace object code that gets lost when building static libraries -Xorg_LDADD += $(XSERVER_LIBS) -endif - if SOLARIS_ASM_INLINE # Needs to be built before any files are compiled when using Sun compilers # so in*/out* inline definitions are properly processed. diff --git a/test/Makefile.am b/test/Makefile.am index 04c255b683..370e09a181 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@