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

            Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

            Understanding generators in Python2019 Community Moderator ElectionGenerator function not working pythonFor loop not executing two timesGenerators - Printing generated valuesWhy can a python generator only be used once?What exactly do generators do?What does the “yield” keyword do?What does “list comprehension” mean? How does it work and how can I use it?sklearn Kfold acces single fold instead of for loopIs a generator the callable? Which is the generator?Apply Border To Range Of Cells Using OpenpyxlCalling an external command in PythonWhat are metaclasses in Python?What is the difference between @staticmethod and @classmethod?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?Understanding slice notationUnderstanding Python super() with __init__() methodsDoes Python have a string 'contains' substring method?

            How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page