GCC solaris 2.6/2.5 cross-compiler

GCC solaris 2.6/2.5 cross-compiler

Post by Carlos Westendorp Plaz » Wed, 14 Oct 1998 04:00:00



Hi guys,

I'm a newbie software manager and have just installed gcc 2.8.1 for my machine,
running solaris 2.6. As I need to compile code to work on solaris 2.5 *and* on
2.6, I was wondering if I should build the gcc as a cross-compiler (and have
*yuck* two) or can I get away with it in some other more elegant manner?

TIA.

Carlos.

 
 
 

GCC solaris 2.6/2.5 cross-compiler

Post by Death Walke » Wed, 14 Oct 1998 04:00:00


The best way to compile for different revs is:

a) Compile on each rev, executing the version
   tuned for each rev.
        Time & space prohibitive, and usually
        no code optimization takes place
        between OS rev's

b) Compile on the oldest version.
        You lose some advantages of the newer
        OS.  AND it sounds like you already
        have the compiler on the newer OS rev
        anyway.

-- Happy Hacking...
=====================================================
 my opions are mine and do not represent my employer
                         and
                 I have brain damage
                          so
don't take life so seriosly, you won't get out alive!
=====================================================

 
 
 

GCC solaris 2.6/2.5 cross-compiler

Post by Philip Bro » Wed, 14 Oct 1998 04:00:00



>Hi guys,

>I'm a newbie software manager and have just installed gcc 2.8.1 for my machine,
>running solaris 2.6. As I need to compile code to work on solaris 2.5 *and* on
>2.6, I was wondering if I should build the gcc as a cross-compiler (and have
>*yuck* two) or can I get away with it in some other more elegant manner?

for just compiling a single executable: you should be fine just compiling
under 2.5, and distributing that binary, unless you're doing really wierd
stuff.

So, you'll need to allocate a 2.5 machine specifically for doing production
builds.
Which is good to do, because you need a 2.5 test machine anyway.

--
[trim the no-bots from my address to reply to me by email!]
 --------------------------------------------------
"initiating.. 'getting the hell out of here' maneouver" - Lennier, babylon5

 
 
 

1. GCC and backward compatibility: Solaris 2.6 -> 2.5

Does anyone have experience compiling code with gcc on
one version of Solaris and running the binaries on an
earlier version?

I found that there were backward compatibility problems
between Solaris 2.4 and 2.5:  Binaries compiled with gcc
under 2.5 would sometimes fail under 2.4.  The main culprit
seemed to be shared libraries -- as of Solaris 2.5, Sun
moved some functions from libucb.so to libc.so, and
dynamically linked executables that used these functions
would fail to load.

I'm wondering if there are similar gotchas when taking
a binary compiled under 2.6 (or later) and trying to run
it under 2.5.

Thanks in advance for any insights.

--------------------------------------------------------------------
Warren Jones              | To keep every cog and wheel is the first
Fluke Corporation         | precaution of intelligent tinkering.
Everett, Washington, USA  |                          -- Aldo Leopold

2. Learning Linux

3. "invalid option" error while building gcc as a cross-compiler

4. Help with perror

5. gcc cross-compiler: creating AIX/PowerPC executables

6. getting linux to see my 2nd pci ethernet card

7. need gcc --target type for multia/alpha cross-compiler

8. Anyone? cvs rtag/rfreeze tag . = 5?

9. Gcc Cross-Compiler Compile Troubles ...

10. gcc 2.4.5 cross-compiler for linux.

11. Using gcc as cross-compiler

12. gcc cross-compiler for 64-bit code?

13. gcc Cross-Compiler