Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Haskell
Cabal
Commits
5462f486
Commit
5462f486
authored
10 years ago
by
Mikhail Glushenkov
Browse files
Options
Downloads
Patches
Plain Diff
Also build profiling C objs with '-fPIC' when GHC is dynamic.
parent
79ccaa85
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Cabal/Distribution/Simple/GHC.hs
+8
-7
8 additions, 7 deletions
Cabal/Distribution/Simple/GHC.hs
with
8 additions
and
7 deletions
Cabal/Distribution/Simple/GHC.hs
+
8
−
7
View file @
5462f486
...
@@ -767,8 +767,13 @@ buildOrReplLib forRepl verbosity pkg_descr lbi lib clbi = do
...
@@ -767,8 +767,13 @@ buildOrReplLib forRepl verbosity pkg_descr lbi lib clbi = do
unless
(
null
(
cSources
libBi
))
$
do
unless
(
null
(
cSources
libBi
))
$
do
info
verbosity
"Building C Sources..."
info
verbosity
"Building C Sources..."
sequence_
sequence_
[
do
let
vanillaCcOpts
=
(
componentCcGhcOptions
verbosity
lbi
[
do
let
baseCcOpts
=
componentCcGhcOptions
verbosity
lbi
libBi
clbi
libTargetDir
filename
)
libBi
clbi
libTargetDir
filename
vanillaCcOpts
=
if
isGhcDynamic
-- Dynamic GHC requires C sources to be built
-- with -fPIC for REPL to work. See #2207.
then
baseCcOpts
{
ghcOptFPic
=
toFlag
True
}
else
baseCcOpts
profCcOpts
=
vanillaCcOpts
`
mappend
`
mempty
{
profCcOpts
=
vanillaCcOpts
`
mappend
`
mempty
{
ghcOptProfilingMode
=
toFlag
True
,
ghcOptProfilingMode
=
toFlag
True
,
ghcOptObjSuffix
=
toFlag
"p_o"
ghcOptObjSuffix
=
toFlag
"p_o"
...
@@ -780,11 +785,7 @@ buildOrReplLib forRepl verbosity pkg_descr lbi lib clbi = do
...
@@ -780,11 +785,7 @@ buildOrReplLib forRepl verbosity pkg_descr lbi lib clbi = do
}
}
odir
=
fromFlag
(
ghcOptObjDir
vanillaCcOpts
)
odir
=
fromFlag
(
ghcOptObjDir
vanillaCcOpts
)
createDirectoryIfMissingVerbose
verbosity
True
odir
createDirectoryIfMissingVerbose
verbosity
True
odir
runGhcProg
(
if
isGhcDynamic
runGhcProg
vanillaCcOpts
-- Dynamic GHC requires C sources to be built with
-- -fPIC for REPL to work. See #2207.
then
vanillaCcOpts
{
ghcOptFPic
=
toFlag
True
}
else
vanillaCcOpts
)
whenSharedLib
forceSharedLib
(
runGhcProg
sharedCcOpts
)
whenSharedLib
forceSharedLib
(
runGhcProg
sharedCcOpts
)
whenProfLib
(
runGhcProg
profCcOpts
)
whenProfLib
(
runGhcProg
profCcOpts
)
|
filename
<-
cSources
libBi
]
|
filename
<-
cSources
libBi
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment