Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Nov 2018 14:59:37 -0800
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        Alex Richardson <arichardson@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r339946 - in head: . share/mk
Message-ID:  <eeb3cd76-d260-50d1-d676-5ebdb3c1c74d@FreeBSD.org>
In-Reply-To: <201810311045.w9VAjSs7012968@repo.freebsd.org>
References:  <201810311045.w9VAjSs7012968@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--ZRrTLhiJrfL8Vck9rWCuzU38xbiOQzbL3
Content-Type: multipart/mixed; boundary="nqD73xBNXUFRFdR3XrkvgvZSgfmmsiQtz";
 protected-headers="v1"
From: Bryan Drewery <bdrewery@FreeBSD.org>
To: Alex Richardson <arichardson@FreeBSD.org>, src-committers@freebsd.org,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
Message-ID: <eeb3cd76-d260-50d1-d676-5ebdb3c1c74d@FreeBSD.org>
Subject: Re: svn commit: r339946 - in head: . share/mk
References: <201810311045.w9VAjSs7012968@repo.freebsd.org>
In-Reply-To: <201810311045.w9VAjSs7012968@repo.freebsd.org>

--nqD73xBNXUFRFdR3XrkvgvZSgfmmsiQtz
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 10/31/2018 3:45 AM, Alex Richardson wrote:
> Author: arichardson
> Date: Wed Oct 31 10:45:28 2018
> New Revision: 339946
> URL: https://svnweb.freebsd.org/changeset/base/339946
>=20
> Log:
>   Don't run cc --version during cleandir/obj stages
>  =20

I haven't had a chance to look at this fully or r339636 but I don't
think this change, r339946, is complete. There's far more tree-walks
than these named ones that should not be running cc.


>   This will no work when there is no cc in $PATH (which is the case bef=
ore the
>   cross-tools stage once we no longer inherit $PATH in $WMAKE).
>   The variables set by bsd.compiler.mk/bsd.linker.mk are not needed in =
these
>   stages so this avoids a little bit of makefile parsing.
>  =20
>   Reviewed By:	emaste
>   Approved By:	jhb (mentor)
>   Differential Revision: https://reviews.freebsd.org/D16814
>=20
> Modified:
>   head/Makefile.inc1
>   head/share/mk/bsd.compiler.mk
>=20
> Modified: head/Makefile.inc1
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/Makefile.inc1	Wed Oct 31 10:30:19 2018	(r339945)
> +++ head/Makefile.inc1	Wed Oct 31 10:45:28 2018	(r339946)
> @@ -950,7 +950,7 @@ _worldtmp: .PHONY
>  .else
>  	${_+_}@if [ -e "${WORLDTMP}" ]; then \
>  		echo ">>> Deleting stale files in build tree..."; \
> -		cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \
> +		cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES _NO_INCLUDE_COMPILE=
RMK=3Dt \
>  		    delete-old delete-old-libs >/dev/null; \
>  	fi
>  	rm -rf ${WORLDTMP}/legacy/usr/include
> @@ -1003,19 +1003,21 @@ _cleanobj:
>  	@echo "--------------------------------------------------------------=
"
>  	@echo ">>> stage 2.1: cleaning up the object tree"
>  	@echo "--------------------------------------------------------------=
"
> -	${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR}
> +	# Avoid including bsd.compiler.mk in clean and obj with _NO_INCLUDE_C=
OMPILERMK
> +	# since the restricted $PATH might not contain a valid cc binary
> +	${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=3Dt ${CLEANDIR}
>  .if defined(LIBCOMPAT)
> -	${_+_}cd ${.CURDIR}; ${LIBCOMPATWMAKE} -f Makefile.inc1 ${CLEANDIR}
> +	${_+_}cd ${.CURDIR}; ${LIBCOMPATWMAKE} _NO_INCLUDE_COMPILERMK=3Dt -f =
Makefile.inc1 ${CLEANDIR}
>  .endif
>  .else
> -	${_+_}cd ${.CURDIR}; ${WMAKE} _cleanobj_fast_depend_hack
> +	${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=3Dt _cleanobj_fa=
st_depend_hack
>  .endif	# !defined(NO_CLEAN)
>  _obj:
>  	@echo
>  	@echo "--------------------------------------------------------------=
"
>  	@echo ">>> stage 2.2: rebuilding the object tree"
>  	@echo "--------------------------------------------------------------=
"
> -	${_+_}cd ${.CURDIR}; ${WMAKE} obj
> +	${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=3Dt obj
>  _build-tools:
>  	@echo
>  	@echo "--------------------------------------------------------------=
"
>=20
> Modified: head/share/mk/bsd.compiler.mk
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/share/mk/bsd.compiler.mk	Wed Oct 31 10:30:19 2018	(r339945)
> +++ head/share/mk/bsd.compiler.mk	Wed Oct 31 10:45:28 2018	(r339946)
> @@ -33,6 +33,16 @@ __<bsd.compiler.mk>__:
> =20
>  .include <bsd.opts.mk>
> =20
> +.if defined(_NO_INCLUDE_COMPILERMK)
> +# If _NO_INCLUDE_COMPILERMK is set we are doing a make obj/cleandir/cl=
eanobj
> +# and might not have a valid compiler in $PATH yet. In this case just =
set the
> +# variables that are expected by the other .mk files and return
> +COMPILER_TYPE=3Dnone
> +X_COMPILER_TYPE=3Dnone
> +COMPILER_VERSION=3D0
> +X_COMPILER_VERSION=3D0
> +COMPILER_FEATURES=3Dnone
> +.else
>  # command =3D /usr/local/bin/ccache cc ...
>  # wrapper =3D /usr/local/libexec/ccache/cc ...
>  CCACHE_BUILD_TYPE?=3D	command
> @@ -220,4 +230,5 @@ ${var}.${${X_}_cc_hash}:=3D	${${var}}
>  .if !defined(_NO_INCLUDE_LINKERMK)
>  .include <bsd.linker.mk>
>  .endif
> +.endif	# defined(_NO_INCLUDE_COMPILERMK)
>  .endif	# !target(__<bsd.compiler.mk>__)
>=20


--=20
Regards,
Bryan Drewery


--nqD73xBNXUFRFdR3XrkvgvZSgfmmsiQtz--

--ZRrTLhiJrfL8Vck9rWCuzU38xbiOQzbL3
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQGTBAEBCgB9FiEE+Rc8ssOq6npcih8JNddxu25Gl88FAlvgy2BfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEY5
MTczQ0IyQzNBQUVBN0E1QzhBMUYwOTM1RDc3MUJCNkU0Njk3Q0YACgkQNddxu25G
l8+Vnwf7Bqney9zSO+iglspjREMi2j8er1a22qF2HjwglNTdKrmmyEtFr/9bJepD
DBEAu0OjK8l6cmiW4CWAeO1h/7V3y9IN9hr+a5418n/lao6kJkrV1deEGoxcC4jv
VywLhcX9yWCInb+5TpjlEuRJyWzn0dzKZrEw70dweioCItPMSdTs38X0A/TldcOb
dpeFq3Jlj7praOU0qfCi/mzkmLdxHIAFiXxujPIoEGckBAjBqbUDlTCg7NW/e1qB
tr1bmb0UARUwrUwFt2zFH7by68HXjFi3KAPdbgBU4U06BtuQc3SaGbmnb7Dfbc/4
GvMbXJuXS/dASAEdqKkaRRc22DvvjA==
=V264
-----END PGP SIGNATURE-----

--ZRrTLhiJrfL8Vck9rWCuzU38xbiOQzbL3--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?eeb3cd76-d260-50d1-d676-5ebdb3c1c74d>