public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* building a multilb ARM toolchain for softfp and hard float
@ 2012-09-18 17:54 Peter Barada
  2012-09-19  2:07 ` Zhenqiang Chen
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Barada @ 2012-09-18 17:54 UTC (permalink / raw)
  To: crossgcc

I'm having a tough time trying to come up with a newer toolchain for
cortex-a8 that has support for both hard and soft floating point.  I've
tried building a toolchain using
crosstool-ng-linaro-1.13.1-2012.08-20120827.tar.bz2 but when I try to
compile u-boot it complains with:


arm-eabi-gcc  -g  -Os -mhard-float   -fno-common -ffixed-r8
-msoft-float   -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x80400000
-I/home/peter/work/logic/eps_svn/software/products/linux/LTIB/trunk/ltib-3.0-new-toolchain/rpm/BUILD/u-boot-svn/include
-fno-builtin -ffreestanding -nostdinc -isystem
/home/peter/work/logic/crosstool-ng-linaro-1.13.1-2012.08-20120827/install/lib/gcc/arm-eabi/4.7.2/include
-pipe  -DCONFIG_ARM -D__ARM__         -march=armv5 -Wall
-Wstrict-prototypes     -o smc911x_eeprom.o smc911x_eeprom.c -c
arm-eabi-gcc: error: -mfloat-abi=soft and -mfloat-abi=hard may not be
used together

Removing "-mhard-float" causes a different error:

arm-eabi-ld: error:
/home/peter/work/logic/crosstool-ng-linaro-1.13.1-2012.08-20120827/install/lib/gcc/arm-eabi/4.7.2/libgcc.a(bpabi.o)
uses VFP register arguments, u-boot does not

Does anyone have a crosstool configuration that builds both softfp and
hard multilibs?  If not does anyone have suggestions on how I can do it?

Thanks in advance!

-- 
Peter Barada
peter.barada@logicpd.com


--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: building a multilb ARM toolchain for softfp and hard float
  2012-09-18 17:54 building a multilb ARM toolchain for softfp and hard float Peter Barada
@ 2012-09-19  2:07 ` Zhenqiang Chen
  2012-09-20 20:29   ` Peter Barada
  0 siblings, 1 reply; 4+ messages in thread
From: Zhenqiang Chen @ 2012-09-19  2:07 UTC (permalink / raw)
  To: Peter Barada; +Cc: crossgcc

On 19 September 2012 01:54, Peter Barada <peter.barada@logicpd.com> wrote:
> I'm having a tough time trying to come up with a newer toolchain for
> cortex-a8 that has support for both hard and soft floating point.  I've
> tried building a toolchain using
> crosstool-ng-linaro-1.13.1-2012.08-20120827.tar.bz2 but when I try to
> compile u-boot it complains with:

Linaro prebuilt toolchain does support both hard and soft floating
point. You can get it from
https://launchpad.net/linaro-toolchain-binaries/+milestone/2012.08

try: ./arm-linux-gnueabihf-gcc -print-multi-lib

The default configure is --with-arch=armv7-a --with-tune=cortex-a9
--with-fpu=vfpv3-d16 --with-float=hard  --with-mode=thumb

To use soft floating, you need options: -marm -march=armv4t -mfloat-abi=soft.

In your case, please try to change  -march=armv5 to "-march=armv4t"

If you want to change to configure to cortex-a8 and armv5. You need
* Change cortex-a9 to cortex-a8 in
samples/linaro-arm-linux-gnueabihf/crosstool.config
* Change armv4t to armv5 in
contrib/linaro/patches/gcc/linaro-4.7-2012.08/multilib.patch,

Then follow the instructions to rebuild the toolchain
(contrib/linaro/doc/README.txt)

BTW: crosstool-ng-linaro does not support multilib for eglibc. It uses
the prebuilt sysroot from Ubuntu Precise. If it does not work for you,
please use the latest crosstool-ng from http://crosstool-ng.org/.

Thanks!
-Zhenqiang

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: building a multilb ARM toolchain for softfp and hard float
  2012-09-19  2:07 ` Zhenqiang Chen
@ 2012-09-20 20:29   ` Peter Barada
  2012-09-21  2:12     ` Zhenqiang Chen
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Barada @ 2012-09-20 20:29 UTC (permalink / raw)
  To: Zhenqiang Chen; +Cc: crossgcc, Peter Barada

On 09/18/2012 10:06 PM, Zhenqiang Chen wrote:
> On 19 September 2012 01:54, Peter Barada <peter.barada@logicpd.com> wrote:
>> I'm having a tough time trying to come up with a newer toolchain for
>> cortex-a8 that has support for both hard and soft floating point.  I've
>> tried building a toolchain using
>> crosstool-ng-linaro-1.13.1-2012.08-20120827.tar.bz2 but when I try to
>> compile u-boot it complains with:
> Linaro prebuilt toolchain does support both hard and soft floating
> point. You can get it from
> https://launchpad.net/linaro-toolchain-binaries/+milestone/2012.08
>
> try: ./arm-linux-gnueabihf-gcc -print-multi-lib
>
> The default configure is --with-arch=armv7-a --with-tune=cortex-a9
> --with-fpu=vfpv3-d16 --with-float=hard  --with-mode=thumb
>
> To use soft floating, you need options: -marm -march=armv4t -mfloat-abi=soft.
>
> In your case, please try to change  -march=armv5 to "-march=armv4t"
>
> If you want to change to configure to cortex-a8 and armv5. You need
> * Change cortex-a9 to cortex-a8 in
> samples/linaro-arm-linux-gnueabihf/crosstool.config
> * Change armv4t to armv5 in
> contrib/linaro/patches/gcc/linaro-4.7-2012.08/multilib.patch,
>
> Then follow the instructions to rebuild the toolchain
> (contrib/linaro/doc/README.txt)
>
> BTW: crosstool-ng-linaro does not support multilib for eglibc. It uses
> the prebuilt sysroot from Ubuntu Precise. If it does not work for you,
> please use the latest crosstool-ng from http://crosstool-ng.org/.
Thanks for the response. So far things are building, taking a bit of
work in LTIB to use this toolchain to build all its packages.  I'll
shove the result off the cliff when I it (finally) completes building to
see if it actually runs.

