svn commit: r322951 - head
Bryan Drewery
bdrewery at FreeBSD.org
Wed Oct 25 20:34:59 UTC 2017
On 8/27/17 9:15 AM, Ngie Cooper wrote:
> Author: ngie
> Date: Sun Aug 27 16:15:37 2017
> New Revision: 322951
> URL: https://svnweb.freebsd.org/changeset/base/322951
>
> Log:
> Respect MK_TCSH with build-tools and native-xtools
>
> This helps reduce the WORLDTMP footprint slightly.
>
> Based on a patch I submitted 5 years ago to GNATS.
>
> PR: 174051
> MFC after: 2 weeks
> Relnotes: yes (anyone who cross-builds with MK_TCSH=yes will run into
> build failures if the host doesn't have tcsh(1))
I don't understand what you're saying here. If I build with MK_TCSH=yes
and the host does not have tcsh, a failure occurs AFTER or BEFORE this
change?
Neither case makes sense to me.
What is the failure?
The change here is to build-tools which just calls 'make build-tools' in
bin/csh which just builds 'gethost'.
> # make build-tools
> grep 'ERR_' /root/git/freebsd/contrib/tcsh/sh.err.c | grep '^#define' >> sh.err.h
> cc -E -O2 -pipe -I. -I/root/git/freebsd/bin/csh -I/root/git/freebsd/contrib/tcsh -D_PATH_TCSHELL='"/bin/csh"' -g -std=gnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -fcolor-diagnostics -Qunused-arguments /root/git/freebsd/contrib/tcsh/tc.const.c /root/git/freebsd/contrib/tcsh/sh.char.h /root/git/freebsd/bin/csh/config.h /root/git/freebsd/contrib/tcsh/config_f.h /root/git/freebsd/contrib/tcsh/sh.types.h sh.err.h -D_h_tc_const | grep 'Char STR' | sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | sort >> tc.const.h
> Building /usr/obj/root/git/freebsd/bin/csh/gethost
If the host does not have tcsh and MK_TCSH is set to yes and fails, then
we're missing building tcsh as a build tool (in bootstrap-tools). I
don't know where it is used though.
This is the only place I see using csh in the build:
> tools/test/malloc/Makefile: @csh -x -c "time ./malloc 500000 2000 8192"
> tools/test/malloc/Makefile: @csh -x -c "time ./malloc 50000000 2000 8192"
> tools/test/malloc/Makefile: @csh -x -c "time ./malloc 500000 14000 8192"
> tools/test/malloc/Makefile: @csh -x -c "time ./malloc 20000000 20000 2048"
> Reminded by: Fabian Keil <fk at fabiankeil.de>
This patch is overall fine but it saves 25KB in OBJDIR and ~1 second in
build time. Based on the reminder and the Relnotes, it seems like
whatever was intended to be fixed may not have been.
>
> Modified:
> head/Makefile.inc1
>
> Modified: head/Makefile.inc1
> ==============================================================================
> --- head/Makefile.inc1 Sun Aug 27 13:02:51 2017 (r322950)
> +++ head/Makefile.inc1 Sun Aug 27 16:15:37 2017 (r322951)
> @@ -1984,8 +1984,12 @@ _gcc_tools= gnu/usr.bin/cc/cc_tools
> _rescue=rescue/rescue
> .endif
>
> +.if ${MK_TCSH} != "no"
> +_tcsh=bin/csh
> +.endif
> +
> .for _tool in \
> - bin/csh \
> + ${_tcsh} \
> bin/sh \
> ${LOCAL_TOOL_DIRS} \
> lib/ncurses/ncurses \
> @@ -2143,7 +2147,7 @@ native-xtools: .PHONY
> bin/cat \
> bin/chmod \
> bin/cp \
> - bin/csh \
> + ${_tcsh} \
> bin/echo \
> bin/expr \
> bin/hostname \
>
--
Regards,
Bryan Drewery
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 529 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20171025/63f0e208/attachment.sig>
More information about the svn-src-all
mailing list