Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-22-2014, 08:47 PM
|
#1
|
Senior Member
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076
|
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.
|
|
|
01-22-2014, 08:51 PM
|
#2
|
Senior Member
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223
Rep:
|
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?
|
|
|
01-22-2014, 09:47 PM
|
#3
|
Senior Member
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860
|
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.
|
|
|
01-22-2014, 10:23 PM
|
#4
|
Senior Member
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076
Original Poster
|
Quote:
Originally Posted by Richard Cranium
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
|
|
|
01-22-2014, 11:26 PM
|
#5
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
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.
|
01-23-2014, 12:37 AM
|
#6
|
LQ Guru
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,352
|
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.
|
|
|
01-23-2014, 01:05 AM
|
#7
|
Senior Member
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076
Original Poster
|
Quote:
Originally Posted by TobiSGD
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
|
|
|
01-23-2014, 01:25 AM
|
#8
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
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.
|
|
|
01-23-2014, 01:59 AM
|
#9
|
Senior Member
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076
Original Poster
|
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
|
|
|
01-23-2014, 06:47 AM
|
#10
|
Member
Registered: Nov 2013
Posts: 748
Rep:
|
Quote:
Originally Posted by rob.rice
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.
|
|
|
All times are GMT -5. The time now is 06:58 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|