[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 32-bit uname with 64-bit kernel

On Thu, Aug 05, 2010 at 01:16:21PM -0400, Tuco wrote:

> I found this problem when running uname inside a 32-bit chroot, 'uname
> -m' prints amd64! This often breaks configure scripts and build
> systems.
> With this glibc patch, uname corrects the output after it has been
> obtained with sysctl.
> Can I commit this? Is glibc-bsd/glibc-ports/kfreebsd/uname.c the right
> place, or should I send it in a bug report?

I'd recommend you apply FreeBSD r210369 to the kernel instead.

  When compat32 binary asks for the value of hw.machine_arch, report
  the name of 32bit sibling architecture instead of the host one. Do
  the same for hw.machine on amd64.

  Add a safety belt debug.adaptive_machine_arch sysctl, to turn the
  substitution off.

  Reviewed by:	jhb, nwhitehorn
  MFC after:	2 weeks



Reply to: