LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-16-2015, 08:31 PM   #1
dclarion
LQ Newbie
 
Registered: Jul 2015
Posts: 7

Rep: Reputation: Disabled
Architectures in SlackBuild Scripts


I've been poring over the SlackBuild scripts in the source tree (14.0 specifically), and it appears that they are configured for native builds; do I see this correctly? What I'd like to do is set up a build environment for a Slackware-based distro for my stable of machines (four boxes with three architectures). Am I going to be modifying the build scripts for cross compilation? If so, not a problem; to me, this is a form of recreation. Yes, I'm weird.
 
Old 08-16-2015, 10:33 PM   #2
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 611

Rep: Reputation: 221Reputation: 221Reputation: 221
They are designed for native builds, yes.

I've seen some on slackbuilds.org (can't remember what they were for) that had cross-compile options that could be set.

What three architectures?
 
Old 08-17-2015, 01:07 AM   #3
dclarion
LQ Newbie
 
Registered: Jul 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
I have two x86-64 boxes, and two ancient machines: an i686 and an i586. From what I've seen, I could build for i486 to run on the ancient machines.
 
Old 08-17-2015, 03:49 AM   #4
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
The SlackBuilds.org templates allow you to set ARCH when you call the script:
Code:
ARCH=i686 ./gdal.SlackBuild
The newer Slackware scripts have similar blocks of code to handle ARCH. You will find more newer Slackware scripts in 14.1; to prefer the 14.0 scripts would seem perverse... anyway, to state what should be obvious, you can just run the other scripts through sed. Job done in less than a minute.

But that's not sufficient for a cross-compiling setup.

There are two ways of cross-compiling:

(1) Full cross-building, including configuring and linking. You will need to install a full set of Alien Bob's multilib packages on the x86_64 boxes and run his 32dev.sh script at the start of every cross-building session. Read all about it here: http://www.slackware.com/~alien/multilib/

(2) Do the configuring and linking natively on i686, and use distcc to forward the compilation to your x86_64 hosts for speed. This is much, much easier. You don't need to set up a complete cross-toolchain. You don't even need to install Alien Bob's multilib -- not a lot of people know this, but Slackware's standard x86_64 gcc packages can cross-compile i486/i686. To do it this way, see my sig.

Last edited by 55020; 08-17-2015 at 04:08 AM. Reason: Didn't see you were trying to use Slackware scripts
 
  


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
my ~45 slackbuild scripts a4z Slackware 1 11-22-2013 01:21 PM
question(s) concerning SlackBuild scripts chexmix Slackware 4 05-28-2008 05:32 AM
SlackBuild scripts stu_mueller Slackware 15 04-04-2008 01:03 AM
Using slackbuild scripts Steve50 Slackware 3 10-11-2006 02:42 AM
Project FFMpeg (SlackBuild scripts) shilo Slackware 3 10-05-2005 10:17 AM

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

All times are GMT -5. The time now is 03:04 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
Open Source Consulting | Domain Registration