[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ltib] Sourcery G++ Lite 2010.09-55 for Power GNU/Linux toolchain
From: |
Stuart Hughes |
Subject: |
Re: [Ltib] Sourcery G++ Lite 2010.09-55 for Power GNU/Linux toolchain |
Date: |
Sun, 24 Jul 2011 18:08:39 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7 |
Hi Aaron,
It's a while since I looked at this, but the -B switch, does pretty much
the same thing are your direct version. The odd looking trailing // is
necessary as otherwise (much) older toolchains will fail (it's a bug in
the toolchains).
Once possibility is that for some reason the environment variable:
DEV_IMAGE does not get set properly, which would explain accessing
/usr/lib. Alternately maybe the the path is not found using -B.
Unfortunately I don't have time to look into this at the moment. Could
you try the following:
Put the code back as it was, but add:
print "rootfs stating area: $ENV{DEV_IMAGE}\n";
near the top of the spoof_wrapper file.
If that looks okay, can you try building the helloworld test rpm with -v
added to the compiler line, along the lines of:
./ltib -p helloworld -m prep
Edit rpm/BUILD/helloworld-1.1/Makefile and change the line:
CFLAGS = -Wall
to:
CFLAGS = -Wall -v
and then run:
./ltib -p helloworld 2>&1 | tee helloworld_log.txt
If you look at the file you may be able to see whether the right paths
are being found for the linking.
Regards, Stuart
On 14/07/11 22:50, Aaron Wegner wrote:
> I downloaded the latest CodeSourcery G++ Lite toolchain from their site
> and popped it into the LPP.
>
> /opt/ltib/pkgs/freescale-powerpc-linux-gnu-2010.09-55.i686.rpm
>
> This RPM works fine with my 32-bit Fedora 12 development workstation. In
> my defconfig.dev I have:
>
> CONFIG_TOOLCHAIN="freescale-powerpc-linux-gnu-2010.09-55.i686.rpm"
> CONFIG_TOOLCHAIN_PATH="/opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu"
> CONFIG_TOOLCHAIN_PREFIX="powerpc-linux-gnu-"
> CONFIG_TOOLCHAIN_CFLAGS="-msoft-float -mcpu=860"
>
> However, when I try the same on my 64-bit Fedora 15 development
> workstation I find that I'm not able to link. It bails with linker errors
> such as:
>
> ----
> /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/lib/gcc/powerpc-linux-gnu/4.5.1/../../../../powerpc-linux-gnu/bin/ld:
> skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6
> /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/lib/gcc/powerpc-linux-gnu/4.5.1/../../../../powerpc-linux-gnu/bin/ld:
> cannot find /lib/libc.so.6
> /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/lib/gcc/powerpc-linux-gnu/4.5.1/../../../../powerpc-linux-gnu/bin/ld:
> cannot find /usr/lib/libc_nonshared.a
> /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/lib/gcc/powerpc-linux-gnu/4.5.1/../../../../powerpc-linux-gnu/bin/ld:
> cannot find /lib/ld.so.1
> collect2: ld returned 1 exit status
> ----
>
> I poked around a little and found that if I edit the gcc spoof source
> found in
>
> /opt/ltib/usr/spoof/gcc
>
> and put in the following hack around line 46
>
> # @srch = ('-B', "$ENV{DEV_IMAGE}/usr/lib//",
> @srch = ("-Wl,-L/home/aaron/ltib/rootfs/usr/lib//",
>
> that all my programs compile and link like normal. Is this a product of
> the toolchain? Is there a workaround that is an easy fix, or is this a
> more difficult issue?
>
>
> Thanks,
>
> Aaron
>
>
> _______________________________________________
> LTIB home page: http://ltib.org
>
> Ltib mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/ltib
>