Invalid PATH set for `-B` dirs when calling gcc to link
-B values are set in
-optl, GHC constructs a seemingly invalid
PATH from it, using
; instead of
: to prepend to the existing
Steps to reproduce
On a system where all executables needed to run GHC are in
$ cat Main.hs module Main where main = return () $ PATH=/bin ghc -optl-B/var/tmp Main [1 of 1] Compiling Main ( Main.hs, Main.o ) Linking Main ... collect2: fatal error: cannot find 'ld' compilation terminated.
PATH="/var/tmp";/bin being set in the environment).
Link sample program successfully.
- GHC version used: 7.6.3 and 8.4.4
- Operating System: linux
- System Architecture: x86_64