askCc should be using the linker, not the compiler
authorSimon Marlow <marlowsd@gmail.com>
Sat, 1 Apr 2017 02:47:47 +0000 (22:47 -0400)
committerBen Gamari <ben@smart-cactus.org>
Sat, 1 Apr 2017 02:47:49 +0000 (22:47 -0400)
commit308287999fcc929891fbcf1221525dd7cbb77860
tree3a381468905d165d747204e8f563751b63e8e888
parent546c2a17ae3b21448f7fd467cc47807ae977e51f
askCc should be using the linker, not the compiler

When GHCi tries to find a shared lib, it calls "gcc --print-file-name"
to ask gcc where to find it.  But since we're looking for libraries,
we're really using the linker here, not the C compiler, so we should be
respecting the values of -pgml and -optl rather than -pgmc and -optc.

Test Plan: validate

Reviewers: bgamari, niteria, austin, hvr, erikd

Reviewed By: bgamari

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3393
compiler/ghci/Linker.hs
compiler/main/SysTools.hs