LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-31-2011, 01:14 AM   #1
//////
Member
 
Registered: Nov 2005
Location: Land of Linux :: Finland
Distribution: Arch Linux && OpenBSD 7.4 && Pop!_OS && Kali && Qubes-Os
Posts: 824

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
[cross compiling]x86_64 system, compile target i686


Hello all.

I'm trying to cross compile usb-modeswitch for my other computer that is i686 system with amd athlon xp processor.

Box that I have been using for compiling is x86_64 system.

command that i have been using for compiling the usb-modeswitch is:
Code:
gcc -o usb_modeswitch usb_modeswitch.c -Wall -l usb
How can I specify that I want i686 rather than x86_64 ?
 
Old 03-31-2011, 03:56 AM   #2
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,541

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Have you tried using the -m32 or the -mtune=i686 options with gcc? This produces the 32-bit (versus 64-bit) version of the executable.

For example:
Code:
gcc -Wall -m32 -mtune=i686 usb_modeswitch.c -lusb -o usb_modeswitch
At the moment I do not have access to an x64_86 architecture; I will need to wait till I get to work to experiment with the suggestion above.

Last edited by dwhitney67; 03-31-2011 at 04:06 AM.
 
  


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
cross compiling a driver on fedora12-i686 for the target ppc860 using ELDK toolchain saidi08 Linux - Newbie 1 01-01-2011 09:42 AM
[SOLVED] Cross Compile GNU make for Alpha Architecture on i686 PC owjian Linux - Newbie 3 12-23-2010 06:46 AM
Cross Compiling from i686 to i586 -- Necessary? dwhitney67 Programming 5 09-08-2007 02:44 AM
cross compile for i686 Law1213 Linux - Software 2 06-20-2005 08:36 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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