!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

714 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/142 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
28 May 2025
@maralorn:maralorn.demaralorn sterni: When I want GHC to set a flag when calling cc during a compilation. Is there an environment variable I can set in my Haskell package derivation? Or is it correct that I can only set that variable during compilation of GHC via CONF_CC_OPTS_STAGE2. It seems kinda fishy to me because I basically only want to affect runtime behavior of the compiler. 15:43:27
@alex:tunstall.xyzAlex
In reply to @sternenseemann:systemli.org
I think armv7l is de facto dead as well, but nixpkgs CI checks eval of it?? Probably more GHC availability checks need to be added before we can drop support.
You could try asking in #exotic:nixos.org.
15:48:51
@b:chreekat.netchreekat
In reply to @maralorn:maralorn.de
sterni: When I want GHC to set a flag when calling cc during a compilation. Is there an environment variable I can set in my Haskell package derivation? Or is it correct that I can only set that variable during compilation of GHC via CONF_CC_OPTS_STAGE2. It seems kinda fishy to me because I basically only want to affect runtime behavior of the compiler.
I see a -optc and a -optlc (for llvm... Not sure why there's two) on GHC directly , but maybe you're asking about a different level of the stack
16:44:04
@b:chreekat.netchreekathttps://downloads.haskell.org/ghc/latest/docs/users_guide/phases.html#ghc-flag-optc-option16:44:15
@artem.types:matrix.orgArtem
In reply to @maralorn:maralorn.de
sterni: When I want GHC to set a flag when calling cc during a compilation. Is there an environment variable I can set in my Haskell package derivation? Or is it correct that I can only set that variable during compilation of GHC via CONF_CC_OPTS_STAGE2. It seems kinda fishy to me because I basically only want to affect runtime behavior of the compiler.
I don't believe it can be done with env vars
17:38:26
@artem.types:matrix.orgArtem I think it's only the flags that @b:chreekat.net: mentioned 17:39:45
@alex:tunstall.xyzAlex
In reply to @maralorn:maralorn.de
sterni: When I want GHC to set a flag when calling cc during a compilation. Is there an environment variable I can set in my Haskell package derivation? Or is it correct that I can only set that variable during compilation of GHC via CONF_CC_OPTS_STAGE2. It seems kinda fishy to me because I basically only want to affect runtime behavior of the compiler.

Aren't you assuming that GHC calls cc?

It doesn't unless you're compiling C code or you have an unregisterised GHC.

Nixpkgs' cc-wrapper may allow you to add extra options via an environment variable.
I cannot recall what environment variables it reads.

17:41:18
@maralorn:maralorn.demaralornI think I figured it out.17:58:41
@maralorn:maralorn.demaralornAnd yes ghc calls cc. For c code and for linking.17:58:41
@maralorn:maralorn.demaralornWell I guess -optlc might actually do what I want also.18:19:06
@sternenseemann:systemli.orgsterni (he/him)-optc and friends is right yes18:54:28
@alex:tunstall.xyzAlexDoesn't it call ld for linking?19:22:42
@maralorn:maralorn.demaralornWell, at least not for the js backend. There emscripten is used for linking iiuc.21:34:09

Show newer messages


Back to Room ListRoom Version: 6