This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/30380] bug in cppdefault.c
- From: "hartmann at physik dot uni-kl dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jan 2007 16:42:45 -0000
- Subject: [Bug c/30380] bug in cppdefault.c
- References: <bug-30380-10443@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from hartmann at physik dot uni-kl dot de 2007-01-05 16:42 -------
ok.
the trick with the "include" which provides additional 7 chars confused me. but
the issue remains: I'm not able to produce an position independent gcc for
mingw without hacking cppdefaults.c. The reason for this is that the paths for
cppdefault.c which are passed on the commandline
(-DGCC_INCLUDE_DIR="/mingw/lib/gcc/mingw32/4.0.3/include"
-DGPLUSPLUS_INCLUDE_DIR="/mingw/lib/gcc/mingw32/4.0.3/../../../../include/c++/4.0.3"
-DGPLUSPLUS_TOOL_INCLUDE_DIR="/mingw/lib/gcc/mingw32/4.0.3/../../../../include/c++/4.0.3/mingw32"
....) are transformed into absolute paths in cppdefaults.o:
strings cppdefault.o
D:/Programme/timo/msys-new/mingw/lib/gcc/mingw32/4.0.3/include
D:/Programme/timo/msys-new/mingw/include/c++/4.0.3
D:/Programme/timo/msys-new/mingw/include/c++/4.0.3/mingw32
D:/Programme/timo/msys-new/mingw/include/c++/4.0.3/backward
....
I am using msys. some part of msys is apparently translating paths from
mingw-style "/mingw/..." to absolute windows style "D:/...".
Till I figured out how to overcome this, I will use the hacked defines in
cppdefault.c (but I will use "const size_t cpp_GCC_INCLUDE_DIR_len = sizeof
GCC_INCLUDE_DIR - 8" now and append an include to GCC_INCLUDE_DIR).
Because this is apparently a bug in msys/mingw, I will ask there and not bother
the gcc-bug-list anymore.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30380