Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure static is fPIC #70

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
description = "Minimal devshell flake for haskell";

inputs.haskellNix.url = "github:input-output-hk/haskell.nix";
inputs.haskellNix.url = "github:input-output-hk/haskell.nix/angerman-patch-3";
inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable";
inputs.flake-utils.url = "github:hamishmack/flake-utils/hkm/nested-hydraJobs";
inputs.iohk-nix.url = "github:input-output-hk/iohk-nix";
Expand Down
3 changes: 2 additions & 1 deletion static.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ let tool-version-map = import ./tool-map.nix;
"$@" \
$NIX_CABAL_FLAGS \
--disable-shared --enable-static \
--ghc-option=-fPIC \
--ghc-option=-L${lib.getLib static-gmp}/lib \
--ghc-option=-L${lib.getLib static-libsodium-vrf}/lib \
--ghc-option=-L${lib.getLib static-secp256k1}/lib \
Expand Down Expand Up @@ -136,7 +137,7 @@ pkgs.mkShell (rec {
fixup-nix-deps
# We are happy to use a _shared_ compiler; we only want the build
# products to be static.
(compiler.override { enableShared = true; })
(compiler.override { enableShared = true; enableRelocatedStaticLibs = true; enableNUMA = false; })
] ++ (with pkgs; [
pkgconfig
stdenv.cc.cc.lib ]) ++ (with pkgs.buildPackages; [
Expand Down