[PATCH xserver] randr,render: link some necessary symbols into
Mihail Konev
k.mvc at ya.ru
Thu Feb 9 05:48:14 UTC 2017
Fixes dmx build, even on Ubuntu 17.04 alpha, where just adding
librender at the end of Xdmx doesn't work (librender HashGlyph then
cannot find x_sha1_init from libos).
This links some libos.a functions into render, and some librender.a
ones into randr.
Adjust the subdirectory order to allow for this.
"Linking into" seems to be the only reliable way to have two
subdirectory libraries reference symbols from each other - before,
it seems, Xserver just happened to have library order that allowed
linkers to find all the symbols in such cases; this broke
in e50da50118408a195d4d2e1b39817fe7c4447c56.
Somehow this does not result in multiple definition errors.
Fixes: 3ef16dfb ("dmx: fix linking")
Reported-by: Byeong-ryeol Kim <brofkims at gmail.com>
Signed-off-by: Mihail Konev <k.mvc at ya.ru>
---
This requires 3ef16dfb to be reverted first.
Seems to be a sufficient "emulation" of libddx_Xdmx.la,
the to-be only library collecting all the _LIB-s to link into Xdmx,
whose purpose would be to avoid the subdirectory libs dependency
resolution nightmare (i.e. configure.ac/Makefile.am reorderings).
(I brute-forced it as well, but this patch looks to be making more
sense than per-OS adjustments).
Makefile.am | 2 +-
randr/Makefile.am | 3 +++
render/Makefile.am | 3 +++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index f0fa2d839f7e..270c56103dff 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -45,8 +45,8 @@ SUBDIRS = \
Xext \
miext \
os \
+ render \
randr \
- render \
Xi \
xkb \
$(PSEUDORAMIX_DIR) \
diff --git a/randr/Makefile.am b/randr/Makefile.am
index 90dc9ec9aac4..94db11dc12cd 100644
--- a/randr/Makefile.am
+++ b/randr/Makefile.am
@@ -26,6 +26,9 @@ librandr_la_SOURCES = \
rrtransform.h \
rrtransform.c
+librandr_la_DEPENDENCIES = $(top_builddir)/render/librender.la
+librandr_la_LIBADD = $(top_builddir)/render/librender.la
+
if XINERAMA
librandr_la_SOURCES += ${XINERAMA_SRCS}
endif
diff --git a/render/Makefile.am b/render/Makefile.am
index d02028b3b749..f2b0944d51f1 100644
--- a/render/Makefile.am
+++ b/render/Makefile.am
@@ -15,6 +15,9 @@ librender_la_SOURCES = \
picture.c \
render.c
+librender_la_DEPENDENCIES = $(OS_LIB)
+librender_la_LIBADD = $(OS_LIB)
+
if XORG
sdk_HEADERS = picture.h mipict.h glyphstr.h picturestr.h
endif
--
2.9.2
More information about the xorg-devel
mailing list