On Jul 21, 2007, at 7:19 PM, Ian Lynagh wrote:
On Sat, Jul 21, 2007 at 07:08:27PM -0400, Peter Tanski wrote:
That seems to be what it is: the preprocessor for gcc 3.4.5 (Mingw
special) inserts a space:
cat TstFile.pp
#define INCLUDE #include
INCLUDE "HsVersions.h"
gcc -E -u -P TstFile.pp
#include "HsVersions.h
^
Is that the exact commandline? It doesn't work at all here:
Yes (cut and paste)--but that was just for this test; I did
conditionally redefined the Makefile (config.mk) so RAWCPP_FLAGS = '-
u ' instead of '-u -traditional' for the build, though.
$ gcc -E -u -P q.pp
gcc: installation problem, cannot exec 'gpcpp': No such file or
directory
I am using the file:
gcc-core-3.4.5-20060117-1.tar.gz
from the Mingw download page on SourceForge, at <http://
sourceforge.net/project/showfiles.php?group_id=2435>. I had to
extract it directly into the /c/msys/1.0/mingw directory, under the
Msys shell (I installed Msys first because otherwise the Msys script
moves the mingw installation under msys to keep everything located
precisely for the msys DLL afterward, anyway).
Part of the reason I installed gcc-3.4.5 was to test it out (the
replacement integer library requires a minimum gcc version of 3.1, so
3.4.5 was mostly out of curiosity). There aren't any other problems.
If it isn't apparent from the email, it does insert a space; it does
recognise the --traditional flag but that makes no difference (it
-traditional is exactly what makes the difference here:
$ c:/mingw/bin/gcc -E -undef -P -x c q.pp
#include "HsVersions.h"
$ c:/mingw/bin/gcc -E -traditional -undef -P -x c q.pp
#include "HsVersions.h"
Interesting. I recall trying gcc -E -u -P both with and without -
traditional and saw no difference. I also tested CL as a
preprocessor and, aside from the fact that CL always outputs the
preprocessed file to 'fname_stem.i' with '-P' it does not require a
flag equivalent to '-traditional' to avoid the spurious space.
I have
$ c:/mingw/bin/gcc --version
gcc.exe (GCC) 3.4.2 (mingw-special)
and get the same behaviour with
$ gcc --version
gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
I don't have cygwin installed though I do have the original gcc 3.4.2
that I could re-install over gcc 3.4.5. That might work better.
Cheers,
Pete
_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc