[PATCH xserver] os,dix: Depend custom libs on libs, not objects

Mihail Konev k.mvc at ya.ru
Thu Dec 29 07:37:18 UTC 2016


The custom os/os.O library reuses *.o files of os/libos.la.

The current rule assumes automake puts all the objects into
per-target am__*_la_OBJECTS variable.
At least with AC_REPLACE_FUNCS, this no longer holds
(as wanted objects are put into LTLIBOBJS instead).

Depend on automake's result, the *.la library instead,
to express demand of any its dependencies being built.

Should be fixing randomly occuring "undefined reference to `strlcpy'"
errors when linking Xvfb and other DDX-es that could use os.O.

Signed-off-by: Mihail Konev <k.mvc at ya.ru>
---
 dix/Makefile.am | 4 ++--
 os/Makefile.am  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dix/Makefile.am b/dix/Makefile.am
index e7ca2369cee5..a4171d7e1f12 100644
--- a/dix/Makefile.am
+++ b/dix/Makefile.am
@@ -61,13 +61,13 @@ endif
 
 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-dix.o: $(top_srcdir)/dix/Xserver.d libdix.la
 	$(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
 
 noinst_PROGRAMS = dix.O
 
 dix_O_SOURCES =
-dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS)
+dix.O: dtrace-dix.o libdix.la
 	$(AM_V_GEN)ld -r -o $@ $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
 endif
 
diff --git a/os/Makefile.am b/os/Makefile.am
index b5fb9d0fa86b..c6e78cb99fd5 100644
--- a/os/Makefile.am
+++ b/os/Makefile.am
@@ -58,12 +58,12 @@ EXTRA_DIST = $(SECURERPC_SRCS) $(XDMCP_SRCS)
 
 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.o: $(top_srcdir)/dix/Xserver.d libos.la
 	$(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d .libs/*.o ../dix/.libs/*.o
 
 noinst_PROGRAMS = os.O
 
 os_O_SOURCES =
-os.O: dtrace.o $(am_libos_la_OBJECTS)
+os.O: dtrace.o libos.la
 	$(AM_V_GEN)ld -r -o $@ dtrace.o .libs/*.o
 endif
-- 
2.9.2



More information about the xorg-devel mailing list