mcde recipes: the build tools take the X of the build host

makestrs, wml and wmldbcreate are built and RUN by the build host, and in a
cross build prefix is the target ( /usr/pkg ): there /usr/pkg/include has no
X11, and makestrs stopped with "X11/Xos.h: No such file or directory" on
Makronix (measured 2026-11-20) while the Linux host had the buildlink stub in
that directory.  Where the host has its own X (/usr/X11R7), the tools use it;
else the old -I${PREFIX}/include stays.
This commit is contained in:
lotherk committed 2026-11-20 15:40:03 +01:00
1 parent ba6190a157
commit 3a9f769c51
2 files changed
+14

No files matched your search

+10
View File
@@ -133,7 +133,17 @@ LDFLAGS_FOR_BUILD+= ${BUILDLINK_LDFLAGS}
.else
MAKE_FLAGS+= CROSS_COMPILING=yes
# XXX should support independent cross PREFIX
# PREFIX is the target's (/usr/pkg). Where the build host has an X of its own,
# the build tools (makestrs, wml, wmldbcreate) must see THAT one: on Makronix
# /usr/pkg/include has no X11, and makestrs stopped with "X11/Xos.h: No such
# file or directory" (measured 2026-11-20 on makronix-build). On a Linux host
# /usr/X11R7 does not exist and the buildlink's PREFIX/include is the answer,
# as before.
.if exists(/usr/X11R7/include/X11/Xos.h)
CPPFLAGS_FOR_BUILD+= -I/usr/X11R7/include
.else
CPPFLAGS_FOR_BUILD+= -I${PREFIX:Q}/include
.endif
LDFLAGS_FOR_BUILD+= -L${PREFIX:Q}/lib
LDFLAGS_FOR_BUILD+= ${COMPILER_RPATH_FLAG:Q}${PREFIX:Q}/lib
CONFIGURE_ARGS.NetBSD+= ac_cv_file__usr_X_include_X11_X_h=no
+4
View File
@@ -151,6 +151,10 @@ PLIST.tttypes= yes
# Motif recipe's CFLAGS_FOR_BUILD)
CFLAGS_FOR_BUILD= -O2 -std=gnu17
CPPFLAGS_FOR_BUILD= -DHAVE_FCNTL_H
# The build tools need the X of the build host (see the Motif recipe).
.if exists(/usr/X11R7/include/X11/Xos.h)
CPPFLAGS_FOR_BUILD+= -I/usr/X11R7/include
.endif
# Nothing of the target in what links a build tool: no -L/-R of the sysroot, and
# not the X_LIBS configure would add (a bare -R, which the host's gcc rejects:
# build/logs/mcde-hosttools-2026-11-14b.log, "unrecognized command-line option -R").