Skip to content

Commit

Permalink
os,dix: Depend custom libs on libs, not objects
Browse files Browse the repository at this point in the history
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.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
  • Loading branch information
forgottenswitch authored and nwnk committed Jan 2, 2017
1 parent b5dffbb commit 5b74e26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dix/Makefile.am
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions os/Makefile.am
Expand Up @@ -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

0 comments on commit 5b74e26

Please sign in to comment.