Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
6f5155cf
Commit
6f5155cf
authored
Sep 17, 2008
by
Ian Lynagh
Browse files
Cope with gcc.exe and ld.exe not being where ex expect on Windows
parent
1a496ed1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Distribution/Simple/GHC.hs
View file @
6f5155cf
...
...
@@ -225,12 +225,21 @@ configureToolchain ghcProg =
compilerDir
=
takeDirectory
(
programPath
ghcProg
)
baseDir
=
takeDirectory
compilerDir
libDir
=
baseDir
</>
"gcc-lib"
programFindLocationOnWindows
prog
windowsProgPath
verbosity
=
do
-- On Windows windowsProgPath should exist. However, in case
-- it doesn't (and currently it doesn't for the inplace GHC)
-- we check that it does.
exists
<-
doesFileExist
windowsProgPath
if
exists
then
return
(
Just
windowsProgPath
)
else
programFindLocation
prog
verbosity
isWindows
=
case
buildOS
of
Windows
->
True
;
_
->
False
-- on Windows finding and configuring ghc's gcc and ld is a bit special
findGcc
|
isWindows
=
\
_
->
return
(
Just
(
baseDir
</>
"gcc.exe"
))
findGcc
|
isWindows
=
programFindLocationOnWindows
gccProgram
(
baseDir
</>
"gcc.exe"
)
|
otherwise
=
programFindLocation
gccProgram
findLd
|
isWindows
=
\
_
->
return
(
Just
(
libDir
</>
"ld.exe"
))
findLd
|
isWindows
=
programFindLocationOnWindows
ldProgram
(
libDir
</>
"ld.exe"
)
|
otherwise
=
programFindLocation
ldProgram
configureGcc
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment