How can I have ghc invoke the linker differently than its default configuration?Orphaned instances in HaskellInstalling ghc binaries on Linux (can't find libgmp.so)Speed comparison with Project Euler: C vs Python vs Erlang vs HaskellWhat optimizations can GHC be expected to perform reliably?Haskell ghc compiling/linking error, not creating executable. (linux)How can I prevent recompiling when switching between ghci and ghcOrder in which library directories are searched and linkedHow to include correctly -Wl,-rpath,$ORIGIN linker argument in a Makefile?Failed to compile haskell source using GHC, link errorHow to change default linker options in android studio
Do VLANs within a subnet need to have their own subnet for router on a stick?
Why can't I see bouncing of a switch on an oscilloscope?
Can a Warlock become Neutral Good?
Approximately how much travel time was saved by the opening of the Suez Canal in 1869?
What typically incentivizes a professor to change jobs to a lower ranking university?
Is it important to consider tone, melody, and musical form while writing a song?
The use of multiple foreign keys on same column in SQL Server
Is it tax fraud for an individual to declare non-taxable revenue as taxable income? (US tax laws)
Why are 150k or 200k jobs considered good when there are 300k+ births a month?
What is the word for reserving something for yourself before others do?
What do the dots in this tr command do: tr .............A-Z A-ZA-Z <<< "JVPQBOV" (with 13 dots)
Is this a crack on the carbon frame?
Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?
Today is the Center
Fencing style for blades that can attack from a distance
Minkowski space
What are the differences between the usage of 'it' and 'they'?
Mathematical cryptic clues
Smoothness of finite-dimensional functional calculus
Has the BBC provided arguments for saying Brexit being cancelled is unlikely?
How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?
A newer friend of my brother's gave him a load of baseball cards that are supposedly extremely valuable. Is this a scam?
If I cast Expeditious Retreat, can I Dash as a bonus action on the same turn?
How to write a macro that is braces sensitive?
How can I have ghc invoke the linker differently than its default configuration?
Orphaned instances in HaskellInstalling ghc binaries on Linux (can't find libgmp.so)Speed comparison with Project Euler: C vs Python vs Erlang vs HaskellWhat optimizations can GHC be expected to perform reliably?Haskell ghc compiling/linking error, not creating executable. (linux)How can I prevent recompiling when switching between ghci and ghcOrder in which library directories are searched and linkedHow to include correctly -Wl,-rpath,$ORIGIN linker argument in a Makefile?Failed to compile haskell source using GHC, link errorHow to change default linker options in android studio
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I can pass options to the linker using cc
with the -Wl
option. For example:
cc -Wl,-rpath -Wl,/usr/local/lib
That will invoke the linker with -rpath /usr/local/lib
How can I do the same with ghc?
Also how can I also direct ghc
to use a different linker than its default linker? For instance, if ghc
is configured to use /usr/bin/ld
, how can I tell it to use /usr/local/bin/ld
instead? One way to do that with cc
is:
cc -B/usr/local/bin
haskell linker ghc
add a comment |
I can pass options to the linker using cc
with the -Wl
option. For example:
cc -Wl,-rpath -Wl,/usr/local/lib
That will invoke the linker with -rpath /usr/local/lib
How can I do the same with ghc?
Also how can I also direct ghc
to use a different linker than its default linker? For instance, if ghc
is configured to use /usr/bin/ld
, how can I tell it to use /usr/local/bin/ld
instead? One way to do that with cc
is:
cc -B/usr/local/bin
haskell linker ghc
Haven't tried this, but according the ghc manual,-optl
should let you pass options, and-pgml
should let you use a different linker.
– tolUene
Mar 9 at 3:59
These are good hints - thanks. The docs organization don't make it easy to search all the options very easily. There's some idiosyncracies with these options I'm trying to work through (e.g., -optl -B/usr/local/bin or -optc -B/usr/local/bin don't seem to "work" - odd error: /usr/local/bin/settings: openFile: does not exist). I'll work through the oddities and craft an answer.
– Juan
Mar 9 at 17:53
add a comment |
I can pass options to the linker using cc
with the -Wl
option. For example:
cc -Wl,-rpath -Wl,/usr/local/lib
That will invoke the linker with -rpath /usr/local/lib
How can I do the same with ghc?
Also how can I also direct ghc
to use a different linker than its default linker? For instance, if ghc
is configured to use /usr/bin/ld
, how can I tell it to use /usr/local/bin/ld
instead? One way to do that with cc
is:
cc -B/usr/local/bin
haskell linker ghc
I can pass options to the linker using cc
with the -Wl
option. For example:
cc -Wl,-rpath -Wl,/usr/local/lib
That will invoke the linker with -rpath /usr/local/lib
How can I do the same with ghc?
Also how can I also direct ghc
to use a different linker than its default linker? For instance, if ghc
is configured to use /usr/bin/ld
, how can I tell it to use /usr/local/bin/ld
instead? One way to do that with cc
is:
cc -B/usr/local/bin
haskell linker ghc
haskell linker ghc
asked Mar 9 at 2:32
JuanJuan
398318
398318
Haven't tried this, but according the ghc manual,-optl
should let you pass options, and-pgml
should let you use a different linker.
– tolUene
Mar 9 at 3:59
These are good hints - thanks. The docs organization don't make it easy to search all the options very easily. There's some idiosyncracies with these options I'm trying to work through (e.g., -optl -B/usr/local/bin or -optc -B/usr/local/bin don't seem to "work" - odd error: /usr/local/bin/settings: openFile: does not exist). I'll work through the oddities and craft an answer.
– Juan
Mar 9 at 17:53
add a comment |
Haven't tried this, but according the ghc manual,-optl
should let you pass options, and-pgml
should let you use a different linker.
– tolUene
Mar 9 at 3:59
These are good hints - thanks. The docs organization don't make it easy to search all the options very easily. There's some idiosyncracies with these options I'm trying to work through (e.g., -optl -B/usr/local/bin or -optc -B/usr/local/bin don't seem to "work" - odd error: /usr/local/bin/settings: openFile: does not exist). I'll work through the oddities and craft an answer.
– Juan
Mar 9 at 17:53
Haven't tried this, but according the ghc manual,
-optl
should let you pass options, and -pgml
should let you use a different linker.– tolUene
Mar 9 at 3:59
Haven't tried this, but according the ghc manual,
-optl
should let you pass options, and -pgml
should let you use a different linker.– tolUene
Mar 9 at 3:59
These are good hints - thanks. The docs organization don't make it easy to search all the options very easily. There's some idiosyncracies with these options I'm trying to work through (e.g., -optl -B/usr/local/bin or -optc -B/usr/local/bin don't seem to "work" - odd error: /usr/local/bin/settings: openFile: does not exist). I'll work through the oddities and craft an answer.
– Juan
Mar 9 at 17:53
These are good hints - thanks. The docs organization don't make it easy to search all the options very easily. There's some idiosyncracies with these options I'm trying to work through (e.g., -optl -B/usr/local/bin or -optc -B/usr/local/bin don't seem to "work" - odd error: /usr/local/bin/settings: openFile: does not exist). I'll work through the oddities and craft an answer.
– Juan
Mar 9 at 17:53
add a comment |
1 Answer
1
active
oldest
votes
I think you can do ghc -optl-rpath -optl/usr/local/lib
and ghc -optc-B/usr/local/bin
.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55073455%2fhow-can-i-have-ghc-invoke-the-linker-differently-than-its-default-configuration%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I think you can do ghc -optl-rpath -optl/usr/local/lib
and ghc -optc-B/usr/local/bin
.
add a comment |
I think you can do ghc -optl-rpath -optl/usr/local/lib
and ghc -optc-B/usr/local/bin
.
add a comment |
I think you can do ghc -optl-rpath -optl/usr/local/lib
and ghc -optc-B/usr/local/bin
.
I think you can do ghc -optl-rpath -optl/usr/local/lib
and ghc -optc-B/usr/local/bin
.
answered Mar 21 at 9:44
Jens PetersenJens Petersen
567
567
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55073455%2fhow-can-i-have-ghc-invoke-the-linker-differently-than-its-default-configuration%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Haven't tried this, but according the ghc manual,
-optl
should let you pass options, and-pgml
should let you use a different linker.– tolUene
Mar 9 at 3:59
These are good hints - thanks. The docs organization don't make it easy to search all the options very easily. There's some idiosyncracies with these options I'm trying to work through (e.g., -optl -B/usr/local/bin or -optc -B/usr/local/bin don't seem to "work" - odd error: /usr/local/bin/settings: openFile: does not exist). I'll work through the oddities and craft an answer.
– Juan
Mar 9 at 17:53