Use assembler-with-cpp mode when running CPP.

This is needed because Clang is very strict about C99 macro rules, which
dictate that '#' in a body must have a token immediately following it for
string-ification. In practice we break this all the time, because we do
very weird stuff like:

    #define FOOBAR(xyz) \
    {-# SOME PRAGMA #-} \
    baz :: (xyz) \
    baz = ...

where the leading '#' in in the macro body clearly breaks this rule.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Suppress some more warnings from Clang.

It likes to think lambdas a la:

    foo $ \u -> ...

represent a kind of unicode extended literal.

It also gets confused when you have things like:

    ... thing ... {- comment ... (???) -}

where the (???) is mistaken as a trigraph.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Fix many ASSERT uses under Clang.

Clang doesn't like whitespace between macro and arguments.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Fix rts/packages.conf.in ld-options for clang.

Technically, '-u' is an ld option, not a compiler option,
and clang considers this argument unused. Hence, we must
explicitly forward this to the linker.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Untabify rts/packages.conf.in

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Actually fix rts/packages.conf.in ld-options.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Fix typo in header guard.

Spotted by Clang.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Revert "Actually fix rts/packages.conf.in ld-options."

This reverts commit 5dc74f385f1bbc9248ed950af255b946677c2ff9.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Revert "Untabify rts/packages.conf.in"

This reverts commit ebf97ad146173afd9e094f4975aa33717ed3a11e.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Revert "Fix rts/packages.conf.in ld-options for clang."

This reverts commit 991f285e681e8541632502d05d8a46de2d44b7bd.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Re-untabify rts/packages.conf.in

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Fix #7661 regression.

Patch from singpolyma.
Support QNXNTO for arm under LLVM

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Fix rts/package.conf.in ld-options for Clang.

Now with less Mac-breakage.

With this change, I can get a working stage1/stage2 compiler using
Clang 3.4svn, which can be used to link working executables!

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Document -fwarn-dodgy-imports changes in release notes. Trac #7167.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Add release note blurb for Clang support.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Initialize ptr to NULL to silence Clang warning.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Don't use -finline-limit with Clang.

It's unsupported.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Ensure gc_thread->wakeup is of type StgWord8.

rtsBool is defined to only have two inhabitants, which are true (1) and
false (0)

But the wakeup flag is set to 4 possible values, outside the range of
rtsBool. This leads Clang to warn about tautological comparisons.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Ensure gc_type is StgWord8.

Again, the range of gc_type is actually 1-3, which is technically
outside the range of rtsBool.

Signed-off-by: Austin Seipp <aseipp@pobox.com>