Re: [PATCH xserver] randr,render: link some necessary symbols into

2017-02-09 Thread Mihail Konev
On Thu, Feb 09, 2017 at 11:16:20AM +0500, Mihail Konev wrote:
> per-OS-adjustments

Sorry for the screaming; it was not OS/toolchain, but

  ./configure --enable-dmx --with-dtrace=no

With it, there are no custom-built os.O/dix.O, and libtool
does not reorder them in front of everything else
(as "non-libtool libraries"?).

But how does it work in the os.O case that librender.a finds x_sha1_init ...?
Placing libdix.a/libos.a to *.O places does not work, and then also libmain.a
cannot find dix_main.

So from *.O symbols are somehow visible even backwards.
Now the configure-reordering no longer looks risky, althrough there is a
dtrace-library-symbols mystery.
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver] randr,render: link some necessary symbols into

2017-02-08 Thread Mihail Konev
On Thu, Feb 09, 2017 at 10:48:14AM +0500, Mihail Konev wrote:
> this patch looks to be making more sense than per-OS adjustments

(In the sense it does record "A depends on B", whereas reordering does
not, while being a "per-OS-adjustment" too).
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xserver] randr,render: link some necessary symbols into

2017-02-08 Thread Mihail Konev
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 
Signed-off-by: Mihail Konev 
---

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

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel