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>
Typo in note
Have GHC depend on the stm package
Atomically increment the UniqSupply counter
Atomically update the name cache in tidyTopName

To pave the way for parallel --make, we need to make sure that all
modifications of shared mutable state are performed in a thread-safe
manner. This is one of such occurrences.
Make newTempName thread-safe

There is an obvious race condition between checking whether a file
exists and having the caller of newTempName bring the file into
existence so that it will have exclusive access to that file.

To remedy this, introduce nextTempSuffix to keep track of the next
unique suffix that a new temporary filename ought to have.
Make cleanTempFiles/cleanTempFilesExcept thread-safe

Atomically update the list of files to clean so that multiple threads
won't step over each other during cleanup.
Atomically update wrapperRef in mkWrapperName

It probably helps, and it definitely doesn't hurt.
Don't use unsafeDupablePerformIO in 'panic'

If multiple threads attempt to evaluate a panic at the same time,
more than one exception may be raised.
Make lazyGet thread safe

Evaluating multiple values returned by lazyGet from the same handle
can cause the inner (mutable) offset to be overwritten in between
lazy reads from the Handle, causing invalid results to be returned.
So replace the mutable offset with a fresh MutInt when deferring the
call to getAt.
make FastString thread-safe
Make newUnique and newUniqueSupply use atomic IORef operations
Implement inlinePerformIO correctly
Add the -j flag for parallel compilation
only update mods_done_ref if compilation succeeded
reverse the list of loaded modules like 'upsweep' does
don't assume that the home package is mainPackageId