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
GHC
Commits
2c7003a0
Commit
2c7003a0
authored
Jan 19, 2015
by
Andrey Mokhov
Browse files
Fix include paths for Gcc.
parent
79bc4c9d
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/Oracles/Builder.hs
View file @
2c7003a0
...
...
@@ -119,7 +119,7 @@ interestingInfo builder ss = case builder of
Ld
->
prefixAndSuffix
4
0
ss
Gcc
_
->
if
head
ss
==
"-MM"
then
prefixAndSuffix
1
1
ss
else
ss
else
prefixAndSuffix
0
4
ss
Ghc
_
->
if
head
ss
==
"-M"
then
prefixAndSuffix
1
1
ss
else
prefixAndSuffix
0
4
ss
...
...
src/Package/Base.hs
View file @
2c7003a0
...
...
@@ -7,7 +7,8 @@ module Package.Base (
Package
(
..
),
Settings
(
..
),
TodoItem
(
..
),
defaultSettings
,
libraryPackage
,
standardLibrary
,
commonCcArgs
,
commonLdArgs
,
commonCppArgs
,
commonCcWarninigArgs
,
pathArgs
,
packageArgs
,
includeGhcArgs
,
pkgHsSources
,
pathArgs
,
packageArgs
,
includeGccArgs
,
includeGhcArgs
,
pkgHsSources
,
pkgDepHsObjects
,
pkgLibHsObjects
,
pkgCObjects
,
argSizeLimit
,
sourceDependecies
,
...
...
@@ -99,6 +100,12 @@ packageArgs stage pathDist = do
else
productArgs
"-package-name"
(
arg
$
PackageKey
pathDist
)
<>
productArgs
"-package"
(
args
$
Deps
pathDist
)
]
includeGccArgs
::
FilePath
->
FilePath
->
Args
includeGccArgs
path
dist
=
let
pathDist
=
path
</>
dist
in
args
[
pathArgs
"-I"
path
$
IncludeDirs
pathDist
,
pathArgs
"-I"
path
$
DepIncludeDirs
pathDist
]
includeGhcArgs
::
FilePath
->
FilePath
->
Args
includeGhcArgs
path
dist
=
let
pathDist
=
path
</>
dist
...
...
src/Package/Compile.hs
View file @
2c7003a0
...
...
@@ -34,8 +34,7 @@ gccArgs (Package _ path _) (_, dist, _) srcs result =
in
args
[
args
$
CcArgs
pathDist
,
commonCcArgs
,
commonCcWarninigArgs
,
pathArgs
"-I"
path
$
IncludeDirs
pathDist
,
pathArgs
"-I"
path
$
DepIncludeDirs
pathDist
,
includeGccArgs
path
dist
,
args
(
"-c"
:
srcs
)
,
args
[
"-o"
,
result
]
]
...
...
src/Package/Dependencies.hs
View file @
2c7003a0
...
...
@@ -51,7 +51,7 @@ gccArgs sourceFile (Package _ path _) (stage, dist, _) =
,
args
$
CcArgs
pathDist
,
commonCcArgs
,
commonCcWarninigArgs
,
pathArgs
"-I"
path
$
IncludeDir
s
path
D
ist
,
includeGccArg
s
path
d
ist
,
args
[
"-MF"
,
unifyPath
depFile
]
,
args
[
"-x"
,
"c"
]
,
arg
$
unifyPath
sourceFile
]
...
...
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