Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jberryman
GHC
Commits
b2cae55f
Commit
b2cae55f
authored
May 12, 2013
by
Ian Lynagh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We actually need to use -threaded/-debug when linking /all/ DLLs
Not just base, integer-gmp and ghc-prim.
parent
ba00c33b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
18 deletions
+12
-18
ghc.mk
ghc.mk
+0
-18
rules/distdir-way-opts.mk
rules/distdir-way-opts.mk
+12
-0
No files found.
ghc.mk
View file @
b2cae55f
...
...
@@ -556,24 +556,6 @@ $(error Unknown integer library: $(INTEGER_LIBRARY))
endif
endif
# ----------------------------------------
# Special magic for the packages which link to the RTS
# This is a rather ugly hack to fix dynamically linked GHC on Windows.
# If GHC is linked with -threaded, then it links against libHSrts_thr.
# But if base is linked against libHSrts, then both end up getting
# loaded, and things go wrong. We therefore link the libraries that
# link against the RTS with the same RTS flags that we link GHC with.
ifeq
"$(GhcThreaded)" "YES"
libraries/
ghc-prim_dist-install_MORE_HC_OPTS
+=
-threaded
libraries/
integer-gmp_dist-install_MORE_HC_OPTS
+=
-threaded
libraries/
base_dist-install_MORE_HC_OPTS
+=
-threaded
endif
ifeq
"$(GhcDebugged)" "YES"
libraries/
ghc-prim_dist-install_MORE_HC_OPTS
+=
-debug
libraries/
integer-gmp_dist-install_MORE_HC_OPTS
+=
-debug
libraries/
base_dist-install_MORE_HC_OPTS
+=
-debug
endif
# ----------------------------------------
# Workarounds for problems building DLLs on Windows
...
...
rules/distdir-way-opts.mk
View file @
b2cae55f
...
...
@@ -132,6 +132,18 @@ $1_$2_$3_GHC_LD_OPTS += \
else
ifeq
"$$(TargetOS_CPP)" "darwin"
$1_$2_$3_GHC_LD_OPTS
+=
-optl-Wl
,-headerpad_max_install_names
endif
# This is a rather ugly hack to fix dynamically linked GHC on Windows.
# If GHC is linked with -threaded, then it links against libHSrts_thr.
# But if base is linked against libHSrts, then both end up getting
# loaded, and things go wrong. We therefore link the libraries with the
# same RTS flags that we link GHC with.
ifeq
"$$(GhcThreaded)" "YES"
$1_$2_$3_GHC_LD_OPTS
+=
-threaded
endif
ifeq
"$$(GhcDebugged)" "YES"
$1_$2_$3_GHC_LD_OPTS
+=
-debug
endif
endif
endif
...
...
Write
Preview
Markdown
is supported
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