[Buildroot] [PATCHv2] core/pkg-toolchain-external: quiesce spurious stderr
Arnout Vandecappelle
arnout at mind.be
Thu Aug 17 22:08:51 UTC 2017
On 17-08-17 21:19, Yann E. MORIN wrote:
> Since 392b0a26f5 (toolchain-external: default BR2_TOOLCHAIN_EXTERNAL_PATH
> to empty), calling 'make clean' or similar can yield a spurious stderr
> message:
> dirname: missing operand
> Try 'dirname --help' for more information.
>
> Which is definitely baffling and unsettling...
>
> It turns out that it is pretty trivial to reproduce, and this defconfig
> is just enough:
>
> $ cat my-defconfig
> BR2_TOOLCHAIN_EXTERNAL=y
>
> $ make BR2_DEFCONFIG=$(pwd)/my-defconfig defconfig
>
> $ make clean
> dirname: missing operand
> Try 'dirname --help' for more information.
> [--snip--]
>
> This is because the cross-compiler is not found in the PATH (and for
> good reasons, I don't have it in the PATH, not even at all).
>
> So, when the cross-compiler is not found in the path, we simply
> continue as if all was good, and postpone the check to much later,
> when we try to copy the toolchain libs...
>
> So, use a make construct rather than calling to the shell: $(dir ...)
> does not whine if passed nothing.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
> Cc: Arnout Vandecappelle <arnout at mind.be>
> Cc: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
> Cc: Thomas De Schampheleire <patrickdepinguin at gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
More information about the buildroot
mailing list