ltib
[Top][All Lists]
Advanced

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

Re: [Ltib] "can't open gcc"


From: Stuart Hughes
Subject: Re: [Ltib] "can't open gcc"
Date: Mon, 12 May 2008 08:53:54 +0100

On Fri, 2008-05-09 at 15:02 -0400, Peter Barada wrote:
> On Thu, 2008-05-08 at 11:48 +0100, Stuart Hughes wrote:
> > Hi Peter,
> > 
> > It's hard to tell what's happening here, but probably the best thing to
> > do to track this down is to insert the following into
> > dist/lfs-5.1/kernel/kernel-common.tmpl
> > 
> > $ cvs diff -u dist/lfs-5.1/kernel/kernel-common.tmpl
> > Index: dist/lfs-5.1/kernel/kernel-common.tmpl
> > ===================================================================
> > RCS file: /sources/ltib/ltib/dist/lfs-5.1/kernel/kernel-common.tmpl,v
> > retrieving revision 1.4
> > diff -u -u -r1.4 kernel-common.tmpl
> > --- dist/lfs-5.1/kernel/kernel-common.tmpl      4 Apr 2008 15:48:12 -0000   
> >    1.4
> > +++ dist/lfs-5.1/kernel/kernel-common.tmpl      8 May 2008 10:47:50 -0000
> > @@ -92,6 +92,7 @@
> >  then
> >      make ARCH=$LINTARCH CROSS_COMPILE= HOSTCC="$BUILDCC" menuconfig
> >  else
> > +/bin/sh
> >      yes "" | make ARCH=$LINTARCH CROSS_COMPILE= HOSTCC="$BUILDCC" oldconfig
> >  fi
> >  if [ -f $PLATFORM_PATH/${PKG_KERNEL_PRECONFIG} ]
> > 
> > 
> > And then run: ./ltib -p kernel
> > You will then get dropped to the shell prompt in the exact environment
> > that the kernel gets built in.  From there you can do `which gcc` etc.
> > For example on mine:
> > 
> > sh-3.00$ which gcc
> > /opt/ltib/usr/spoof/gcc
> > sh-3.00$ gcc -v
> > Using built-in specs.
> > Target: arm-none-linux-gnueabi
> > Configured
> > with: /usr/src/redhat/BUILD/cross-mlib/source/gcc-4.1.2/configure
> > --target=arm-none-linux-gnueabi --host=i686-host_pc-linux-gnu
> > --prefix=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi
> >  
> > --with-sysroot=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/arm-none-linux-gnueabi/sysroot
> >  --enable-threads --enable-shared --disable-libssp --disable-libgomp 
> > --disable-libmudflap --enable-languages=c,c++ --enable-__cxa_atexit 
> > --disable-nls
> > Thread model: posix
> > gcc version 4.1.2
> > 
> > $ echo $TOOLCHAIN
> > tc-fsl-x86lnx-armeabi-nptl-4.1.2-3.i386.rpm
> > $ echo $TOOLCHAIN_CFLAGS
> > -O2 -fsigned-char -mfloat-abi=i=softfp -mfpu=vfp
> > $ echo $TOOLCHAIN_PREFIX
> > arm-none-linux-gnueabi-
> > $ echo $TOOLCHAIN_PATH
> > /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi
> > 
> > Also note that to see what the spoofer is actually calling, set:
> > export FS_DEBUG=1
> > 
> > Regards, Stuart
> 
> Ubuntu uses 'dash', not 'bash' for /bin/sh...
> The fix (Google is my friend) is:
> 
> sudo apt-get remove dash
> sudo apt-get install bash
> 

Hi Peter,

Thanks for reminding me of this.  Later versions of LTIB will work with
dash.  This bug has to do with whether the spoofer is directly invoked
or not.  Later versions of the spoofer
(/opt/freescale/ltib/usr/spoof/spoof_wrapper or /opt/ltib/...) that work
with dash as well as bash start with this:

#!/usr/bin/perl -w

Earlier versions (not working with dash) had:

eval 'exec perl -w -S $0 ${1+"$@"}'
    if $running_under_some_shell;
$running_under_some_shell = 0;


Regards, Stuart








reply via email to

[Prev in Thread] Current Thread [Next in Thread]