aboutsummaryrefslogtreecommitdiff
path: root/bin/csh
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2025-02-07 01:23:47 +0000
committerEd Maste <emaste@FreeBSD.org>2025-02-09 00:30:55 +0000
commited8b456f82ed822652f2abb24d65ab73ac3dbb0a (patch)
tree64ce71a4ac8aefa695901184fba0471119421f59 /bin/csh
parent4c2795340ebbd92d16cdcb1d7f83e5f35ed4a1eb (diff)
Diffstat (limited to 'bin/csh')
-rw-r--r--bin/csh/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/csh/Makefile b/bin/csh/Makefile
index 6b05c01e0a61..5cbb58bd0ead 100644
--- a/bin/csh/Makefile
+++ b/bin/csh/Makefile
@@ -121,9 +121,14 @@ build-tools: gethost
tc.defs.c: gethost
DEPENDOBJS+= gethost
-gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META}
+gethost: gethost.c sh.err.h sh.h ${BUILD_TOOLS_META}
@rm -f ${.TARGET}
+ # Define _h_tc_const so that tc.h will skip including tc.const.h.
+ # gethost.c does not actually require any of the definitions in there,
+ # and building tc.const.h requires target headers which are not
+ # available when we need to build gethost.
${HOST_CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
+ -D_h_tc_const \
${TCSHDIR}/gethost.c
.endif