[lfs-support] question about Chapter 6.9 Glibc 'uname -m'

Bruce Dubbs bruce.dubbs at gmail.com
Thu Dec 22 08:31:41 PST 2016


William Harrington wrote:
> On Thu, December 22, 2016 08:15, xinglp wrote:
>> As the below code:
>> case $(uname -m) in
>>      x86) ln -s ld-linux.so.2 /lib/ld-lsb.so.3
>>      ;;
>>      x86_64) ln -s ../lib/ld-linux-x86-64.so.2 /lib64
>>              ln -s ../lib/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
>>      ;;
>> esac
>>
>> On my machine, 'uname -m' only output x86_64 or i686, but never x86.
>> When will it output x86 ?
>>
>> Thanks.
>
> Hello xinglp,
>
> Uname -m will only output x86 if you reprogram it to output x86. x86 means
> for [456]86.
>
> If clarification is required in the book, then perhaps we can let users
> know x86 isn't the actual output expected from uname, but 486, 586 or 686.

Yes, that needs to be changed, but I don't have a 32-bit system any more 
to check.

I suppose it should be:

case $(uname -m) in
  x86_64)
     ln -s ../lib/ld-linux-x86-64.so.2 /lib64
     ln -s ../lib/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
  ;;

  *)
     ln -s ld-linux.so.2 /lib/ld-lsb.so.3
  ;;
esac

DJ, can you verify?

   -- Bruce


More information about the lfs-support mailing list