summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbea <orbea@riseup.net>2021-06-23 05:50:21 -0700
committerMatt Turner <mattst88@gmail.com>2021-06-26 21:29:23 +0000
commitb7adbac7d14bca3b0790fd7d1a706be28d954af5 (patch)
treeb17ffc94209acb07d0eff1fd2e915cf764557c24
parente49738f0c9d4370c7a7e6e86c2c74151aa2e33fa (diff)
downloadxserver-b7adbac7d14bca3b0790fd7d1a706be28d954af5.tar.gz
hw/dmx/config: Link directly with libdmxconfig.a
When building xserver with slibtool (https://dev.midipix.org/cross/slibtool) the build will fail. /usr/bin/ld: cannot find -ldmxconfig This is because xserver creates libdmxconfig.a internally and then links with the linker flag -ldmxconfig. However according to automake documentation the -lfoo linker flags should only be used for external dependencies and all internal libraries should be linked with the libtool archive file (.la) or the static archive (.a) when the former is not available. GNU libtool is far more permissive and happens to silently obscure this issue while slibtool fails because it instead sees '-L./.libs -ldmxconfig'. Signed-off-by: Matt Turner <mattst88@gmail.com> (cherry picked from commit 2531ee02450e3be3549daa09407557c3addeba02)
-rw-r--r--hw/dmx/config/Makefile.am9
1 files changed, 3 insertions, 6 deletions
diff --git a/hw/dmx/config/Makefile.am b/hw/dmx/config/Makefile.am
index 06588e7a1..97c309d3b 100644
--- a/hw/dmx/config/Makefile.am
+++ b/hw/dmx/config/Makefile.am
@@ -38,23 +38,20 @@ AM_CFLAGS = \
bin_PROGRAMS = xdmxconfig vdltodmx dmxtodmx
-xdmxconfig_DEPENDENCIES = libdmxconfig.a
xdmxconfig_SOURCES = \
xdmxconfig.c \
$(top_srcdir)/hw/dmx/dmxlog.c \
Canvas.c \
Canvas.h \
CanvasP.h
-xdmxconfig_LDADD = -L. -ldmxconfig @XDMXCONFIG_DEP_LIBS@
+xdmxconfig_LDADD = libdmxconfig.a @XDMXCONFIG_DEP_LIBS@
xdmxconfig_CFLAGS = $(AM_CFLAGS) @XDMXCONFIG_DEP_CFLAGS@
-vdltodmx_DEPENDENCIES = libdmxconfig.a
vdltodmx_SOURCES = vdltodmx.c
-vdltodmx_LDADD = -L. -ldmxconfig
+vdltodmx_LDADD = libdmxconfig.a
-dmxtodmx_DEPENDENCIES = libdmxconfig.a
dmxtodmx_SOURCES = dmxtodmx.c
-dmxtodmx_LDADD = -L. -ldmxconfig
+dmxtodmx_LDADD = libdmxconfig.a
EXTRA_DIST = \
test-a.in test-a.out \