The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How can I mount a ufs filesystem on a solaris 10 sparc onto a Linux server ilan SUN Solaris 3 06-04-2008 03:29 PM
Sun targets Linux users with OpenSolaris binaries - ComputerworldUK iBot UNIX and Linux RSS News 0 07-16-2007 04:00 AM
CC 5.5 compiler flag to issue 64bit porting warnings on sparc-solaris shobhah SUN Solaris 0 03-02-2007 02:47 AM
how to create freeBSD binaries in Linux or Windows szzz High Level Programming 3 02-19-2004 05:17 AM
Compile freeBSD binaries in Linux shalmoo High Level Programming 0 10-01-2003 04:38 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-08-2006
lyonsd lyonsd is offline
Registered User
  
 

Join Date: Jan 2005
Posts: 35
C compiler to build Sparc/Solaris binaries on Linux

Just that the Subject says.

I am looking for a C compiler for Linux x86 that will allow me to compile a C source code file and the resulting binary will be able to run on a Sparc running Solaris.

Thanks.
  #2 (permalink)  
Old 12-08-2006
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,944
This is what's known as cross-compilation, and it's not that simple. gcc can be configured to cross-compile, yes, but that's not usually installed as standard, it's not as easy as "add sparc module", and there's more to it than the compiler. You need the Solaris headers and libraries, too -- after all you're compiling for Sparc/Solaris, not Sparc/GNU. Even if you do get a working sparc compiler on x86, you could be plagued with weird issues. You wouldn't even have a way to test your executables.

My suggestion would be to just get a sparc on ebay.
  #3 (permalink)  
Old 12-08-2006
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,230
Quote:
Originally Posted by Corona688
This is what's known as cross-compilation, and it's not that simple. gcc can be configured to cross-compile, yes, but that's not usually installed as standard, it's not as easy as "add sparc module", and there's more to it than the compiler. You need the Solaris headers and libraries, too -- after all you're compiling for Sparc/Solaris, not Sparc/GNU. Even if you do get a working sparc compiler on x86, you could be plagued with weird issues. You wouldn't even have a way to test your executables.

My suggestion would be to just get a sparc on ebay.
I would second everything Corona688 has said here, you can pick up an ultra 5 or 10 on Ebay for peanuts these days, and would be a more worthwhile invesment than the time it would take to get the cross compile working.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:34 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0