mcde/dtksh: the compiler goes into the environment, not the argument list
ksh93's bin/package takes its compiler from $CC ('case $cc in /*)') and the
absolute path passed as a bare argument did not survive the script's own parsing:
it still said 'cc: not found -- set CC=C-compiler' with the path on the command
line (build/logs/userland-2026-11-14-finish4.log:16480). The rule now prefixes the
one command with CC=<wrapper path>, which is where the script looks first.
This commit is contained in:
1 parent
da98eef08e
commit
1422052fd2
1 file changed
+8
-2
@@ -67,10 +67,16 @@ dtksh_SOURCES = init.c \
|
||||
# CWRAPPERS_CONFIG_DIR is pkgsrc's; it is exported to every make of the build and
|
||||
# names the wrapper directory, whose bin/cc applies the cross flags. A plain
|
||||
# build has neither KSH_CC nor CWRAPPERS_CONFIG_DIR and keeps using $CC.
|
||||
KSH_CC_ARG = $(if $(KSH_CC),$(KSH_CC),$(if $(CWRAPPERS_CONFIG_DIR),$(dir $(CWRAPPERS_CONFIG_DIR))bin/cc))
|
||||
# ksh93's bin/package takes the compiler from $CC and insists on an absolute
|
||||
# path ("case $cc in /*)"); a bare path argument did not survive its parsing
|
||||
# (build/logs/userland-2026-11-14-finish4.log:16480), so the compiler is given in
|
||||
# the environment of that one command. KSH_CC wins; otherwise the wrapper is
|
||||
# derived from pkgsrc's CWRAPPERS_CONFIG_DIR, which every make of the build sees.
|
||||
# A plain build has neither and keeps its own $CC.
|
||||
KSH_CC_ENV = $(if $(KSH_CC),CC=$(KSH_CC),$(if $(CWRAPPERS_CONFIG_DIR),CC=$(dir $(CWRAPPERS_CONFIG_DIR))bin/cc))
|
||||
|
||||
ksh93/bin/ksh:
|
||||
ksh93/bin/package flat make CCFLAGS='$(KSH93_SHOPTS) $(MCDE_DIALECT_CFLAGS)' $(KSH_CC_ARG)
|
||||
$(KSH_CC_ENV) ksh93/bin/package flat make CCFLAGS='$(KSH93_SHOPTS) $(MCDE_DIALECT_CFLAGS)'
|
||||
|
||||
init.c: ksh93/bin/ksh
|
||||
$(CP) ksh93/src/cmd/ksh93/sh/init.c ./
|
||||
|
||||
Reference in new issue
Block a user