This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Defaulting Compilations to 32-bit on a 64-bit system
- From: Jeremy Dreese <jdreese at bucknell dot edu>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 18 Aug 2005 11:57:26 -0400
- Subject: 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