[Buildroot] [PATCH 2 of 3 v2] dependencies: build a host-tar if no suitable tar can be found

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Nov 23 14:24:40 UTC 2011


Le Wed, 23 Nov 2011 14:59:59 +0100,
Thomas De Schampheleire <patrickdepinguin+buildroot at gmail.com> a écrit :

> Some toolchains, like the one built with buildroot itself, use
> hardlinks (for example to link between the c++ and g++ binary).
> Unpacking such a toolchain with the --strip-components options does
> not work correctly if the system tar is too old (<1.17). Even recent
> releases of RedHat/CentOS still ship with tar 1.15.
> 
> This patch checks for a suitable tar version (tar 1.17+) on the host
> system, and adds host-tar to the host dependencies if none can be
> found.
> 
> TAR is redefined to HOST_TAR, except when extracting host-tar (this
> is a chicken-and-egg problem), so that all packages use the host-tar
> if no suitable tar was found.

I am still puzzled by the fact that tar is needed to extract this
host-tar, so there's like a chicken-and-egg problem. I understand that
the real host tar is used to extract the host-tar, which is then use to
extract all other packages. But that sounds really nasty to me.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com



More information about the buildroot mailing list