LinuxQuestions.org
Help answer threads with 0 replies.
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 08-07-2007, 03:16 PM   #1
alphisb0t
Member
 
Registered: Jun 2004
Distribution: gentoo 2008.desktop
Posts: 110

Rep: Reputation: 15
Slackware: i486 and optimizations


Hello all. I'm a huge fan of Slackware and recently tried out Gentoo because of a friend (who is hardcore into Gentoo). Its a very nice distro but I prefer my laptop to have Slackware on it. And now that 12.0 is out I'm updating my laptop as I type this.

Now getting to my question. I've been building apps for slackware via source for a long time and never thought anything of it until now. Gentoo has this make.conf file which is designed for optimization of anything you build. The target, host, and optimization level are all in there so when you build something it always builds with those optimizations and parameters.

I notice i486 in the filenames and during compilation of most of the software I build on my slack box and am thinking to myself that this could be made much better! I'm not using a 486 and as such the software shouldn't be built with such a system as a target.

Can I make i686 or better compiles with Slack? If so then how?

Thanks for any and all information!
 
Old 08-07-2007, 03:32 PM   #2
hollywoodb
Member
 
Registered: Aug 2003
Location: Minnesota, U.S.A.
Distribution: Debian, openSUSE
Posts: 400

Rep: Reputation: 30
If you're comfortable with bash, the SlackBuilds.org template has provisions for optimizing for i486 or i686:

http://slackbuilds.org/template.SlackBuild

Basically it is determined by what you pass to ./configure at compile time.
 
Old 08-07-2007, 04:12 PM   #3
the3dfxdude
Member
 
Registered: May 2007
Posts: 332

Rep: Reputation: 100Reputation: 100
You already said you have been compiling from source for a long time, so it's likely you don't have to do anything much different. gcc without any flags will automatically pick safe optimizations for your architecture. So most "./configure && make" with no flags is good enough.
 
Old 08-07-2007, 04:32 PM   #4
Inuit-Uprising
LQ Newbie
 
Registered: Aug 2007
Distribution: Slackware 12.0
Posts: 22

Rep: Reputation: 15
Do the optimizations make a clear difference? Is it even worth it?
 
Old 08-07-2007, 04:43 PM   #5
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
Actually many of the options in the make.conf get filtered out otherwise there would be a lot or borked systems around.All those flags have side effects - like O3 and further flags make the binary bigger resulting in longer startup times.
Anyway whatever you do don't change the CHOST setting from i486 to anything else or things will get strange - just did that the other day - that setting doesn't affect the compilerflags anyway.
 
Old 08-07-2007, 04:50 PM   #6
Eternal_Newbie
Member
 
Registered: Jun 2005
Location: The Pudding Isles
Distribution: Slackware 13.37
Posts: 573

Rep: Reputation: 59
Slackware is already optimised for i686, if you have a look at any of the slackbuild scripts you will see it contains the "-mtune=i686" flag.
Nothing to stop you optimising further of course.

Last edited by Eternal_Newbie; 08-07-2007 at 04:55 PM.
 
Old 08-07-2007, 05:08 PM   #7
MannyNix
Member
 
Registered: Dec 2005
Location: ~
Distribution: Slackware -current, OpenBSD
Posts: 449

Rep: Reputation: 41
Interesting post.
I'm also trying something similar.
As said before, most Slackbuilds (official or from slackbuilds.org) have the $ARCH template.
Here's what i'm doing with some official slackbuilds, this is part of my modified glibc.SlackBuild:
Code:
# This should be i486 for all 32-bit x86 arch:
TARGET=${TARGET:-i486}
if [ "$ARCH" = "i386" ]; then
  OPTIMIZ="-O3 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
  OPTIMIZ="-O3 -march=pentium4 -pipe -fomit-frame-pointer"
 else
  OPTIMIZ="-O3"
fi
Gentoo, Slackware, <any>distro can be optimized.
Portage does it all for you with make.conf and USE flags. In Slackware you are the package manager
You can have the "USE" flags on the slackbuilds themselves:
Code:
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --disable-debug \
  --without-kipi \
  --without-arts \
Quote:
Anyway whatever you do don't change the CHOST setting from i486 to anything else or things will get strange
I totally agree.

Have you seen arch-linux ABS?
Take a look at their /etc/makepkg.conf

The only thing i didn't like about Gentoo on the lappy is how hot it gets sometimes
And yes:
Quote:
Slackware Linux can run on 486 systems all the way up to the latest x86 machines (but uses -mcpu=i686 optimization for best performance on i686-class machines like the P3, P4, and Duron/Athlon).
(http://slackware.com/info/)

Have fun!

EDIT: Oh yeah, as alphageek told me:
Quote:
having a turbocharged custom build of 'ls' won't exactly do much for you

Last edited by MannyNix; 08-07-2007 at 05:12 PM.
 
  


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
GCC optimizations: What does -O4 do? Daws Linux - Software 5 06-30-2006 01:46 PM
Wrong optimizations for Slackware current? MS3FGX Slackware 7 01-12-2006 09:23 PM
distro optimizations Nightfrost Linux - Distributions 12 04-19-2005 02:51 PM
Have any optimizations in Linux? Arc4ne Linux - General 4 06-23-2004 11:11 PM
Memory Optimizations ? tjm Linux - Software 3 07-08-2003 06:11 PM


All times are GMT -5. The time now is 11:08 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration