On Mon, Nov 24, 2003 at 11:32:24AM +0530, Bansidhar Arvind Deshpande - CTD, Chennai. wrote: > I was going through the gcc documentation where I came across following > option > > Target Options > -b machine -V version > > I want to use this option. But I am not very clear about the option. Because > > according to my knowlege the machine is fixed while configuring gcc. Then > how come we can still use this option. Does that mean -b is specified for > choosing target from specific family for which gcc is configured ? Please > solve my doubt. > If it is true then I want to generate object file for i386 as well as > i8086(I mean two different processors from Intel family) using same > gcc. Is it possible ? Which string should i use for "machine" after -b ? What version of the GCC manual are you using? Maybe you should get a more recent version?! Here is the explanation of the relevant options from the manpage on my system: ---------------------------------------------------------------------- Specifying Target Machine and Compiler Version The usual way to run GCC is to run the executable called gcc, or <machine>-gcc when cross-compiling, or <machine>-gcc-<version> to run a version other than the one that was installed last. Sometimes this is inconve- nient, so GCC provides options that will switch to another cross-compiler or version. -b machine The argument machine specifies the target machine for compilation. The value to use for machine is the same as was specified as the machine type when configuring GCC as a cross-compiler. For example, if a cross-compiler was configured with configure i386v, meaning to compile for an 80386 running System V, then you would specify -b i386v to run that cross compiler. -V version The argument version specifies which version of GCC to run. This is useful when multiple versions are installed. For example, version might be 2.0, meaning to run GCC version 2.0. The -V and -b options work by running the <machine>-gcc-<version> executable, so there's no real reason to use them if you can just run that directly. ---------------------------------------------------------------------- If you want to compile for different hardware models but the same target you should have a look at the -m family of options. E.g. for Intel / AMD x86: -mcpu=cpu-type etc. Just read the "Hardware Models and Configurations" section of the GCC manual. But I don't think GCC supports i8086 (anymore). -- Claudio Bley ASCII ribbon campaign (") Debian GNU/Linux user - against HTML email X http://www.cs.uni-magdeburg.de/~bley/ & vCards / \