svn commit: r328934 - in head: . bin/sh

Warner Losh imp at bsdimp.com
Wed Feb 7 10:47:23 UTC 2018


On Feb 7, 2018 2:35 AM, "Alexander Richardson" <arichardson at freebsd.org>
wrote:

On 6 February 2018 at 19:25, Rodney W. Grimes
<freebsd at pdx.rh.cn85.dnsmgr.net> wrote:
>> Author: arichardson
>> Date: Tue Feb  6 15:41:35 2018
>> New Revision: 328934
>> URL: https://svnweb.freebsd.org/changeset/base/328934
>>
>> Log:
>>   Don't hardcode /usr/bin as the path for mktemp in build tools
>>
>>   It won't work e.g. when crossbuilding from Ubuntu Linux as mktemp is in
>>   /bin there.
>>
>>   Reviewed By:        bdrewery
>>   Approved By:        jhb (mentor)
>>   Differential Revision: https://reviews.freebsd.org/D13937
>
> Would it be better to create the variable MKTEMP to point at
> either /bin/mktemp or /usr/bin/mktemp dependent on platform,
> there are reasons we use full paths in Makefiles, mostly to
> stop /usr/local/bin/foo contimaton, which I believe this
> change now opens up, though very slight as I dont know of
> a third party mktemp binary.
>
I'm happy to have a mktemp variable instead, but I don't believe files
in /usr/local/bin are a problem. When in add an echo $PATH to the
mktokens.sh file I get the following output:
PATH=/home/alr48/obj/build/freebsd-mips-build/exports/
users/alr48/sources/freebsd-mips/mips.mips64/tmp/legacy/
usr/sbin:/home/alr48/obj/build/freebsd-mips-build/
exports/users/alr48/sources/freebsd-mips/mips.mips64/tmp/
legacy/usr/bin:/home/alr48/obj/build/freebsd-mips-build/
exports/users/alr48/sources/freebsd-mips/mips.mips64/tmp/
legacy/bin:/home/alr48/obj/build/freebsd-mips-build/
exports/users/alr48/sources/freebsd-mips/mips.mips64/tmp/
usr/sbin:/home/alr48/obj/build/freebsd-mips-build/
exports/users/alr48/sources/freebsd-mips/mips.mips64/tmp/
usr/bin:/sbin:/bin:/usr/sbin:/usr/bin

This only contains WORLDTMP and /sbin:/bin:/usr/sbin:/usr/bin since
the toplevel makefile already sets PATH to
/sbin:/bin:/usr/sbin:/usr/bin.



I honestly wouldn't add a variable. It makes it more complicated for zero
benefit. Unless a reasonable use case can be shown, it just flutters up the
build for no benefit.

Warner


More information about the svn-src-all mailing list