The uname hack revisited

Kevin Krumwiede krum at oco.net
Thu Jul 19 16:41:48 PDT 2001


I always wondered why, instead of hacking uname itself, it can't be
temporarily renamed or moved and replaced with a script that fakes the -m
option and calls the original for everything else?

raw (hmm, where's my bash book?):

#!/bin/sh
if [ "$1" = '-m' ]; then
   echo 'i386'
else
   /usr/bin/uname-orig $@
fi


-----Original Message-----
From: lfs-discuss-owner at linuxfromscratch.org
[mailto:lfs-discuss-owner at linuxfromscratch.org]On Behalf Of Jeroen
Coumans
Sent: Thursday, July 19, 2001 7:03 PM
To: lfs-discuss at linuxfromscratch.org
Subject: Re: BASH static compilation using termcap library


> Also I am installing LFS into a second hard-drive which I
> would like to moe into an old i386 I have lying around
> (Just for fun really).  I noticed that Bash seemedto find
> the i586 equivalent processor in the computer it is
> currently resident in.  Is this going to completely screw
> me up? i.e. has it compiled for pentium PC?

This could get you into trouble. I remember there was a uname-hack exactly
for this kind of cross-compiling. Search the mail-archives for
cross-compiling and uname, it should come up. Cross-compiling has gotten a
lot of people into trouble, but there are also lots of hints in the
archives.
Good luck!
--
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message


-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message



More information about the lfs-dev mailing list