LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-23-2016, 09:36 AM   #1
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,259

Rep: Reputation: 231Reputation: 231Reputation: 231
Rebuild glibc in order to build hard float packages


Wanted to document here the process of rebuilding certain packages to hard float. I am following the steps provided in this link, which by the way, great instructions.

So, my question is, in order to rebuild specific packages, would the following CFLAGS be required?
Code:
CFLAGS = -O2 -mfloat-abi=hard -march=native -mtune=native
I think rebuilding Slackware to be a complete hard float may be too much of a task. However, I wonder what specific components would have to be rebuilt in order to achieve the same principle.

My intend for this thread is to document the process. Feel free to chime in.
 
Old 06-23-2016, 11:01 AM   #2
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,539

Rep: Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308
Quote:
Originally Posted by stormtracknole View Post
Wanted to document here the process of rebuilding certain packages to hard float. I am following the steps provided in this link, which by the way, great instructions.

So, my question is, in order to rebuild specific packages, would the following CFLAGS be required?
Code:
CFLAGS = -O2 -mfloat-abi=hard -march=native -mtune=native
I think rebuilding Slackware to be a complete hard float may be too much of a task. However, I wonder what specific components would have to be rebuilt in order to achieve the same principle.

My intend for this thread is to document the process. Feel free to chime in.
You cannot build a hard float port from within Slackware ARM without a cross compiler (which wouldn't make any sense given how slow ARM is compared to X86)- the entire environment is soft float.
The instructions you quote are doing something different - they are building glibc so that it uses hard float instructions yet still uses the soft float ABI
This is not the same as building a hard float distribution.
 
Old 06-23-2016, 11:19 AM   #3
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,259

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by drmozes View Post
You cannot build a hard float port from within Slackware ARM without a cross compiler (which wouldn't make any sense given how slow ARM is compared to X86)- the entire environment is soft float.
The instructions you quote are doing something different - they are building glibc so that it uses hard float instructions yet still uses the soft float ABI
This is not the same as building a hard float distribution.
Ah, understood. So, would rebuilding packages using -mfloat-abi=softfp be better? My intent is not to rebuild the entire distribution, but it sounds like what I want to do is not possible. Sorry for all the questions, still trying to learn my way around ARM development.
 
Old 06-23-2016, 11:39 AM   #4
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,539

Rep: Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308
Quote:
Originally Posted by stormtracknole View Post
Ah, understood. So, would rebuilding packages using -mfloat-abi=softfp be better? My intent is not to rebuild the entire distribution, but it sounds like what I want to do is not possible. Sorry for all the questions, still trying to learn my way around ARM development.
You'd probably only want to rebuild anything that would benefit from using hard FP such as media players and stuff - anything else like file servers, web servers and stuff -- there's no point in my opinion.
 
1 members found this post helpful.
Old 06-23-2016, 11:48 AM   #5
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,259

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by drmozes View Post
You'd probably only want to rebuild anything that would benefit from using hard FP such as media players and stuff - anything else like file servers, web servers and stuff -- there's no point in my opinion.
That was my plan. Rebuild media players, XFCE, among a couple of other programs from XAP. So, the ABI should be softfp instead of hard?
 
Old 06-23-2016, 12:15 PM   #6
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,539

Rep: Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308
Quote:
Originally Posted by stormtracknole View Post
That was my plan. Rebuild media players, XFCE, among a couple of other programs from XAP. So, the ABI should be softfp instead of hard?
Yes
 
1 members found this post helpful.
Old 06-23-2016, 12:19 PM   #7
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,259

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by drmozes View Post
Yes
Thank you for your patience. Last question, for now at least, would there be a reason to rebuild the entire Xorg stack?
 
Old 06-24-2016, 04:54 AM   #8
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,539

Rep: Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308Reputation: 1308
Quote:
Originally Posted by stormtracknole View Post
Thank you for your patience. Last question, for now at least, would there be a reason to rebuild the entire Xorg stack?
I don't know - my feeling is that you would not want to rebuild all of it, but perhaps just the video driver you're using or something. I have no facts about that.
 
Old 07-01-2016, 04:32 PM   #9
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,259

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by drmozes View Post
I don't know - my feeling is that you would not want to rebuild all of it, but perhaps just the video driver you're using or something. I have no facts about that.
I rebuilt glibc with softfp along with xfce, midori (and all of the dependencies). I can see an improvement, but obviously I have no scientific backing or hard numbers. To me, the system felt snappier, but not quite as fast as hard float. I've also built lxde and that also seems to be faster than xfce. In all, I'm pretty happy with it.
 
Old 07-06-2016, 09:57 AM   #10
briselec
Member
 
Registered: Jun 2013
Location: Ipswich, Australia
Distribution: Slackware
Posts: 74

Rep: Reputation: Disabled
If you want to know how to build a hard float system it could be worthwhile having a look at the LFS book.
http://www.linuxfromscratch.org/lfs/read.html

Last edited by briselec; 07-06-2016 at 09:58 AM. Reason: fixed url
 
Old 07-06-2016, 11:51 AM   #11
CRCulver
LQ Newbie
 
Registered: Mar 2015
Posts: 28

Rep: Reputation: Disabled
Quote:
Originally Posted by stormtracknole View Post
I rebuilt glibc with softfp along with xfce, midori (and all of the dependencies). I can see an improvement, but obviously I have no scientific backing or hard numbers.
If someone wants hard numbers, they can run libc-bench before and after replacing the Slackware-supplied glibc with their own custom-compiled one.
 
  


Reply

Tags
glibc, hard float, rebuild


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
Slackware ARM - FAQ - soft float and hard float drmozes Slackware - ARM 23 08-29-2017 02:21 PM
Hard float/soft float interndan Slackware - ARM 5 08-01-2014 10:23 AM
Step 6.9 Build Platform GLibc Float Errors (using GCC-4.90) Luridis Linux From Scratch 3 05-02-2014 09:54 AM
Upcoming pain with glibc-2.14 and Linux-PAM: RPC build supt. is removed from glibc! JoelPB Linux From Scratch 6 12-13-2011 06:31 AM
Rebuild all packages - correct order? Micah Slackware 12 02-09-2011 10:20 PM

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

All times are GMT -5. The time now is 04:12 PM.

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