motif: wmluiltok links the bootstrap prefix's libfl, not the target's

wmluiltok is a host tool and links -lfl; -L${LOCALBASE}/lib becomes the buildlink
directory in a cross build, so the linker took the TARGET's flex library and
stopped on NetBSD's libc.so.12 against the host's libc ('errno@@GLIBC_PRIVATE ...
TLS definition ... mismatches non-TLS definition', build/logs/
userland-2026-11-13z.log:3680ff).  The path is only set for a cross build; a
native build has flex in its own prefix.
This commit is contained in:
lotherk committed 2026-11-13 23:40:06 +00:00
1 parent 8393461a16
commit 41bdd94470
1 file changed
+9
+9
View File
@@ -77,6 +77,15 @@ MAKE_FLAGS+= CC_FOR_BUILD=${NATIVE_CC:Q:U${CC:Q}}
# ("invalid option -- '='", userland-2026-11-13x.log:396).
CFLAGS_FOR_BUILD= -O2 -std=gnu17
MAKE_FLAGS+= CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD:Q}
# wmluiltok is a host tool that links -lfl. In a cross build -L${LOCALBASE}/lib
# is rewritten to the buildlink directory, so -lfl resolves to the TARGET's flex
# library; the host linker then stops on NetBSD's libc.so.12 ("errno@@GLIBC_PRIVATE
# ... TLS definition ... mismatches", build/logs/userland-2026-11-13z.log:3680ff).
# 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"
MAKE_FLAGS+= LEXLIB=${MAKRONIX_TOP:Q}/build/pkg/lib/libfl.a
.endif
MAKE_FLAGS+= AR_FOR_BUILD=${NATIVE_AR:Q:U${AR:Q}}
MAKE_FLAGS+= RANLIB_FOR_BUILD=${NATIVE_RANLIB:Q:U${RANLIB:Q}}
MAKE_FLAGS+= CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD:Q}