LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-26-2008, 07:56 AM   #1
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 227

Rep: Reputation: 32
Host x86_64, Can I compile for x86_32???


Hello,

I have a laptop with dual core, and OS Suse 11.0 x86_64.

My question is, Can I compile programs and kernel for x86_32 ???

Before this question, I have looked for information in google and for example I can configure gcc for 32 bits:

./configure --host=x86_64-pc-linux --build=x86_64-pc-linux --target=i386_pc-linux-gnu

Best reagards
 
Old 11-26-2008, 08:42 AM   #2
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
Yes, cross compile is possible, as far as I know, the only thing to remember is that you need a copy of binutils for the target system you intend to compile to, so both, binutils and gcc should be configured to use the --target option
 
Old 11-26-2008, 09:59 AM   #3
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
Or you can just install multilibs, chroot to a 32bit environment and use 32bit gcc
 
Old 11-26-2008, 10:17 AM   #4
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 227

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Agrouf View Post
Or you can just install multilibs, chroot to a 32bit environment and use 32bit gcc
Hello,

other question, I have x86_64 host and I would like to compile a new kernel for my target x86_32. is it necessaty to compile this kernel with 32bit gcc???
Perhaps is a stupid question but I confuse.

Thanks a lot
 
Old 11-26-2008, 10:25 AM   #5
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Or you could run a 32bit virtual machine for my 32bit development, it seems like its a hassle but you don't have to futz with anything once its setup and you can compile it in the environment/os you want.
 
Old 11-26-2008, 12:14 PM   #6
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
Quote:
Originally Posted by webquinty View Post
Hello,

other question, I have x86_64 host and I would like to compile a new kernel for my target x86_32. is it necessaty to compile this kernel with 32bit gcc???
Perhaps is a stupid question but I confuse.

Thanks a lot
No it is not necessary, but then you have to cross compile.
 
  


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
compile kernel for x86_64 henkees Slackware 7 10-10-2008 02:36 PM
x86_64 ?x86_32 wanghao Linux - Hardware 9 10-04-2007 01:59 AM
lfs for x86_64 with slamd64 host silkenphoenixx Linux From Scratch 4 10-11-2006 11:08 AM
make configure-host for binutils-2.16.1 fails under 7.0-cross-lfs-20051019-x86_64 Basel Linux From Scratch 2 10-24-2005 11:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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