Defaulting Compilations to 32-bit on a 64-bit system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We're using RedHat Enterprise Linux (RHEL) on both 64-bit servers and
32-bit desktop systems.  Code that is compiled on the servers must be
able to run on the desktop systems as well.  By default RHEL 3 for AMD64
compiles in 64-bit mode so obviously the generated executables won't run
on our desktop systems.  I know that you can compile in 32-bit mode with
the -m32 option, but is there a way to have gcc/g++ compile in 32-bit by
default (without specifying the option every time)?  Even creating a
shell alias (e.g. alias gcc="gcc -m32") doesn't take care of the problem
as this alias gets ignored when using gcc in a Makefile.  Is there a way
to do what I'm asking?

Any help would be appreciated.

Jeremy

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux