* Toolchain Issues
@ 2013-07-16 8:21 Jack Mitchell
2013-07-16 10:25 ` Richard Purdie
2013-07-16 13:30 ` Mark Hatle
0 siblings, 2 replies; 4+ messages in thread
From: Jack Mitchell @ 2013-07-16 8:21 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Morning everyone,
I'm trying to create a custom toolchain and sdk for a development board
and I'm having some issues.
I create my toolchain with the following method:
bitbake image -c populate_sdk
When I try to compile u-boot with the sdk, I recieve the following error:
Configuring for socfpga_cyclone5 board...
make[1]: *** [/mnt/SSD/socfpga/u-boot-socfpga.git/spl/u-boot-spl]
Error 1
make: *** [spl/u-boot-spl.bin] Error 2
make: *** [u-boot] Error 1
arm-oecore-linux-gnueabi-size: './u-boot': No such file
arm-oecore-linux-gnueabi-ld.bfd: cannot find -lgcc
make[1]: *** [/mnt/SSD/socfpga/u-boot-socfpga.git/spl/u-boot-spl]
Error 1
make: *** [spl/u-boot-spl.bin] Error 2
make: *** Waiting for unfinished jobs....
arm-oecore-linux-gnueabi-ld.bfd: cannot find -lgcc
make: *** [u-boot] Error 1
So I took a look at the gcc -v and it gives me:
[09:14:40 jack u-boot-socfpga.git]$ arm-oecore-linux-gnueabi-gcc -v |
grep custom
Using built-in specs.
COLLECT_GCC=arm-oecore-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/mnt/SSD/socfpga/custom-sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/bin/cortexa9hf-vfp-neon-oecore-linux-gnueabi/../../libexec/cortexa9hf-vfp-neon-oecore-linux-gnueabi/gcc/arm-oecore-linux-gnueabi/4.8.1/lto-wrapper
Target: arm-oecore-linux-gnueabi
Configured with:
/mnt/SSD/oe-r0005/altera-r0005/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/configure
--build=x86_64-linux --host=x86_64-oecore-linux
--target=arm-oecore-linux-gnueabi
--prefix=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr
--exec_prefix=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr
--bindir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/bin/cortexa9hf-vfp-neon-oecore-linux-gnueabi
--sbindir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/bin/cortexa9hf-vfp-neon-oecore-linux-gnueabi
--libexecdir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/libexec/cortexa9hf-vfp-neon-oecore-linux-gnueabi
--datadir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/share
--sysconfdir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/etc
--sharedstatedir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/com
--localstatedir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/var
--libdir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/lib/cortexa9hf-vfp-neon-oecore-linux-gnueabi
--includedir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/include
--oldincludedir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/include
--infodir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/share/info
--mandir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/share/man
--disable-silent-rules --disable-dependency-tracking
--with-libtool-sysroot=/mnt/SSD/oe-r0005/altera-r0005/tmp/sysroots/x86_64-nativesdk-oecore-linux
--with-gnu-ld --enable-shared --enable-languages=c,c++
--enable-threads=posix --enable-multilib --enable-c99 --enable-long-long
--enable-symvers=gnu --enable-libstdcxx-pch
--program-prefix=arm-oecore-linux-gnueabi- --without-local-prefix
--enable-target-optspace --enable-lto --enable-libssp
--disable-bootstrap --disable-libmudflap --with-system-zlib
--with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no
--with-cloog=no --enable-checking=release --enable-cheaders=c_global
--with-float=hard
--with-gxx-include-dir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/cortexa9hf-vfp-neon-oecore-linux-gnueabi/usr/include/c++
--with-build-time-tools=/mnt/SSD/oe-r0005/altera-r0005/tmp/sysroots/x86_64-linux/usr/arm-oecore-linux-gnueabi/bin
--with-sysroot=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/cortexa9hf-vfp-neon-oecore-linux-gnueabi
--with-build-sysroot=/mnt/SSD/oe-r0005/altera-r0005/tmp/sysroots/socfpga_cyclone5
--disable-libunwind-exceptions --disable-libssp --disable-libgomp
--disable-libmudflap
--with-mpfr=/mnt/SSD/oe-r0005/altera-r0005/tmp/sysroots/x86_64-nativesdk-oecore-linux
--with-mpc=/mnt/SSD/oe-r0005/altera-r0005/tmp/sysroots/x86_64-nativesdk-oecore-linux
--enable-nls
Thread model: posix
gcc version 4.8.1 (GCC)
Now, my toolchain is located in the directory:
/mnt/SSD/socfpga/custom-sdk/1.0-20130715
So, why does most of the GCC version info mention the default directory of:
/mnt/SSD/r0005sdk/1.0-20130715
Is this a bug, or just a quirk? If it's a quirk then why can't u-boot
find -lgcc on compile?
Cheers,
--
Jack Mitchell (jack@embed.me.uk)
Embedded Systems Engineer
http://www.embed.me.uk
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Toolchain Issues
2013-07-16 8:21 Toolchain Issues Jack Mitchell
@ 2013-07-16 10:25 ` Richard Purdie
2013-07-16 13:30 ` Mark Hatle
1 sibling, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2013-07-16 10:25 UTC (permalink / raw)
To: ml; +Cc: Patches and discussions about the oe-core layer
On Tue, 2013-07-16 at 09:21 +0100, Jack Mitchell wrote:
> Morning everyone,
>
> I'm trying to create a custom toolchain and sdk for a development board
> and I'm having some issues.
>
> I create my toolchain with the following method:
>
> bitbake image -c populate_sdk
>
> When I try to compile u-boot with the sdk, I recieve the following error:
>
> Configuring for socfpga_cyclone5 board...
> make[1]: *** [/mnt/SSD/socfpga/u-boot-socfpga.git/spl/u-boot-spl]
> Error 1
> make: *** [spl/u-boot-spl.bin] Error 2
> make: *** [u-boot] Error 1
> arm-oecore-linux-gnueabi-size: './u-boot': No such file
> arm-oecore-linux-gnueabi-ld.bfd: cannot find -lgcc
> make[1]: *** [/mnt/SSD/socfpga/u-boot-socfpga.git/spl/u-boot-spl]
> Error 1
> make: *** [spl/u-boot-spl.bin] Error 2
> make: *** Waiting for unfinished jobs....
> arm-oecore-linux-gnueabi-ld.bfd: cannot find -lgcc
> make: *** [u-boot] Error 1
The toolchain environment script requires some --sysroot options to be
passed to the compiler/linker. I'm guessing uboot isn't getting these.
See the uboot recipes for how to pass in those options.
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Toolchain Issues
2013-07-16 8:21 Toolchain Issues Jack Mitchell
2013-07-16 10:25 ` Richard Purdie
@ 2013-07-16 13:30 ` Mark Hatle
2013-07-16 13:51 ` Jack Mitchell
1 sibling, 1 reply; 4+ messages in thread
From: Mark Hatle @ 2013-07-16 13:30 UTC (permalink / raw)
To: openembedded-core
On 7/16/13 3:21 AM, Jack Mitchell wrote:
> Morning everyone,
>
> I'm trying to create a custom toolchain and sdk for a development board
> and I'm having some issues.
>
> I create my toolchain with the following method:
>
> bitbake image -c populate_sdk
>
> When I try to compile u-boot with the sdk, I recieve the following error:
>
How are you compiling/linking uboot, what options are you using?
When you load the SDK, you need to source the environment file, and then you
should be using $CC/$LD from the environment as the compiler. Calling the
arm-... directly may lead to failures as the --sysroot parameter is not passed
to the compiler.
--Mark
> Configuring for socfpga_cyclone5 board...
> make[1]: *** [/mnt/SSD/socfpga/u-boot-socfpga.git/spl/u-boot-spl]
> Error 1
> make: *** [spl/u-boot-spl.bin] Error 2
> make: *** [u-boot] Error 1
> arm-oecore-linux-gnueabi-size: './u-boot': No such file
> arm-oecore-linux-gnueabi-ld.bfd: cannot find -lgcc
> make[1]: *** [/mnt/SSD/socfpga/u-boot-socfpga.git/spl/u-boot-spl]
> Error 1
> make: *** [spl/u-boot-spl.bin] Error 2
> make: *** Waiting for unfinished jobs....
> arm-oecore-linux-gnueabi-ld.bfd: cannot find -lgcc
> make: *** [u-boot] Error 1
>
> So I took a look at the gcc -v and it gives me:
>
> [09:14:40 jack u-boot-socfpga.git]$ arm-oecore-linux-gnueabi-gcc -v |
> grep custom
> Using built-in specs.
> COLLECT_GCC=arm-oecore-linux-gnueabi-gcc
> COLLECT_LTO_WRAPPER=/mnt/SSD/socfpga/custom-sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/bin/cortexa9hf-vfp-neon-oecore-linux-gnueabi/../../libexec/cortexa9hf-vfp-neon-oecore-linux-gnueabi/gcc/arm-oecore-linux-gnueabi/4.8.1/lto-wrapper
> Target: arm-oecore-linux-gnueabi
> Configured with:
> /mnt/SSD/oe-r0005/altera-r0005/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/configure
> --build=x86_64-linux --host=x86_64-oecore-linux
> --target=arm-oecore-linux-gnueabi
> --prefix=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr
> --exec_prefix=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr
> --bindir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/bin/cortexa9hf-vfp-neon-oecore-linux-gnueabi
> --sbindir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/bin/cortexa9hf-vfp-neon-oecore-linux-gnueabi
> --libexecdir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/libexec/cortexa9hf-vfp-neon-oecore-linux-gnueabi
> --datadir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/share
> --sysconfdir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/etc
> --sharedstatedir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/com
> --localstatedir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/var
> --libdir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/lib/cortexa9hf-vfp-neon-oecore-linux-gnueabi
> --includedir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/include
> --oldincludedir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/include
> --infodir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/share/info
> --mandir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/share/man
> --disable-silent-rules --disable-dependency-tracking
> --with-libtool-sysroot=/mnt/SSD/oe-r0005/altera-r0005/tmp/sysroots/x86_64-nativesdk-oecore-linux
> --with-gnu-ld --enable-shared --enable-languages=c,c++
> --enable-threads=posix --enable-multilib --enable-c99 --enable-long-long
> --enable-symvers=gnu --enable-libstdcxx-pch
> --program-prefix=arm-oecore-linux-gnueabi- --without-local-prefix
> --enable-target-optspace --enable-lto --enable-libssp
> --disable-bootstrap --disable-libmudflap --with-system-zlib
> --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no
> --with-cloog=no --enable-checking=release --enable-cheaders=c_global
> --with-float=hard
> --with-gxx-include-dir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/cortexa9hf-vfp-neon-oecore-linux-gnueabi/usr/include/c++
> --with-build-time-tools=/mnt/SSD/oe-r0005/altera-r0005/tmp/sysroots/x86_64-linux/usr/arm-oecore-linux-gnueabi/bin
> --with-sysroot=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/cortexa9hf-vfp-neon-oecore-linux-gnueabi
> --with-build-sysroot=/mnt/SSD/oe-r0005/altera-r0005/tmp/sysroots/socfpga_cyclone5
> --disable-libunwind-exceptions --disable-libssp --disable-libgomp
> --disable-libmudflap
> --with-mpfr=/mnt/SSD/oe-r0005/altera-r0005/tmp/sysroots/x86_64-nativesdk-oecore-linux
> --with-mpc=/mnt/SSD/oe-r0005/altera-r0005/tmp/sysroots/x86_64-nativesdk-oecore-linux
> --enable-nls
> Thread model: posix
> gcc version 4.8.1 (GCC)
>
> Now, my toolchain is located in the directory:
>
> /mnt/SSD/socfpga/custom-sdk/1.0-20130715
>
> So, why does most of the GCC version info mention the default directory of:
>
> /mnt/SSD/r0005sdk/1.0-20130715
>
> Is this a bug, or just a quirk? If it's a quirk then why can't u-boot
> find -lgcc on compile?
>
> Cheers,
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Toolchain Issues
2013-07-16 13:30 ` Mark Hatle
@ 2013-07-16 13:51 ` Jack Mitchell
0 siblings, 0 replies; 4+ messages in thread
From: Jack Mitchell @ 2013-07-16 13:51 UTC (permalink / raw)
To: openembedded-core
On 16/07/13 14:30, Mark Hatle wrote:
> On 7/16/13 3:21 AM, Jack Mitchell wrote:
>> Morning everyone,
>>
>> I'm trying to create a custom toolchain and sdk for a development board
>> and I'm having some issues.
>>
>> I create my toolchain with the following method:
>>
>> bitbake image -c populate_sdk
>>
>> When I try to compile u-boot with the sdk, I recieve the following error:
>>
>
> How are you compiling/linking uboot, what options are you using?
>
> When you load the SDK, you need to source the environment file, and then
> you should be using $CC/$LD from the environment as the compiler.
> Calling the arm-... directly may lead to failures as the --sysroot
> parameter is not passed to the compiler.
>
> --Mark
>
>> Configuring for socfpga_cyclone5 board...
>> make[1]: *** [/mnt/SSD/socfpga/u-boot-socfpga.git/spl/u-boot-spl]
>> Error 1
>> make: *** [spl/u-boot-spl.bin] Error 2
>> make: *** [u-boot] Error 1
>> arm-oecore-linux-gnueabi-size: './u-boot': No such file
>> arm-oecore-linux-gnueabi-ld.bfd: cannot find -lgcc
>> make[1]: *** [/mnt/SSD/socfpga/u-boot-socfpga.git/spl/u-boot-spl]
>> Error 1
>> make: *** [spl/u-boot-spl.bin] Error 2
>> make: *** Waiting for unfinished jobs....
>> arm-oecore-linux-gnueabi-ld.bfd: cannot find -lgcc
>> make: *** [u-boot] Error 1
>>
>> So I took a look at the gcc -v and it gives me:
>>
>> [09:14:40 jack u-boot-socfpga.git]$ arm-oecore-linux-gnueabi-gcc -v |
>> grep custom
>> Using built-in specs.
>> COLLECT_GCC=arm-oecore-linux-gnueabi-gcc
>> COLLECT_LTO_WRAPPER=/mnt/SSD/socfpga/custom-sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/bin/cortexa9hf-vfp-neon-oecore-linux-gnueabi/../../libexec/cortexa9hf-vfp-neon-oecore-linux-gnueabi/gcc/arm-oecore-linux-gnueabi/4.8.1/lto-wrapper
>>
>> Target: arm-oecore-linux-gnueabi
>> Configured with:
>> /mnt/SSD/oe-r0005/altera-r0005/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/configure
>>
>> --build=x86_64-linux --host=x86_64-oecore-linux
>> --target=arm-oecore-linux-gnueabi
>> --prefix=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr
>> --exec_prefix=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr
>>
>> --bindir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/bin/cortexa9hf-vfp-neon-oecore-linux-gnueabi
>>
>> --sbindir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/bin/cortexa9hf-vfp-neon-oecore-linux-gnueabi
>>
>> --libexecdir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/libexec/cortexa9hf-vfp-neon-oecore-linux-gnueabi
>>
>> --datadir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/share
>>
>> --sysconfdir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/etc
>>
>> --sharedstatedir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/com
>>
>> --localstatedir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/var
>>
>> --libdir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/lib/cortexa9hf-vfp-neon-oecore-linux-gnueabi
>>
>> --includedir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/include
>>
>> --oldincludedir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/include
>>
>> --infodir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/share/info
>>
>> --mandir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/x86_64-oecore-linux/usr/share/man
>>
>> --disable-silent-rules --disable-dependency-tracking
>> --with-libtool-sysroot=/mnt/SSD/oe-r0005/altera-r0005/tmp/sysroots/x86_64-nativesdk-oecore-linux
>>
>> --with-gnu-ld --enable-shared --enable-languages=c,c++
>> --enable-threads=posix --enable-multilib --enable-c99 --enable-long-long
>> --enable-symvers=gnu --enable-libstdcxx-pch
>> --program-prefix=arm-oecore-linux-gnueabi- --without-local-prefix
>> --enable-target-optspace --enable-lto --enable-libssp
>> --disable-bootstrap --disable-libmudflap --with-system-zlib
>> --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no
>> --with-cloog=no --enable-checking=release --enable-cheaders=c_global
>> --with-float=hard
>> --with-gxx-include-dir=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/cortexa9hf-vfp-neon-oecore-linux-gnueabi/usr/include/c++
>>
>> --with-build-time-tools=/mnt/SSD/oe-r0005/altera-r0005/tmp/sysroots/x86_64-linux/usr/arm-oecore-linux-gnueabi/bin
>>
>> --with-sysroot=/mnt/SSD/r0005sdk/1.0-20130715/sysroots/cortexa9hf-vfp-neon-oecore-linux-gnueabi
>>
>> --with-build-sysroot=/mnt/SSD/oe-r0005/altera-r0005/tmp/sysroots/socfpga_cyclone5
>>
>> --disable-libunwind-exceptions --disable-libssp --disable-libgomp
>> --disable-libmudflap
>> --with-mpfr=/mnt/SSD/oe-r0005/altera-r0005/tmp/sysroots/x86_64-nativesdk-oecore-linux
>>
>> --with-mpc=/mnt/SSD/oe-r0005/altera-r0005/tmp/sysroots/x86_64-nativesdk-oecore-linux
>>
>> --enable-nls
>> Thread model: posix
>> gcc version 4.8.1 (GCC)
>>
>> Now, my toolchain is located in the directory:
>>
>> /mnt/SSD/socfpga/custom-sdk/1.0-20130715
>>
>> So, why does most of the GCC version info mention the default
>> directory of:
>>
>> /mnt/SSD/r0005sdk/1.0-20130715
>>
>> Is this a bug, or just a quirk? If it's a quirk then why can't u-boot
>> find -lgcc on compile?
>>
>> Cheers,
>>
I managed to fix this. In order to get it built I needed to unset the
LDFLAGS as this specifies options when using gcc to link, instead of
using ld directly.
I also needed to export:
USE_PRIVATE_LIBGCC=/mnt/SSD/socfpga/custom-sdk/1.0-20130716/sysroots/cortexa9hf-vfp-neon-oecore-linux-gnueabi/usr/lib/arm-oecore-linux-gnueabi/4.8.1
to allow u-boot to pick up libgcc.a. This then involved crafting a patch
to support specifying a private libgcc in the standalone examples
Makefile which I have submitted upstream.
A bit of a slog, but I got there in the end!
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
Jack Mitchell (jack@embed.me.uk)
Embedded Systems Engineer
http://www.embed.me.uk
--
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-07-16 13:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-16 8:21 Toolchain Issues Jack Mitchell
2013-07-16 10:25 ` Richard Purdie
2013-07-16 13:30 ` Mark Hatle
2013-07-16 13:51 ` Jack Mitchell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.