Quentin Neill <quentin.neill....@gmail.com> writes: > A little off topic, but by what facility does the compiler know the > linker (or assembler for that matter) is gnu?
When you run configure, you can specify --with-gnu-as and/or --with-gnu-ld. If you do, the compiler will assume the GNU assembler or linker. If you do not, the compiler will assume that you are not using the GNU assembler or linker. In this case the compiler will normally use the common subset of command line options supported by the native assembler and the GNU assembler. In general that only affects the compiler behaviour on platforms which support multiple assemblers and/or linkers. E.g., on GNU/Linux, we always assume the GNU assembler and linker. There is an exception. If you use --with-ld, the compiler will run the linker with the -v option and grep for GNU in the output. If it finds it, it will assume it is the GNU linker. The reason for this exception is that --with-ld gives a linker which will always be used. The assumption when no specific linker is specified is that you might wind up using any linker available on the system, depending on the value of PATH when running the compiler. Ian