Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Feb 2018 03:47:21 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Alex Richardson <arichardson@freebsd.org>
Cc:        "Rodney W. Grimes" <rgrimes@freebsd.org>, src-committers <src-committers@freebsd.org>,  svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r328934 - in head: . bin/sh
Message-ID:  <CANCZdfqzzAJocx3nSHojFvPgahF2tX9Ohw0P4onzUwsqT4GtgA@mail.gmail.com>
In-Reply-To: <CANCZdfpB_2Zfy%2BcPuXoAv2baJe_usxXVKu8gHgjhP5YFUbGXEw@mail.gmail.com>
References:  <201802061541.w16FfadO041469@repo.freebsd.org> <201802061925.w16JP4aq017961@pdx.rh.CN85.dnsmgr.net> <CA%2BZ_v8pvX-qYt9HqNTOH2z6VhTasxkY=2w86%2B_PEEF40BznLWA@mail.gmail.com> <CANCZdfoQ4Jy3H-Xoh2csQSjshJmXsdWnQZV8%2B2OxejCYPgH90w@mail.gmail.com> <CANCZdfpB_2Zfy%2BcPuXoAv2baJe_usxXVKu8gHgjhP5YFUbGXEw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 7, 2018 2:35 AM, "Alexander Richardson" <arichardson@freebsd.org>
wrote:

On 6 February 2018 at 19:25, Rodney W. Grimes
<freebsd@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqzzAJocx3nSHojFvPgahF2tX9Ohw0P4onzUwsqT4GtgA>