xserver: Branch 'server-1.7-nominations' - 3 commits
Alan Coopersmith
alanc at kemper.freedesktop.org
Wed Oct 7 17:59:46 PDT 2009
configure.ac | 17 ++++++++++++++++-
dix/Makefile.am | 6 +++---
hw/xfree86/Makefile.am | 2 +-
os/Makefile.am | 4 +---
test/Makefile.am | 4 ++++
test/xi2/Makefile.am | 4 ++++
6 files changed, 29 insertions(+), 8 deletions(-)
New commits:
commit a4ce2aa6348ecca3a5b1ac8d87caf974bdad3455
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Mon Oct 5 16:52:19 2009 -0700
Add platform tests for Dtrace linker magic
Replaces special handling for Xquartz DDX and scales better to handling
the multiple platforms that now have some level of Dtrace support available.
Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/configure.ac b/configure.ac
index 5313169..f34bc99 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,8 +102,20 @@ fi
if test "x$WDTRACE" != "xno" ; then
AC_DEFINE(XSERVER_DTRACE, 1,
[Define to 1 if the DTrace Xserver provider probes should be built in.])
+
+# Solaris/OpenSolaris require dtrace -G to build dtrace probe information into
+# object files, and require linking with those as relocatable objects, not .a
+# archives. MacOS X handles all this in the normal compiler toolchain, and on
+# some releases (like Tiger), will error out on dtrace -G. For now, other
+# platforms with Dtrace ports are assumed to support -G (the FreeBSD and Linux
+# ports appear to, based on my web searches, but have not yet been tested).
+ case $host_os in
+ darwin*) SPECIAL_DTRACE_OBJECTS=no ;;
+ *) SPECIAL_DTRACE_OBJECTS=yes ;;
+ esac
fi
AM_CONDITIONAL(XSERVER_DTRACE, [test "x$WDTRACE" != "xno"])
+AM_CONDITIONAL(SPECIAL_DTRACE_OBJECTS, [test "x$SPECIAL_DTRACE_OBJECTS" = "xyes"])
AC_HEADER_DIRENT
AC_HEADER_STDC
@@ -1247,7 +1259,7 @@ AC_DEFINE(XSYNC, 1, [Support XSync extension])
AC_DEFINE(XCMISC, 1, [Support XCMisc extension])
AC_DEFINE(BIGREQS, 1, [Support BigRequests extension])
-if test "x$WDTRACE" != "xno" && test "x$XQUARTZ" = "xno"; then
+if test "x$SPECIAL_DTRACE_OBJECTS" = "xyes" ; then
DIX_LIB='$(top_builddir)/dix/dix.O'
OS_LIB='$(top_builddir)/os/os.O'
else
diff --git a/dix/Makefile.am b/dix/Makefile.am
index 85a8767..0996cff 100644
--- a/dix/Makefile.am
+++ b/dix/Makefile.am
@@ -54,7 +54,7 @@ Xserver-dtrace.h: $(srcdir)/Xserver.d
$(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d \
|| cp Xserver-dtrace.h.in $@
-if !XQUARTZ
+if SPECIAL_DTRACE_OBJECTS
# Generate dtrace object code for probes in libdix
dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS)
$(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 48db5a1..159b935 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -80,7 +80,7 @@ BUILT_SOURCES = xorg.conf.example
DISTCLEANFILES += xorg.conf.example xorg.conf.example.pre
EXTRA_DIST = xorgconf.cpp
-if XSERVER_DTRACE
+if SPECIAL_DTRACE_OBJECTS
# Re-add dtrace object code that gets lost when building static libraries
Xorg_LDADD += $(XSERVER_LIBS)
endif
diff --git a/os/Makefile.am b/os/Makefile.am
index 9ce8ff2..22ed194 100644
--- a/os/Makefile.am
+++ b/os/Makefile.am
@@ -41,8 +41,7 @@ endif
EXTRA_DIST = $(SECURERPC_SRCS) $(INTERNALMALLOC_SRCS) \
$(XDMCP_SRCS) $(STRLCAT_SRCS)
-if !XQUARTZ
-if XSERVER_DTRACE
+if SPECIAL_DTRACE_OBJECTS
# Generate dtrace object code for probes in libos & libdix
dtrace.o: $(top_srcdir)/dix/Xserver.d $(am_libos_la_OBJECTS)
$(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d .libs/*.o ../dix/.libs/*.o
@@ -52,7 +51,6 @@ noinst_PROGRAMS = os.O
os.O: dtrace.o $(am_libos_la_OBJECTS)
ld -r -o $@ dtrace.o .libs/*.o
endif
-endif
os.c:
touch $@
diff --git a/test/Makefile.am b/test/Makefile.am
index 1bd76f5..7c44671 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -9,7 +9,7 @@ AM_CFLAGS = $(DIX_CFLAGS) $(GLIB_CFLAGS) @XORG_CFLAGS@
INCLUDES = @XORG_INCS@
TEST_LDADD=libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLIB_LIBS)
-if XSERVER_DTRACE
+if SPECIAL_DTRACE_OBJECTS
TEST_LDADD += $(OS_LIB) $(DIX_LIB)
endif
diff --git a/test/xi2/Makefile.am b/test/xi2/Makefile.am
index ef6d0f0..0e2de6b 100644
--- a/test/xi2/Makefile.am
+++ b/test/xi2/Makefile.am
@@ -17,7 +17,7 @@ INCLUDES = @XORG_INCS@
TEST_LDADD=../libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLIB_LIBS)
COMMON_SOURCES=protocol-common.h protocol-common.c
-if XSERVER_DTRACE
+if SPECIAL_DTRACE_OBJECTS
TEST_LDADD += $(OS_LIB) $(DIX_LIB)
endif
commit 22fd21a71d3dc98a94cc5f6592832e1d19bb479a
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Tue Sep 15 19:17:48 2009 -0700
Fix build of unit tests when dtrace probes are enabled
ar loses the dtrace probe magic when building static libraries, so we
have to link with the .O files in order to resolve the dtrace probe symbols.
Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
diff --git a/configure.ac b/configure.ac
index a0bcd7d..5313169 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1254,6 +1254,8 @@ else
DIX_LIB='$(top_builddir)/dix/libdix.la'
OS_LIB='$(top_builddir)/os/libos.la'
fi
+AC_SUBST([DIX_LIB])
+AC_SUBST([OS_LIB])
MAIN_LIB='$(top_builddir)/dix/libmain.la'
AC_SUBST([MAIN_LIB])
diff --git a/dix/Makefile.am b/dix/Makefile.am
index 23fe460..85a8767 100644
--- a/dix/Makefile.am
+++ b/dix/Makefile.am
@@ -57,12 +57,12 @@ Xserver-dtrace.h: $(srcdir)/Xserver.d
if !XQUARTZ
# Generate dtrace object code for probes in libdix
dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS)
- $(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d .libs/*.o
+ $(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
noinst_PROGRAMS = dix.O
dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS)
- ld -r -o $@ .libs/*.o
+ ld -r -o $@ $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
endif
endif
diff --git a/test/Makefile.am b/test/Makefile.am
index d8d8985..1bd76f5 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -9,6 +9,10 @@ AM_CFLAGS = $(DIX_CFLAGS) $(GLIB_CFLAGS) @XORG_CFLAGS@
INCLUDES = @XORG_INCS@
TEST_LDADD=libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLIB_LIBS)
+if XSERVER_DTRACE
+TEST_LDADD += $(OS_LIB) $(DIX_LIB)
+endif
+
xkb_LDADD=$(TEST_LDADD)
input_LDADD=$(TEST_LDADD)
xtest_LDADD=$(TEST_LDADD)
diff --git a/test/xi2/Makefile.am b/test/xi2/Makefile.am
index b8362ca..ef6d0f0 100644
--- a/test/xi2/Makefile.am
+++ b/test/xi2/Makefile.am
@@ -17,6 +17,10 @@ INCLUDES = @XORG_INCS@
TEST_LDADD=../libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLIB_LIBS)
COMMON_SOURCES=protocol-common.h protocol-common.c
+if XSERVER_DTRACE
+TEST_LDADD += $(OS_LIB) $(DIX_LIB)
+endif
+
protocol_xiqueryversion_LDADD=$(TEST_LDADD)
protocol_xiquerydevice_LDADD=$(TEST_LDADD)
protocol_xiselectevents_LDADD=$(TEST_LDADD)
commit 8e3299eee8c2d909f34ec070f6f606a278c46330
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Fri Oct 2 20:44:19 2009 -0700
Set XQUARTZ to no on non-Darwin OS'es
Fixes build with dtrace probes on Solaris after efacd7bfd08ffc0725de6f639c6afbf3b2f6c9fe
Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/configure.ac b/configure.ac
index c3dc10d..a0bcd7d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -701,6 +701,7 @@ case $host_os in
XF86VIDMODE=no
fi
;;
+ *) XQUARTZ=no ;;
esac
dnl ---------------------------------------------------------------------------
More information about the xorg-commit
mailing list