LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 07-31-2014, 02:14 PM   #1
interndan
Member
 
Registered: Aug 2004
Location: near Marion, Ill
Distribution: Slackware 15 64bit on Desktop Slackwarearm on Raspberry PI v1b
Posts: 388

Rep: Reputation: 40
Hard float/soft float


I'm curious as to what all would be involved in building Slackware Arm with hard float. Is it a matter of re-compiling the kernel, or is there more involved. If more than just the kernel, what all would have to be rebuilt? I might be interested in building hard float enabled for the Pi.
 
Old 07-31-2014, 03:14 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,317

Rep: Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331
The kernel does not use floats. Saving the state on interrupts would kill performance. User space can do what it wants on a program-by-program basis.
 
Old 08-01-2014, 04:35 AM   #3
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 636
Blog Entries: 20

Rep: Reputation: 81
It is possible to have a hardfloat enabled kernel and run a softfloat userland that will just never ask the kernel to do hardfloat calculations ... to put it in short you need both kernel and userland to be compiled to use hardfloat.
There is a hibrid solution as suggested in othr posts bu gus3:
Quote:
Originally Posted by gus3 View Post
There is also a third option for ARM: "softfp", which passes FP arguments on the stack, conforming to "soft" ABI, but generates instructions for using the VFP/Neon instruction within a function. It can provide a code speedup, as well as decreasing a process's RSS. It's even possible to rebuild Slackware's Glibc to use softfp for /lib/libm.*. I have a HOWTO explaining this, but bear in mind it is definitely not for the faint-hearted. I can't post a URL, but you can do a Google search for "slackware arm rebuild glibc vfp" and it will be at the top of the results.
 
Old 08-01-2014, 05:29 AM   #4
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,665

Rep: Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366
Quote:
Originally Posted by louigi600 View Post
It is possible to have a hardfloat enabled kernel and run a softfloat userland that will just never ask the kernel to do hardfloat calculations ... to put it in short you need both kernel and userland to be compiled to use hardfloat.
There is a hibrid solution as suggested in othr posts bu gus3:
The Kernel is not connected to the Hard float or Soft float - this is just userland stuff.
I could take the same 'armv7' kernel in Slackware ARM and use it with a hard float userland.

The soft float vs hard float question has been answered many times already. I might collate the info at some point and put it into a sticky thread.
http://www.linuxquestions.org/questi...archid=6749461
 
Old 08-01-2014, 09:43 AM   #5
interndan
Member
 
Registered: Aug 2004
Location: near Marion, Ill
Distribution: Slackware 15 64bit on Desktop Slackwarearm on Raspberry PI v1b
Posts: 388

Original Poster
Rep: Reputation: 40
I am working on a project with my Raspberry Pi and am looking for ways to optimize its performance. All my searches suggest compiling for hard float will do that. Obviously glibc will need to be rebuilt, but the question is what else will need rebuilding. Leaving aside the kernel ( I will take your word Stuart that is not needed) what else will have to be rebuilt. If the answer is "everything" then perhaps I should start over and install a distro that is already built for hard float. I would rather not do that since Slackware has always been my distro of choice.

By the way Stuart the link you provided just takes me to a page that says 'sorry no matches'.

Thanks Dan
 
Old 08-01-2014, 10:23 AM   #6
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,665

Rep: Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366
Quote:
Originally Posted by interndan View Post
I am working on a project with my Raspberry Pi and am looking for ways to optimize its performance. All my searches suggest compiling for hard float will do that. Obviously glibc will need to be rebuilt, but the question is what else will need rebuilding. Leaving aside the kernel ( I will take your word Stuart that is not needed) what else will have to be rebuilt. If the answer is "everything" then perhaps I should start over and install a distro that is already built for hard float. I would rather not do that since Slackware has always been my distro of choice.

By the way Stuart the link you provided just takes me to a page that says 'sorry no matches'.

Thanks Dan
It seems that the search is time-bound.

I've just posted a summary of hf/sf as a new thread which I'll get made 'sticky' later.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SlackwareARM on RaspberryPI and soft/hard float andrixnet Slackware - ARM 20 10-08-2014 08:02 PM
[SOLVED] gcc 4.6.3 'invalid operands to binary % ( have 'float' and 'float' ) error curious95 Programming 6 02-22-2013 08:51 AM
How to use a float/double without using float/double keyword? geewhan Linux - Kernel 4 06-17-2012 08:19 AM
count digits of a float || convert float to string nadroj Programming 6 07-11-2005 04:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 10:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration