This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]