Control CPP through settings file (#8683)

Summary:
Allow the CPP program and flag choices for GHC
be configured via the the ghc settings file

Test Plan: ran validate yesterday

Reviewers: hvr, austin, mzero, simonmar

Reviewed By: austin, mzero, simonmar

Subscribers: mzero, simonmar, relrod, carter

Differential Revision: https://phabricator.haskell.org/D26
reading/writing blocking FDs over FD_SETSIZE is broken (Partially Trac #9169)

Summary:
libraries/base/cbits/inputReady.c had no limits on file descriptors.
Add a limit as non-threaded RTS does.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

Test Plan: none

Reviewers: austin, simonmar

Reviewed By: austin, simonmar

Subscribers: simonmar, relrod, carter

Differential Revision: https://phabricator.haskell.org/D28
compiler/ghc.mk: restore GhcHcOpts variable handling (Trac #8787)

Summary:
wiki and mk/config.mk.in suggests setting GhcHcOpts
for compiler-wide haskell flags. But it does not
work for a while now (broke around ca07d92837fc1e3ae9be67bb7d9e7f1b8035b00f)

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

Test Plan: 'make' shows now ghc timing as it used to be

Reviewers: simonmar, austin

Reviewed By: austin

Subscribers: simonmar, relrod, carter

Differential Revision: https://phabricator.haskell.org/D29
ghc-pkg register/update --enable-multi-instance

Summary:
New flag to ghc-pkg register/update to lift the restriction on multiple instances of the same package version being in a db at once.

Lifting the restriction is easy. The tricky bit is checking ghc does something sensible, but from the reading of the code it should treat such instances the same way it does with multiple instances between multiple DBs.

We'll also need a way to unregister by installed package id.

Test Plan: need to test that ghc is doing what we expect, at least if you use it like -hide-all-packages -package-id this -package-id that

Reviewers: ezyang, simonmar

Reviewed By: simonmar

Subscribers: relrod

Projects: #ghc

Differential Revision: https://phabricator.haskell.org/D32
includes/stg/SMP.h: use 'NOSMP' instead of never defined 'WITHSMP' (Trac #8789)

Summary:
git history does not contain state where 'WITHSMP' macro was ever defined.
It should have always been '!NOSMP'.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

Test Plan: build tested

Reviewers: austin, simonmar

Reviewed By: austin, simonmar

Subscribers: simonmar, relrod, carter

Differential Revision: https://phabricator.haskell.org/D33
remove redundant condition checking in profiling RTS code

Summary: A redundant condition checking is removed, as discussed in http://www.haskell.org/pipermail/ghc-devs/2014-June/005088.html

Test Plan: validate

Reviewers: simonmar, austin

Reviewed By: austin

Subscribers: simonmar, relrod, carter

Differential Revision: https://phabricator.haskell.org/D37