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;








1















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









share|improve this question






















  • 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

















1















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









share|improve this question






















  • 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













1












1








1


1






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









share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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

















  • 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












1 Answer
1






active

oldest

votes


















0














I think you can do ghc -optl-rpath -optl/usr/local/lib
and ghc -optc-B/usr/local/bin.






share|improve this answer























    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
    );



    );













    draft saved

    draft discarded


















    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









    0














    I think you can do ghc -optl-rpath -optl/usr/local/lib
    and ghc -optc-B/usr/local/bin.






    share|improve this answer



























      0














      I think you can do ghc -optl-rpath -optl/usr/local/lib
      and ghc -optc-B/usr/local/bin.






      share|improve this answer

























        0












        0








        0







        I think you can do ghc -optl-rpath -optl/usr/local/lib
        and ghc -optc-B/usr/local/bin.






        share|improve this answer













        I think you can do ghc -optl-rpath -optl/usr/local/lib
        and ghc -optc-B/usr/local/bin.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 21 at 9:44









        Jens PetersenJens Petersen

        567




        567





























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

            Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

            2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived