SlackwareThis 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.
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.
First off, thanks to the folks at slackbuilds.org for all their efforts, especially the HOWTOs, FAQ and other very clear docs.
I've succeeded in making a slackbuild for kphotoalbum but have come across conflicting advice. http://www.slackbuilds.com/guidelines/ tells me to include these lines:
Code:
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
fi
I recommend asking this on the SlackBuilds.org mailing list.
Agreed. That is by far the best place for such a question.
But to answer your question (remember my answer isn't the official slackBuilds.org answer), the first code snippet is generally used. Just take a look at a lot of the other slackBuilds and you will see this.
All of them, as far as I know, either by default build for i486 or noarch (unless they repackage binaries). I typically choose i686 for my builds if applicable.
I did a quick survey of a few slackbuilds from slackbuilds.org and the first snippet is the most common, but of course, that doesn't mean it's the best choice.
I'll go explain to my inbox that I'm joining another mailing list
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,634
Rep:
EDIT: Forget what I posted before. I just read Carlos' answer on the mailing list. In short: The first one is preferred, the second makes no sense anymore for Slackware versions > 9.0.
Starting with glibc-2.6, i486 is the minimum supported arch so it really doesn't make a whole lot of sense to build anything else at i386...
I ussually don't even include CFLAGS in my build scripts. I set it globaly on my login shell and then forget about it. Reduces the clutter in your build scripts.
Also, putting -march=native would optimize for your machine only ( -mtune=native is implied). The use of mtune is still as applicable as it's ever been. -march=i486 -mtune=generic would be the better option IMO. If you just want to build for your machine then -march=native is fine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.