summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamar Christina <tamar@zhox.com>2017-02-14 09:43:02 -0500
committerBen Gamari <ben@smart-cactus.org>2017-02-14 10:53:01 -0500
commit04f67c9970c0e2599e0b2a29353b1acec72dacf0 (patch)
treee3ecfe16febb021c610eceac660c85e1122842ff
parent2484d4dae65c81f218dcfe494b963b2630bb8fa6 (diff)
downloadhaskell-04f67c9970c0e2599e0b2a29353b1acec72dacf0.tar.gz
Expand list of always loaded Windows shared libs
When the `GCC` driver envokes the pipeline a `SPEC` is used to determine how to configure the compiler and which libraries to pass along. For Windows/mingw, this specfile is https://github.com/gcc-mirror/gcc/blob/master/gcc/config/i386/mingw32.h This expands the list of base DLLs with the ones that GCC always links, and adds extra sibling dlls of `stdc++` in case it is linked in. Following D3028 this patch only needs to load the always load only the top level individual shared libs. Test Plan: ./validate Reviewers: RyanGlScott, austin, bgamari, erikd, simonmar Reviewed By: bgamari Subscribers: RyanGlScott, thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D3029
-rw-r--r--docs/users_guide/8.2.1-notes.rst3
-rw-r--r--rts/linker/PEi386.c6
2 files changed, 9 insertions, 0 deletions
diff --git a/docs/users_guide/8.2.1-notes.rst b/docs/users_guide/8.2.1-notes.rst
index 45ed5896f5..00e6c7c4b5 100644
--- a/docs/users_guide/8.2.1-notes.rst
+++ b/docs/users_guide/8.2.1-notes.rst
@@ -263,6 +263,9 @@ Runtime system
Enabling external tools to collect and analyze the event log data while the
application is still running.
+- advapi32, shell32 and user32 are now automatically loaded in GHCi. libGCC is also
+ loaded when a depencency requires it. See :ghc-ticket:`13189`.
+
Build system
~~~~~~~~~~~~
diff --git a/rts/linker/PEi386.c b/rts/linker/PEi386.c
index f29bb8b69a..bfac34f501 100644
--- a/rts/linker/PEi386.c
+++ b/rts/linker/PEi386.c
@@ -107,9 +107,15 @@ void initLinker_PEi386()
* These two libraries cause problems when added to the static link,
* but are necessary for resolving symbols in GHCi, hence we load
* them manually here.
+ *
+ * Most of these are included by base, but GCC always includes them
+ * So lets make sure we always have them too.
*/
addDLL(WSTR("msvcrt"));
addDLL(WSTR("kernel32"));
+ addDLL(WSTR("advapi32"));
+ addDLL(WSTR("shell32"));
+ addDLL(WSTR("user32"));
addDLLHandle(WSTR("*.exe"), GetModuleHandle(NULL));
#endif
}