Compiling from source... platform specific?

zeus

out of date
If I compile a package from source does it matter if I have an x86 or powerpc computer? Most binaries are for x86 and I have an ibook with gutsy.

cheers guys!
 
no, if you compiling from source, compiling from source creates the appropriate installation files for the architecture you are compiling it for

BTW: i can't believe i'm advising about compiling source, anyone would think i compile source all the time, tbh, i haven't even configured HWF kernel in my system let alone compiling from suorce

Edit: source code is source code it must be compiled before it can be executed on any specific architecture / platform

e.g. x86, PPC or whatever
 
For best results, put CPU-specific Cflags in your /etc/environment file.

Safe Cflags - Gentoo Linux Wiki

For instance, to get the best stable Cflags for a G5 SPARC...
Code:
CHOST="powerpc64-unknown-linux-gnu"
CFLAGS="-mcpu=G5 -O2 -pipe -maltivec -mabi=altivec -fno-strict-aliasing"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1"
 
Not all applications can be compiled for any architecture though. There may be cases where certain programs/libraries can only be built for certain architectures, since there's no guarantee that it's portable.
 
Addis said:
Not all applications can be compiled for any architecture though. There may be cases where certain programs/libraries can only be built for certain architectures, since there's no guarantee that it's portable.
thankies, are there any tell tale signs to signify a prog/lib source is not cross compilable between arch ?

Edit: sorry for the stupid post, presumably you can tell the arch by reading the source
 
Back
Top