tradcpp runs on the build host but preprocesses dtlogin/config/*.src for the target. config.h used the compiler's OS, so a Linux->NetBSD cross build preprocessed the __linux__ branch of Xservers.src (tested before __NetBSD__) and installed /usr/pkg/dt/config/Xservers with '/usr/bin/X :0' and Xfailsafe with XDIR=/usr/bin; dtlogin had no server to start. configure.ac now derives MCDE_TRADCPP_CPPFLAGS from host_os and tradcpp takes CONFIG_OS_IDENT for CONFIG_OS. Measured 2026-11-15 (config.log build_os=linux-gnu host_os=netbsd) and by hand: tradcpp with -DCONFIG_OS_IDENT=__NetBSD__ emits ':0 Local local@console /usr/X11R7/bin/X :0', without it '/usr/bin/X :0'.
tradcpp_CC/CFLAGS/LDFLAGS are not per-target variables automake honours,
so the generated Makefile still used the target compiler: the tool was a
NetBSD ELF and every build stopped at
'/bin/sh: ../../../../util/tradcpp/tradcpp: not found'
(build/logs/userland-2026-11-14k.log:7697). Override the generated CC,
CPPFLAGS, CFLAGS and LDFLAGS for this build-tool sub-make with the
*_FOR_BUILD values the top Makefile.am already forwards.
Verified in the work directory: automake emits CC = $(CC_FOR_BUILD); a
host-cc build of the same objects is a Linux ELF and preprocesses -DX=1
to 1.
Fixes the remaining wm/mcde build stop (tasksd t0170).
Co-authored-by: Iceman Contributor Free <noreply@opencode.ai>
util/tradcpp is built and run during every MCDE build, but configure only set
CC_FOR_BUILD/CFLAGS_FOR_BUILD/... inside the with_private_motif block. With
--without-private-motif (the pkgsrc recipe) the Makefiles got empty values, and
AM_MAKEFLAGS then passed an explicit empty CC_FOR_BUILD down to the sub-makes --
clobbering the value pkgsrc's MAKE_FLAGS had given the top-level make. tradcpp
was therefore compiled with the target compiler and could not run (build/logs/
userland-2026-11-14j.log:7715ff, and again in 14k after MAKE_FLAGS alone).
The defaults and AC_SUBSTs now stand before the Motif test (LIBS_FOR_BUILD stays
inside: it is Motif's -lXt), and the recipe gives configure the host compiler for
a cross build, since configure's own default is $CC, the target's. tradcpp needs
no X library, so it no longer links LIBS_FOR_BUILD.
MCDE runs util/tradcpp while it builds (configure.ac: GENCPP=/util/tradcpp/tradcpp, used on the *.cpp.in templates). It was compiled with the
target compiler, so the build stopped at 'lib/tt/bin/scripts': '/bin/sh:
../../../../util/tradcpp/tradcpp: not found' -- the file exists, it is a NetBSD
binary (build/logs/userland-2026-11-14j.log:7715ff).
The tree already forwards CC_FOR_BUILD/CFLAGS_FOR_BUILD/... through AM_MAKEFLAGS
(Makefile.am), but nothing used them for tradcpp; its Makefile.am now names them
for that program, and the pkgsrc recipe sets them (NATIVE_CC, and gnu17 for the
host compiler's C23 default) as the Motif recipe already did.
cde-2.5.3.tar.gz, SHA512 a01b413b... as in pkgsrc distinfo; recipe from
pkgsrc 3c1118e94432. Added with -f: CDE's .gitignore hides 612 files of
the archive.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>