every invocation of gcc fails with such error: $ i386-mingw32-gcc hello_c.c -c -v Using built-in specs. Target: i386-mingw32 Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --bindir=/usr/i386-mingw32/bin --libdir=/usr/lib64 --libexecdir=/usr/lib64 --includedir=/usr/i386-mingw32/include --disable-shared --enable-threads --disable-nls --with-gnu-as --with-gnu-ld --with-mangler-in-ld --disable-sjlj-exceptions --enable-languages=c,c++ --enable-c99 --enable-long-long --disable-libstdcxx-pch --enable-__cxa_atexit --enable-libstdcxx-allocator=new --enable-cmath --with-long-double-128 --with-gxx-include-dir=/usr/i386-mingw32/include/c++/4.3.0 --build=x86_64-pld-linux --host=x86_64-pld-linux --target=i386-mingw32 Thread model: win32 gcc version 4.3.0 20070615 (experimental) cc1 -quiet -v -iprefix /usr/bin/../../lib64/gcc/i386-mingw32/4.3.0/ hello_c.c -quiet -dumpbase hello_c.c -mtune=i386 -auxbase hello_c -version -o /tmp/ccxepOxf.s i386-mingw32-gcc: error trying to exec 'cc1': execvp: No such file or directory as far i can see the `gcc' hasn't hardcoded path to cc1. e.g. /usr/lib64/gcc/i386-mingw32/4.3.0/cc1.
stat("/usr/bin/../../lib64/gcc/i386-mingw32/4.3.0/cc1", 0x7fff0e91cb00) = -1 ENOENT (No such file or directory) stat("/usr/bin/../../lib64/gcc/cc1", 0x7fff0e91cb00) = -1 ENOENT (No such file or directory) stat("/usr/bin/../../lib64/gcc/i386-mingw32/4.3.0/../../../../i386-mingw32/bin/i386-mingw32/4.3.0/cc1", 0x7fff0e91cb00) = -1 ENOENT (No such file or directory) stat("/usr/bin/../../lib64/gcc/i386-mingw32/4.3.0/../../../../i386-mingw32/bin/cc1", 0x7fff0e91cb00) = -1 ENOENT (No such file or directory) the "/usr/bin/../../" looks bad. it should be rather a "/usr/bin/../"
Well, I can't reproduce this issue. But I assume you are invoking here not the correct cross-compiler. There are two places you will find i386-pc-mingw32-gcc (for cross-compilers). First is in your sysroot (which seems to be for your configuration /usr/) in /usr/bin/ directory. The second place - and this is what you are trying to execute - is <pefix>/<target>/bin. The latter is just for internal use of binutils/gcc and is of internal use only.