LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 10-03-2005, 05:13 PM   #16
elyk
Member
 
Registered: Jun 2004
Distribution: Slackware
Posts: 241

Rep: Reputation: 49

The -march and -mcpu settings will tell the compiler to optimize for a specific processor, or to generate instructions that a certain processor will be able to run.

What do the --build, --host, and --target settings actually do? I understand the compiler flags, but not the configure script flags.
 
Old 10-03-2005, 05:37 PM   #17
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
as i understand it, you only need to set the " build " option.
( i486-slackware-linux in our case )

those binaries will also run on a mandrake-linux box.
i have ( or had ? ) some programs running here, that came in a(n) rpm package
and they run ok.
so the other way around will also work.

the " host " and " target " options are only used for cross compiling
( to make a binary for another processor lika a sparc )

maybe this will clear some things up :
http://linux.bytesex.org/cross-compiler.html
( there is an example of the " target " option )

egag
 
Old 10-03-2005, 05:39 PM   #18
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally posted by shilo
I would think that you would use:

Code:
./configure --build=i586-mandrake-linux \
  --host=i486-slackware-linux \
  --target=i586-mandrake-linux
And you would also have to have the i586-mandrake-linux libraries installed on the Slackware machine.

Is this not correct?
actually, i would think it's:
Code:
./configure --build=i486-slackware-linux \
  --host=i586-mandrake-linux \
  --target=i586-mandrake-linux
and then you'd compile it with:
Code:
CFLAGS="-O2 -march=i586 -mcpu=i686"
no??
Quote:
To compile a program to run on a host type that differs from the build type, use the configure option --host=hosttype, where hosttype uses the same syntax as buildtype. The host type normally defaults to the build type.
PS: also, i would think that you wouldn't need to have the i586-mandrake-linux libraries in order to do this, but i'm not sure...


Last edited by win32sux; 10-03-2005 at 06:14 PM.
 
Old 10-04-2005, 02:29 AM   #19
elyk
Member
 
Registered: Jun 2004
Distribution: Slackware
Posts: 241

Rep: Reputation: 49
I found these symlinks in /usr/bin
Code:
lrwxrwxrwx  1 root root 13 2005-09-17 08:22 i486-slackware-linux-c++ -> g++-gcc-3.3.6*
lrwxrwxrwx  1 root root 13 2005-09-17 08:22 i486-slackware-linux-g++ -> g++-gcc-3.3.6*
lrwxrwxrwx  1 root root  9 2005-09-17 08:22 i486-slackware-linux-gcc -> gcc-3.3.6*
lrwxrwxrwx  1 root root  9 2005-09-17 08:22 i486-slackware-linux-gcc-3.3.6 -> gcc-3.3.6*
lrwxrwxrwx  1 root root  3 2005-09-17 08:22 i486-slackware-linux-gcj -> gcj*
If I understand correctly, build/host/target will select your compiler and march/mcpu will optimize what that compiler creates.
 
  


Reply



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
a generic SlackBuild shilo Slackware 46 06-19-2008 11:45 PM
The perfect gtkpod.SlackBuild shilo Slackware 3 08-04-2005 06:31 PM
GNOME.SlackBuild jmdlcar Slackware 1 06-03-2005 04:52 PM
KDE.SlackBuild spaceballs Slackware 8 04-01-2005 08:42 AM
SlackBuild system thegeekster Slackware 7 06-01-2004 06:59 PM

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

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