On 01/20/2012 08:38 AM, Robert Schwebel wrote:
> On Fri, Jan 20, 2012 at 08:31:44AM +0100, Michael Olbrich wrote:
>> On Fri, Jan 20, 2012 at 06:30:49AM +0100, Robert Schwebel wrote:
>>> On Thu, Jan 19, 2012 at 10:47:55PM +0100, Michael Olbrich wrote:
>>>> we had some patches lately about configure scripts etc. using
>>>> uname to detect stuff. Why don't we create a fake
>>>> ../sysroot-cross/bin/uname that produces the output we would
>>>> expect on the target?  This way we don't have to fix all those
>>>> packages and we have on less source of host system information
>>>> leaking into the build.
>>>
>>> Are there any host tools which do also run uname? I'd prefer
>>> overwriting cached variables or something like that.
>>
>> That's why I want to place it in sysroot-cross/bin. That's not in PATH
>> for hosttools.
> 
> Hmm, I'm still not sure if this was side-effect free. However, leaving
> it as it is will result in at least the same ammount of failures :-)
> 
> Marc, do you have an oppinion?

We cannot overwrite uname, because even configure with --host and
--build uses uname:

$ strace -o log -e execve -f ./configure --host=x86_64-unknown-linux-gnu 
--build=x86_64-unknown-linux-gnu
$ grep uname log
1610  execve("/bin/uname", ["uname", "-m"], [/* 51 vars */]) = 0
1612  execve("/bin/uname", ["uname", "-r"], [/* 51 vars */]) = 0
1614  execve("/bin/uname", ["uname", "-s"], [/* 51 vars */]) = 0
1616  execve("/bin/uname", ["uname", "-v"], [/* 51 vars */]) = 0
1618  execve("/usr/bin/uname", ["/usr/bin/uname", "-p"], [/* 51 vars */]) = -1 
ENOENT (No such file or directory)
1620  execve("/bin/uname", ["/bin/uname", "-X"], [/* 51 vars */]) = 0

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to