Skip to content
GitLab
Menu
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
6072c113
Commit
6072c113
authored
Aug 31, 2008
by
Duncan Coutts
Browse files
Use a hopefully more robust method of determining the gcc version
parent
f738058d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Distribution/Simple/Program.hs
View file @
6072c113
...
...
@@ -636,12 +636,7 @@ alexProgram = (simpleProgram "alex") {
gccProgram
::
Program
gccProgram
=
(
simpleProgram
"gcc"
)
{
programFindVersion
=
findProgramVersion
"--version"
$
\
str
->
-- Invoking "gcc --version" gives a string like
-- "gcc (GCC) 4.1.2 (Gentoo 4.1.2)"
case
words
str
of
(
_
:
_
:
ver
:
_
)
->
ver
_
->
""
programFindVersion
=
findProgramVersion
"-dumpversion"
id
}
ranlibProgram
::
Program
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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