Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ARM softfloat/softfp/hardfp stages
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Somoilenko Yuri
n00b
n00b


Joined: 03 Oct 2008
Posts: 7
Location: Rostov Russia

PostPosted: Wed Jul 25, 2012 9:11 am    Post subject: ARM softfloat/softfp/hardfp stages Reply with quote

Hello. I have some questions about gentoo-arm stage3 distribution.

in FTP http://distfiles.gentoo.org/releases/arm/autobuilds/ i have see current-stage3-armv6j and current-stage3-armv6j_hardfp which difference between them?

current-stage3-armv6j_hardfp stage is builded with "hardfloat" option, and softfloat packages are incompatible with it. It is possible to move distribution from hardfloat to softfloat (with cross-copiling or something else)?

I have cross-compile armv6j-softfloat-linux-gnueabi image. But I can't compile python(any version of it)? How do autobuilds compile python?

And the main question:
I want to setup distcc with my armv6 and cross-compiller on my PC. I as can see cross-compiling with "hardfloat" is not available in gcc(only softfloat). As a sollution I think to use softfloat option but in this case I have reach first three questions...
Can you help me? :)
Back to top
View user's profile Send private message
Somoilenko Yuri
n00b
n00b


Joined: 03 Oct 2008
Posts: 7
Location: Rostov Russia

PostPosted: Thu Jul 26, 2012 9:53 am    Post subject: Reply with quote

Python compiled well in chrooted hardfloat system. It is possible to compile it for softfloat env?
Back to top
View user's profile Send private message
wim-x
Tux's lil' helper
Tux's lil' helper


Joined: 26 Nov 2004
Posts: 109
Location: Netherlands

PostPosted: Thu Jul 26, 2012 5:16 pm    Post subject: Reply with quote

Hardfloat means the hardware floating point unit calculates with the floating point values while this is emulated by software in softfloat. This is the reason gcc cannot crosscompile to hardfloat.

Although I've never tested it, I believe it should be possible to recompile your entire toolchain to softfloat by changing the CHOST and CFLAGS values in /etc/make.conf
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Thu Jul 26, 2012 6:26 pm    Post subject: Reply with quote

Somoilenko Yuri,

I have a armv6j-hardfloat-linux-gnueabi cross compiler toolchain, which seems to work for my Raspberry Pi.
Python can be cross compiled but the ebuild won't do it. The problem is that python is used to build python, so the code that is used to do the building has to run on the host but the code that gets built has to execute on the target. This means that $TARGET is not constant during the build process.

Google knows of a patch to the Python build system and provides manual build instructions, which I have failed to get to work so far but I have not been using matching Python and patch versions, so I know I get to keep all the pieces when it breaks.
Perl is another cross compile problem, for the same reason.

The arm stages are build on an arm host.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Somoilenko Yuri
n00b
n00b


Joined: 03 Oct 2008
Posts: 7
Location: Rostov Russia

PostPosted: Fri Jul 27, 2012 9:59 am    Post subject: Reply with quote

wim-x wrote:
Hardfloat means the hardware floating point unit calculates with the floating point values while this is emulated by software in softfloat. This is the reason gcc cannot crosscompile to hardfloat.

Although I've never tested it, I believe it should be possible to recompile your entire toolchain to softfloat by changing the CHOST and CFLAGS values in /etc/make.conf


When changing hardfloat to softfloat in CHOST and CFLAGS - configure says that compiller can't create executables.
Back to top
View user's profile Send private message
Somoilenko Yuri
n00b
n00b


Joined: 03 Oct 2008
Posts: 7
Location: Rostov Russia

PostPosted: Fri Jul 27, 2012 10:07 am    Post subject: Reply with quote

NeddySeagoon wrote:
Somoilenko Yuri,
I have a armv6j-hardfloat-linux-gnueabi cross compiler toolchain

GCC tell me that it can't crosscompile hardfloat... But I create my toolchain with crossdev, may be manual creation will more effectively

NeddySeagoon wrote:
Somoilenko Yuri,
The arm stages are build on an arm host.

When i'am trying to compile python "natively" using chrooting with quemu-arm, compilation fails with error:

Code:
armv6j-softfloat-linux-gnueabi-gcc -pthread -shared -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes build/temp.linux-armv7l-2.7/var/tmp/portage/dev-lang/python-2.7.3-r2/work/Python-2.7.3/Modules/ossaudiodev.o -L/usr/local/lib -L. -lpython2.7 -o build/lib.linux-armv7l-2.7/ossaudiodev.so
error: /var/tmp/portage/dev-lang/python-2.7.3-r2/work/Python-2.7.3/Modules/_ctypes/libffi: No such file or directory


configure string was taken from original python-building process, also I have try many variations with configure options:
Code:
./configure --prefix=/usr --build=armv6j-softfloat-linux-gnueabi --host=armv6j-softfloat-linux-gnueabi --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --with-fpectl --enable-shared --enable-ipv6 --with-threads --enable-unicode=ucs4 --infodir=/share/info --mandir=/share/man --with-dbmliborder=gdbm --with-libc= --enable-loadable-sqlite-extensions --with-system-expat --with-system-ffi


dev-libs/expat, dev-libs/libffi, was compiled "natively" well.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Fri Jul 27, 2012 10:36 pm    Post subject: Reply with quote

Somoilenko Yuri,

To change your CHOST, you need to rebuild your toolchain elements in the right order.
The problem is that the CHOST is compiled into bits of the toolchain and used to find its was around.

Its well documented in the CHOST changing guide
That was written for i386 at the time when glibc dropped i386 support but the process should work for ARM too. Before you follow that guide, does qemu support hardfloat ?
If not it won't do you any good as binaries built for hardfloat won't run.

Building a cross tool chain for arm hardfloat is documented on the Gentoo Wiki. I uses the latest testing versions on amd64.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum