From b7adbac7d14bca3b0790fd7d1a706be28d954af5 Mon Sep 17 00:00:00 2001 From: orbea Date: Wed, 23 Jun 2021 05:50:21 -0700 Subject: [PATCH] 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 (cherry picked from commit 2531ee02450e3be3549daa09407557c3addeba02) --- hw/dmx/config/Makefile.am | 9 +++------ 1 file 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 \