mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] cross-compiling and uname
@ 2012-01-19 21:47 Michael Olbrich
  2012-01-20  5:30 ` Robert Schwebel
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Michael Olbrich @ 2012-01-19 21:47 UTC (permalink / raw)
  To: ptxdist

Hi,

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.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ptxdist] cross-compiling and uname
  2012-01-19 21:47 [ptxdist] cross-compiling and uname Michael Olbrich
@ 2012-01-20  5:30 ` Robert Schwebel
  2012-01-20  7:31   ` Michael Olbrich
  2012-01-20  9:07 ` Juergen Beisert
  2012-01-21 20:15 ` Bernhard Walle
  2 siblings, 1 reply; 8+ messages in thread
From: Robert Schwebel @ 2012-01-20  5:30 UTC (permalink / raw)
  To: ptxdist

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.

rsc
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ptxdist] cross-compiling and uname
  2012-01-20  5:30 ` Robert Schwebel
@ 2012-01-20  7:31   ` Michael Olbrich
  2012-01-20  7:38     ` Robert Schwebel
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Olbrich @ 2012-01-20  7:31 UTC (permalink / raw)
  To: ptxdist

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.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ptxdist] cross-compiling and uname
  2012-01-20  7:31   ` Michael Olbrich
@ 2012-01-20  7:38     ` Robert Schwebel
  2012-01-20  8:36       ` Marc Kleine-Budde
  2012-01-20  9:09       ` Juergen Beisert
  0 siblings, 2 replies; 8+ messages in thread
From: Robert Schwebel @ 2012-01-20  7:38 UTC (permalink / raw)
  To: ptxdist; +Cc: Marc Kleine-Budde

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?

rsc
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ptxdist] cross-compiling and uname
  2012-01-20  7:38     ` Robert Schwebel
@ 2012-01-20  8:36       ` Marc Kleine-Budde
  2012-01-20  9:09       ` Juergen Beisert
  1 sibling, 0 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2012-01-20  8:36 UTC (permalink / raw)
  To: Robert Schwebel; +Cc: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 1981 bytes --]

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 #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ptxdist] cross-compiling and uname
  2012-01-19 21:47 [ptxdist] cross-compiling and uname Michael Olbrich
  2012-01-20  5:30 ` Robert Schwebel
@ 2012-01-20  9:07 ` Juergen Beisert
  2012-01-21 20:15 ` Bernhard Walle
  2 siblings, 0 replies; 8+ messages in thread
From: Juergen Beisert @ 2012-01-20  9:07 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Olbrich

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?

Please not! It would be a hack, not a solution!

jbe

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ptxdist] cross-compiling and uname
  2012-01-20  7:38     ` Robert Schwebel
  2012-01-20  8:36       ` Marc Kleine-Budde
@ 2012-01-20  9:09       ` Juergen Beisert
  1 sibling, 0 replies; 8+ messages in thread
From: Juergen Beisert @ 2012-01-20  9:09 UTC (permalink / raw)
  To: ptxdist; +Cc: Robert Schwebel, Marc Kleine-Budde

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?

The autotools already deliver the correct values for the build host and the 
target host.
The correct solution for these kind of failures in the buildsystem is to use 
the results of the autotools *correctly*.

jbe

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ptxdist] cross-compiling and uname
  2012-01-19 21:47 [ptxdist] cross-compiling and uname Michael Olbrich
  2012-01-20  5:30 ` Robert Schwebel
  2012-01-20  9:07 ` Juergen Beisert
@ 2012-01-21 20:15 ` Bernhard Walle
  2 siblings, 0 replies; 8+ messages in thread
From: Bernhard Walle @ 2012-01-21 20:15 UTC (permalink / raw)
  To: ptxdist

Hi Michael,

Am 19.01.12 22:47, schrieb Michael Olbrich:
> 
> 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.

I agree with the others: Fixing the packages is the better solution in
my opinion. For the neon fix I'm trying to bring the patch upstream, so
that would be one patch less in the long term.

Especially as the absolute number of packages affected is quite low.
With the current git ptxdist (and one fix for the kernel and
module-init-tools I didn't post yet) and Andreas' OSELAS.Toolchain
patches I'm able to build a complete image for my weather station
receiver on
Mac OS. :)


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-01-21 20:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-19 21:47 [ptxdist] cross-compiling and uname Michael Olbrich
2012-01-20  5:30 ` Robert Schwebel
2012-01-20  7:31   ` Michael Olbrich
2012-01-20  7:38     ` Robert Schwebel
2012-01-20  8:36       ` Marc Kleine-Budde
2012-01-20  9:09       ` Juergen Beisert
2012-01-20  9:07 ` Juergen Beisert
2012-01-21 20:15 ` Bernhard Walle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox