On Friday 17 October 2008 20:11:21 ann kok wrote: > hi all > > why we have to put the following flags in the make.conf > > what are the purpose? > > CFLAGS="-O2 -pipe" > CXXFLAGS="-O2 -pipe" > CHOST="x86_64-pc-linux-gnu"
It's so that the compiler knows how to build stuff.... It doesn't know what you want if you don't tell it. CHOST for example tells the compiler which machine architecture the output binaries must be built for. There's nothing to stop you using an amd64 machine to build binaries that will run on a Sun sparc, and relying on the current machine architecture for the default is an especially stupid idea. A more sensible example is how Ubuntu does it. Their master build machines are probably the latest fancy Dual Cores, yet the code is built for i586 or i686 machines. CHOST controls CFLAGS are actually optional. -O is the optimization level and it's pretty normal and safe to use -O2. -pipe is an instruction to gcc on how to operate when it's compiling stuff. It makes the build go faster and reduce disk activity while doing it. But all of this is in the Gentoo Handbook. Did you read it? -- alan dot mckinnon at gmail dot com

