From 16826ffd0150ab22cd89116df4281420fd728858 Mon Sep 17 00:00:00 2001 From: lotherk Date: Fri, 20 Nov 2026 16:12:57 +0100 Subject: [PATCH] motif recipe: the build tools link the host archives where the host has X The cross branch named ${MAKRONIX_TOP}/build/pkg/lib/libXt.a and friends. That is a Linux host, where userland builds them as host tools; on Makronix the builtin libXt is used, the bootstrap has no libXt.a, and makestrs stopped at the link ("cannot find /usr/src/build/pkg/lib/libX11.a", measured 2026-11-20). Where /usr/X11R7/lib/libXt.a and /usr/lib/libfl.a exist, they are named instead; the bootstrap path stays for the Linux host. --- pkgsrc-motif/Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgsrc-motif/Makefile b/pkgsrc-motif/Makefile index 7b27bab3..7e7cfad6 100644 --- a/pkgsrc-motif/Makefile +++ b/pkgsrc-motif/Makefile @@ -84,7 +84,11 @@ MAKE_FLAGS+= CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD:Q} # build/logs/userland-2026-11-14a.log:3678ff). The bootstrap prefix has a host # libfl.a; naming the file leaves no search path to pick the target's from. .if ${USE_CROSS_COMPILE:U:tl} == "yes" +. if exists(/usr/lib/libfl.a) +MAKE_FLAGS+= wmluiltok_LDADD=/usr/lib/libfl.a +. else MAKE_FLAGS+= wmluiltok_LDADD=${MAKRONIX_TOP:Q}/build/pkg/lib/libfl.a +. endif .endif MAKE_FLAGS+= AR_FOR_BUILD=${NATIVE_AR:Q:U${AR:Q}} MAKE_FLAGS+= RANLIB_FOR_BUILD=${NATIVE_RANLIB:Q:U${RANLIB:Q}} @@ -98,10 +102,19 @@ MAKE_FLAGS+= LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD:Q} # the static archives there are named directly, which no search path can # redirect to the target's. .if ${USE_CROSS_COMPILE:U:tl} == "yes" +. if exists(/usr/X11R7/lib/libXt.a) +# The build host has its own X (Makronix): the host tool links the host's +# archives, not the bootstrap's. +LIBS_FOR_BUILD= /usr/X11R7/lib/libXt.a \ + /usr/X11R7/lib/libX11.a \ + /usr/X11R7/lib/libSM.a \ + /usr/X11R7/lib/libICE.a +. else LIBS_FOR_BUILD= ${MAKRONIX_TOP:Q}/build/pkg/lib/libXt.a \ ${MAKRONIX_TOP:Q}/build/pkg/lib/libX11.a \ ${MAKRONIX_TOP:Q}/build/pkg/lib/libSM.a \ ${MAKRONIX_TOP:Q}/build/pkg/lib/libICE.a +. endif .else LIBS_FOR_BUILD= -lXt .endif