gcc-4.2
Does anything but cpp matters here? I think cpp is the same.
š
11.12.2013, 01:47, "Carter Schonwald" <carter.schonwald@gmail.com>:
are you using GCC or Clang, what versions are they?


On Tue, Dec 10, 2013 at 4:43 PM, Alexander Pakhomov <ker0sin@yandex.ru> wrote:
Thanks. I think preprocessor dump could help me:
cpp -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -Irts/dist/build -Irts/dist/build/autogen š š š š rts/HeapStackCheck.cmm > cpp_dump
That is ghc-stage1 -> cpp and all options that cpp doesn't accept removed.
I hope ghc preprocessor is compatible with system C preprocessor.

11.12.2013, 01:06, "Simon Marlow" <marlowsd@gmail.com>:
> On 10/12/13 00:35, Alexander Pakhomov wrote:
>
>> šHi. Trying to compile ghc HEAD on OpenBSD I got an error:
>> šrts/HeapStackCheck.cmm:97:18: parse error on input `['
>> šThe code is following:
>> ššš96 ššššššššif (HpAlloc <= BLOCK_SIZE
>> ššš97 šššššššššššš&& bdescr_link(CurrentNursery) != NULL) {
>> šwhich preprocesses to:
>> ššššššššššif (HpAlloc <= (1<<12)
>> šššššššššššššš&& b0[CurrentNursery+15] != (0::bits64)) {
>> šThis is the first occurrence of b0 in preprocessed file. I believe that it is due to undefined b0.
>> šCommand that fails is:
>> š"inplace/bin/ghc-stage1" -static š-H32m -O -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts -dcmm-lint ššššš-i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen šššššššššš-O2 ššš-c rts/HeapStackCheck.cmm -o rts/dist/build/HeapStackCheck.o
>> šTo preprocess do the following:
>> šcpp -O -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -Irts/dist/build -Irts/dist/build/autogen ššššššššrts/HeapStackCheck.cmm | less
>>
>> šCan you please find source of b0 in preprocessed file?
>
> I think this means that something went wrong when generating
> DerivedConstants.h, which is where the definition of bdescr_link() comes
> from. šIn my build, I have the following, in the file
> includes/dist-derivedconstants/header/:
>
> #define OFFSET_bdescr_link 16
> #define REP_bdescr_link b64
> #define bdescr_link(__ptr__) REP_bdescr_link[__ptr__+OFFSET_bdescr_link]
>
> This is auto-generated by the program in utils/deriveConstants. šThis
> used to be a C program, but nowadays it's a Haskell program that
> generates a C program for reasons that I forget. šAnyway, your problem
> is somewhere in there... see if you can find out where by dumping out
> intermediate files and so forth. šIf you get stuck, tell us where you
> get to and we'll try to help some more.
>
> Cheers,
> Simon
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs