Ok.   Got it.  So some more patches were needed. <div><br></div><div>Pardon the asking, was somehow getting confused earlier. <span></span><br><br>On Tuesday, November 19, 2013, Kazu Yamamoto  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> Was there an issue if you used a wrapped clang and those patches or not?<br>
> I'm really confused.<br>
<br>
Even with GHC/clang-wrapper and alex/happy with Nick's patches, I<br>
cannot build GHC head. (I'm not using GCC 42 at all in this case.)<br>
<br>
AlexTemplate (pre-processed by clang) has linemarkers like this:<br>
<br>
----<br>
# 1 "<built-in>"<br>
----<br>
<br>
So, Lexer.hs generated from Lexer.x by alex also includes this one.<br>
<br>
Lexer.hs is CPP language extension. So, it is pre-processed again by<br>
clang. Since clang-wrapper specifies "-x assembler-with-cpp",<br>
generated Lexcer.hscpp contains:<br>
<br>
----<br>
 # 1 "<built-in>"<br>
----<br>
<br>
GHC cannot handle this, so build fails.<br>
<br>
My hack lets alex and happy not to produce linemarkers at all.<br>
<br>
Is this explanation clear to you?<br>
<br>
P.S.<br>
<br>
If we modify clang-wrapper to not convert "-x c" to "-x<br>
assembler-with-cpp", some other files which contains " #-}" cannot be<br>
compiled.<br>
<br>
--Kazu<br>
</blockquote></div>