LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-22-2014, 08:47 PM   #1
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076

Rep: Reputation: 205Reputation: 205Reputation: 205
a question about going native


will the whole distro build with the gcc option -march=native
the kernel AFAICT dose it's an option in menuconfig
gcc could use a speed boost being a number crunching program those extra registers and instructions can't hurt

so should I go about it like an up grade
and how do I get the slack builds to pass the options to the make files
should I just add $CFLAGS=$CFLAGS+"-march=native -usepipe" to the environment

Last edited by rob.rice; 01-22-2014 at 08:48 PM.
 
Old 01-22-2014, 08:51 PM   #2
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Rep: Reputation: 195Reputation: 195
Each slackbuild sets the march on its own, I think you would have to edit each one manually. By the way, why don't you try gentoo?
 
Old 01-22-2014, 09:47 PM   #3
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860

Rep: Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230
If you search the archives, you should find where someone was attempting to recompile Slackware from scratch. It isn't as straightforward as you might think, IIRC, since Pat doesn't build Slackware that way.
 
Old 01-22-2014, 10:23 PM   #4
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076

Original Poster
Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by Richard Cranium View Post
If you search the archives, you should find where someone was attempting to recompile Slackware from scratch. It isn't as straightforward as you might think, IIRC, since Pat doesn't build Slackware that way.
I doubt that I will have to do a linux from scratch operation
in that I'm not devorceing the new system from the build system
the libraries pass every thing on the stack or write to memory
nether of witch should be affected
by the way the CPU uses it's registers
AFAIK only the kernel passes perimeters in the registers
 
Old 01-22-2014, 11:26 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Recompiling the complete system will not much more speed than just recompiling the applications that can make use of adavnced CPU features. Compile the kernel with the CPU option set to your actual CPU, then compile the glibc with march=native. The other programs only need to be recompiled when you think there can really be a speed improvement. Firefox and OpenOffice will not run significantly faster, but "numbercrunching" software, like image editors, 3D rendering software, media encoding software, ... may get significant improvements.
 
1 members found this post helpful.
Old 01-23-2014, 12:37 AM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,352

Rep: Reputation: 5382Reputation: 5382Reputation: 5382Reputation: 5382Reputation: 5382Reputation: 5382Reputation: 5382Reputation: 5382Reputation: 5382Reputation: 5382Reputation: 5382
I think there were several threads about this (including one from half a year ago), but the short answer is that you'd have to recompile each package individually. That's how the all-packages-recompiled forks, such as BlueWhite64, Slamd64 and ARMedSlack, have had to be built.
 
Old 01-23-2014, 01:05 AM   #7
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076

Original Poster
Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by TobiSGD View Post
Recompiling the complete system will not much more speed than just recompiling the applications that can make use of adavnced CPU features. Compile the kernel with the CPU option set to your actual CPU, then compile the glibc with march=native. The other programs only need to be recompiled when you think there can really be a speed improvement. Firefox and OpenOffice will not run significantly faster, but "numbercrunching" software, like image editors, 3D rendering software, media encoding software, ... may get significant improvements.
my kernel was built with the native option
I'm thinking the libraries first (C programming is mostly gluing library functions together)
X,Gcc,kde,media-players
 
Old 01-23-2014, 01:25 AM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
I would say, give it a try. Just for fun, install Gentoo or CRUX, with march=native. Then compare it to a Slackware system (default) and a Slackware system where only the specific application you are testing is compiled with march=native.
I have no number on that and would like to see them, but I guess that the Gentoo system will not be much faster than Slackware default in general and insignificant faster than Slackware with the specific application compiled natively. If it is worth the hassle is up to you, I wouldn't do it. If I wanted a totally optimized system I would go for Gentoo or CRUX (or one of the other source based distros), those make it easier to achieve that goal.
 
Old 01-23-2014, 01:59 AM   #9
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076

Original Poster
Rep: Reputation: 205Reputation: 205Reputation: 205
MY guess is there is a lot less ready to build install with the package manager software
for Gentoo or CRUX than there is for slackware

all I have is broad cast TV and small screen youtube is getting a little old

WTH I have another computer to mess with while gcc dose it's crunching
 
Old 01-23-2014, 06:47 AM   #10
genss
Member
 
Registered: Nov 2013
Posts: 748

Rep: Reputation: Disabled
Quote:
Originally Posted by rob.rice View Post
AFAIK only the kernel passes perimeters in the registers
on x86 the kernel uses fastcall, yes
on amd64 it is bit different but still fastcall

edit: also 32bit uses interrupts to call the kernel while on 64bit there are special cpu instructions for it

x86 C calling convention says parameters on the stack
but amd64 C calling convention is fastcall

that and there are twice as many generic registers in 64bit mode (also twice as many sse registers) and they are twice as big
so i always recommend 64bit systems to everyone, even thou they use more RAM


like TobiSGD said, you get more gain by recompiling the programs that you test then everything else
then there is code like glibc that always uses the fastest version of a function regardless of the program using it

Last edited by genss; 01-23-2014 at 06:53 AM.
 
  


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
[SOLVED] Use a native OS in a VM. jeanCarloMachado Linux - Virtualization and Cloud 2 09-08-2011 03:12 PM
[SOLVED] The way to compile kernel with -mtune=native (or -march=native) kaz2100 Debian 3 08-18-2011 04:45 AM
Broadcom working with native support (bcm43xx on FC6)! Now... question about ifup... jacksmash Linux - Hardware 3 02-27-2007 10:16 AM
xgl, native, when? scales Linux - General 3 10-24-2006 02:29 AM
PCI Wireless native support question Saurian Linux - Hardware 13 03-24-2006 12:56 AM

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

All times are GMT -5. The time now is 06:58 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