Kai Ruottu wrote:
Bob Rossi wrote:
OK, I'm obviously having a hard time getting a relocatable version of
gcc building on mingw.
A cross GCC MUST be relocatable! A native GCC never needs to be that!
I myself am just now producing the "gcc version 4.1.2 20061215
(prerelease)"
for the MinGW-host on Linux... Totally "just for a fun", for pure
curiousity...
The "MinGW-target GCC on MinGW-host" seems to follow the old familiar
"use the stuff where it was started from" rules with the target headers :
C:\>cpp-i686-mingw-41pr -v
Reading specs from e:/usr/local/bin/../lib/gcc-lib/i686-mingw32/4.1.2/specs
Target: i686-mingw32
Configured with: ../configure --build=i686-linux-gnu --host=i586-mingw32
--target=i686-mingw32 --enable-threads=win32 --disable-nls
--disable-win32-registry
--disable-shared --enable-languages=c,c++
Thread model: win32
gcc version 4.1.2 20061215 (prerelease)
e:/usr/local/bin/../lib/gcc-lib/i686-mingw32/4.1.2/cc1.exe -E -quiet -v
-iprefix e:\usr\local\bin\../lib/gcc-lib/i686-mingw32/4.1.2/ -
-mtune=pentiumpro
ignoring nonexistent directory
"/usr/local/lib/gcc-lib/i686-mingw32/4.1.2/include"
ignoring nonexistent directory "/usr/local/i686-mingw32/sys-include"
ignoring nonexistent directory "/usr/local/i686-mingw32/include"
#include "..." search starts here:
#include <...> search starts here:
e:/usr/local/bin/../lib/gcc-lib/i686-mingw32/4.1.2/include
e:/usr/local/bin/../lib/gcc-lib/i686-mingw32/4.1.2/../../../../i686-mingw32/sys-include
e:/usr/local/bin/../lib/gcc-lib/i686-mingw32/4.1.2/../../../../i686-mingw32/include
End of search list.
BUT NOT with the target binutils and libraries :
C:\>cpp-i686-mingw-41pr -print-search-dirs
install: /usr/local/lib/gcc-lib/i686-mingw32/4.1.2/
programs: =
e:/usr/local/bin/../lib/gcc-lib/i686-mingw32/4.1.2/;
e:/usr/local/bin/../lib/gcc-lib/;
/usr/local/lib/gcc-lib/i686-mingw32/4.1.2/;
/usr/local/lib/gcc-lib/i686-mingw32/4.1.2/;
/usr/local/lib/gcc-lib/i686-mingw32/;
/usr/local/lib/gcc-lib/i686-mingw32/4.1.2/;
/usr/local/lib/gcc-lib/i686-mingw32/;
/usr/libexec/gcc/i686-mingw32/4.1.2/;
/usr/libexec/gcc/i686-mingw32/;
/usr/lib/gcc/i686-mingw32/4.1.2/;
/usr/lib/gcc/i686-mingw32/;
/usr/local/i686-mingw32/bin/i686-mingw32/4.1.2/;
/usr/local/i686-mingw32/bin/
libraries: =
e:/usr/local/bin/../lib/gcc-lib/i686-mingw32/4.1.2/;
e:/usr/local/bin/../lib/gcc-lib/;
/usr/local/lib/gcc-lib/i686-mingw32/4.1.2/;
/usr/lib/gcc/i686-mingw32/4.1.2/;
/usr/local/i686-mingw32/lib/i686-mingw32/4.1.2/;
/usr/local/i686-mingw32/lib/
This thing is a serious BUG ! The directory :
e:/usr/local/bin/../lib/gcc-lib/i686-mingw32/4.1.2/../../../../i686-mingw32/bin
should be there in 'programs: =' and the :
e:/usr/local/bin/../lib/gcc-lib/i686-mingw32/4.1.2/../../../../i686-mingw32/include
in 'libraries: ='
Of course when reverting back the old "standard",
'$prefix/lib/gcc-lib', instead of the
new splitted '$prefix/lib/gcc' and '$prefix/libexec/gcc', that could
have caused this bug,
but still with gcc-3.4 it didn't :
C:\>gcc-ppc-eabifpe-34 -print-search-dirs
install: /usr/local/lib/gcc-lib/ppc-eabifpe/3.4.6/
programs: =
E:/usr/local/bin/../lib/gcc-lib/ppc-eabifpe/3.4.6/;
E:/usr/local/bin/../lib/gcc-lib/;
/usr/local/lib/gcc-lib/ppc-eabifpe/3.4.6/;
/usr/local/lib/gcc-lib/ppc-eabifpe/3.4.6/;
/usr/local/lib/gcc-lib/ppc-eabifpe/;
/usr/local/lib/gcc-lib/ppc-eabifpe/3.4.6/;
/usr/local/lib/gcc-lib/ppc-eabifpe/;
/usr/libexec/gcc/ppc-eabifpe/3.4.6/;
/usr/libexec/gcc/ppc-eabifpe/;
/usr/lib/gcc/ppc-eabifpe/3.4.6/;
/usr/lib/gcc/ppc-eabifpe/;
E:/usr/local/bin/../lib/gcc-lib/ppc-eabifpe/3.4.6/../../../../ppc-eabifpe/bin/ppc-eabifpe/3.4.6/;
E:/usr/local/bin/../lib/gcc-lib/ppc-eabifpe/3.4.6/../../../../ppc-eabifpe/bin/;
<--- !!
/usr/local/ppc-eabifpe/bin/ppc-eabifpe/3.4.6/;
/usr/local/ppc-eabifpe/bin/
libraries: =
E:/usr/local/bin/../lib/gcc-lib/ppc-eabifpe/3.4.6/;
E:/usr/local/bin/../lib/gcc-lib/;
/usr/local/lib/gcc-lib/ppc-eabifpe/3.4.6/;
/usr/lib/gcc/ppc-eabifpe/3.4.6/;
E:/usr/local/bin/../lib/gcc-lib/ppc-eabifpe/3.4.6/../../../../ppc-eabifpe/lib/ppc-eabifpe/3.4.6/;
E:/usr/local/bin/../lib/gcc-lib/ppc-eabifpe/3.4.6/../../../../ppc-eabifpe/lib/;
<--- !!
/usr/local/ppc-eabifpe/lib/ppc-eabifpe/3.4.6/;
/usr/local/ppc-eabifpe/lib/
For the gcc-4.1.2 prerelease this build was first for the MinGW host so
maybe I patched
one of those "relative paths" away and these missings came from that...
Maybe I should
first try the original "splitted/relative paths" settings before
blaming the GCC developers...