One problem is when running LTIB's base_libs.spec script to create an
RPM of the toolchain libraries to install on the target rootfs, RPM
fails with:

error: failed dependencies:
    ld-linux.so.3(GLIBC_2.4)   is needed by base_libs-1.2-1

Digging into it, RPM can't find ld-linux.so.3 since ld-linux.so.3 is a
symbolic link to ld-linux-armhf.so.3, but libattr.so.1.1.0 and
libacl.so.1.1.0 require ld-linux.so.3 (but no other shared object
library), and no library claims to provide ld-linux.so.3.

Why do libacl and libattr require ld-linux.so.3, but libc.so requires
ld-2.15.s0?  Is there anyway to modify the build such that libacl and
libattr require ld-2.15.so (instead of ld-linux.so.3) to fix this?

Thanks in advance!

-- 
Peter Barada
peter.barada@logicpd.com


--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: building a multilb ARM toolchain for softfp and hard float
  2012-09-20 20:29   ` Peter Barada
@ 2012-09-21  2:12     ` Zhenqiang Chen
  0 siblings, 0 replies; 4+ messages in thread
From: Zhenqiang Chen @ 2012-09-21  2:12 UTC (permalink / raw)
  To: Peter Barada; +Cc: crossgcc

On 21 September 2012 04:29, Peter Barada <peter.barada@logicpd.com> wrote:
> On 09/18/2012 10:06 PM, Zhenqiang Chen wrote:
>> On 19 September 2012 01:54, Peter Barada <peter.barada@logicpd.com> wrote:
>>> I'm having a tough time trying to come up with a newer toolchain for
>>> cortex-a8 that has support for both hard and soft floating point.  I've
>>> tried building a toolchain using
>>> crosstool-ng-linaro-1.13.1-2012.08-20120827.tar.bz2 but when I try to
>>> compile u-boot it complains with:
>> Linaro prebuilt toolchain does support both hard and soft floating
>> point. You can get it from
>> https://launchpad.net/linaro-toolchain-binaries/+milestone/2012.08
>>
>> try: ./arm-linux-gnueabihf-gcc -print-multi-lib
>>
>> The default configure is --with-arch=armv7-a --with-tune=cortex-a9
>> --with-fpu=vfpv3-d16 --with-float=hard  --with-mode=thumb
>>
>> To use soft floating, you need options: -marm -march=armv4t -mfloat-abi=soft.
>>
>> In your case, please try to change  -march=armv5 to "-march=armv4t"
>>
>> If you want to change to configure to cortex-a8 and armv5. You need
>> * Change cortex-a9 to cortex-a8 in
>> samples/linaro-arm-linux-gnueabihf/crosstool.config
>> * Change armv4t to armv5 in
>> contrib/linaro/patches/gcc/linaro-4.7-2012.08/multilib.patch,
>>
>> Then follow the instructions to rebuild the toolchain
>> (contrib/linaro/doc/README.txt)
>>
>> BTW: crosstool-ng-linaro does not support multilib for eglibc. It uses
>> the prebuilt sysroot from Ubuntu Precise. If it does not work for you,
>> please use the latest crosstool-ng from http://crosstool-ng.org/.
> Thanks for the response. So far things are building, taking a bit of
> work in LTIB to use this toolchain to build all its packages.  I'll
> shove the result off the cliff when I it (finally) completes building to
> see if it actually runs.
>
> One problem is when running LTIB's base_libs.spec script to create an
> RPM of the toolchain libraries to install on the target rootfs, RPM
> fails with:
>
> error: failed dependencies:
>     ld-linux.so.3(GLIBC_2.4)   is needed by base_libs-1.2-1
>
> Digging into it, RPM can't find ld-linux.so.3 since ld-linux.so.3 is a
> symbolic link to ld-linux-armhf.so.3, but libattr.so.1.1.0 and
> libacl.so.1.1.0 require ld-linux.so.3 (but no other shared object
> library), and no library claims to provide ld-linux.so.3.

ld-linux.so.3 is from libc6:armel.

> Why do libacl and libattr require ld-linux.so.3, but libc.so requires
> ld-2.15.s0?  Is there anyway to modify the build such that libacl and
> libattr require ld-2.15.so (instead of ld-linux.so.3) to fix this?

ld-linux-armhf.so.3 is for applications built with hard float.
ld-linux.so.3 is for applications built with soft/softfp, which
requires libc built with soft/softfp.

Can you build libacl and libattr with hard float?

Thanks!
-Zhenqiang

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-21  2:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-18 17:54 building a multilb ARM toolchain for softfp and hard float Peter Barada
2012-09-19  2:07 ` Zhenqiang Chen
2012-09-20 20:29   ` Peter Barada
2012-09-21  2:12     ` Zhenqiang Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).