On Thu, Sep 03, 2009 at 12:06:56AM +0530, narendra babu wrote:
I have lot of makefiles , by default gcc geneartes 64 bit executable on 64
machine but i need to change to 32 bit , dont want to change the makefiles .
Instead is there anyway i can change default flags at command line for gcc
Can i set environment variable
export CFLAGS=-m32 CXX=-m32 so that by gcc takes CFLAGS or CXX to generate
32bit code instead of 64 bit code by default .
So in simple i want to chnage the gcc default flag settings
Like $CFLAGS=-m32 gcc hello.c should generate me 32 bit code on a 64 bit
machine instead of 64 bit .
Note : As by default all my makefiles can take the default CFLAGS which is
set as environment variable .