I have the RPM package of GCC 4.9.2 installed here.
As I experimented with the optimal settings for the NBench benchmark I tried quite a few different opimization flags. Well, I am not back to much simpler stuff...literally "Hello World!"...except that I am using the simple stuff to learn a lot more about the whole GNU toolset configuration on our platform.
So here is the question, given a simple compilation with the -v (verbose) option I get a dump of the built-in flags:
[G:\code\source\GCC]gcc -v hello.c -o hello.exe
Using built-in specs.
COLLECT_GCC=gcc
Target: i386-pc-os2-emx
Configured with: ../configure --prefix=/@unixroot/usr --with-sysroot=/@unixroot --enable-shared --enable-languages=c,c++ --enable-frame-pointer --with-gnu-as --disable-bootstrap --disable-multilib --disable-libstdcxx-pch --enable-threads
Thread model: os2
gcc version 4.9.2 (GCC)
COLLECT_GCC_OPTIONS='-v' '-o' 'hello.exe' '-mtune=i386' '-march=i386'
G:/usr/bin/../libexec/gcc/i386-pc-os2-emx/4.9.2/cc1 -quiet -v -iprefix G:/usr/bin/../lib/gcc/i386-pc-os2-emx/4.9.2/ hello.c -quiet -dumpbase hello.c -mtune=i386 -march=i386 -auxbase hello -version -o G:\var\tmp/cceQCIJv.s
GNU C (GCC) version 4.9.2 (i386-pc-os2-emx)
compiled by GNU C version 4.7.3, GMP version 5.0.2, MPFR version 3.1.0,
MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory "G:/usr/bin/../lib/gcc/i386-pc-os2-emx/4.9.2/../../../../i386-pc-os2-emx/include"
ignoring nonexistent directory "/@unixroot/usr/local/include"
ignoring nonexistent directory "G:/usr/lib/gcc/../../lib/gcc/i386-pc-os2-emx/4.9.2/../../../../i386-pc-os2-emx/include"
#include "..." search starts here:
#include <...> search starts here:
G:/usr/bin/../lib/gcc/i386-pc-os2-emx/4.9.2/include
G:/usr/bin/../lib/gcc/i386-pc-os2-emx/4.9.2/include-fixed
G:/usr/lib/gcc/../../lib/gcc/i386-pc-os2-emx/4.9.2/include
G:/usr/lib/gcc/../../lib/gcc/i386-pc-os2-emx/4.9.2/include-fixed
/@unixroot/usr/include
End of search list.
GNU C (GCC) version 4.9.2 (i386-pc-os2-emx)
compiled by GNU C version 4.7.3, GMP version 5.0.2, MPFR version 3.1.0,
MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 40cb22df062740f747e010b72b1ced6d
COLLECT_GCC_OPTIONS='-v' '-o' 'hello.exe' '-mtune=i386' '-march=i386'
as -v --traditional-format -o G:\var\tmp/ccokR79z.o G:\var\tmp/cceQCIJv.s
GNU assembler version 2.27 (i386-pc-os2-emx) using BFD version (GNU Binutils) 2.27
COMPILER_PATH=G:/usr/bin/../libexec/gcc/i386-pc-os2-emx/4.9.2/;G:/usr/bin/../libexec/gcc/;G:/usr/bin/../lib/gcc/i386-pc-os2-emx/4.9.2/../../../../i386-pc-os2-emx/bin/
LIBRARY_PATH=G:/usr/bin/../lib/gcc/i386-pc-os2-emx/4.9.2/;G:/usr/bin/../lib/gcc/;G:/usr/bin/../lib/gcc/i386-pc-os2-emx/4.9.2/../../../;/@unixroot/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'hello.exe' '-mtune=i386' '-march=i386'
ld.exe -o hello.exe G:/usr/bin/../lib/gcc/i386-pc-os2-emx/4.9.2/../../../crt0.o -LG:/usr/bin/../lib/gcc/i386-pc-os2-emx/4.9.2 -LG:/usr/bin/../lib/gcc -LG:/usr/bin/../lib/gcc/i386-pc-os2-emx/4.9.2/../../.. -L/@unixroot/usr/lib G:\var\tmp/ccokR79z.o -lgcc_so_d -lc_alias -lc_dll -los2 -lgcc_so_d -lc_alias -lc_dll -los2 -
lgcc_so_d -lc_alias -lc_dll -los2 -lgcc_so_d -lc_alias -lc_dll -los2
Now what I am trying to figure out is where the heck the seeded COLLECT_GCC_OPTIONS comes from? Heck, compiling for a i386 architecture, even in a very simple program is...well, appaling...LOL, c'mon...no setup today should be defaulting to this...!!!