From b164cc2fa6e1a9f11dd31e46615cb9ec6a507daa Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Sun, 19 Nov 2023 08:31:29 +0800 Subject: [PATCH] nix: fix lib:support for armv7a (#3394) --- flake.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index b56756922f..9c6bb3a226 100644 --- a/flake.nix +++ b/flake.nix @@ -253,7 +253,17 @@ # we also do not want to have any dependencies listed (especially no rts!) enableStatic = false; - setupBuildFlags = p.component.setupBuildFlags ++ map (x: "--ghc-option=${x}") [ "-shared" "-o" "libsupport.so" ]; + # This used to work with 8.10.7... + # setupBuildFlags = p.component.setupBuildFlags ++ map (x: "--ghc-option=${x}") [ "-shared" "-o" "libsupport.so" ]; + # ... but now with 9.6+ + # we have to do the -shared thing by hand. + postBuild = '' + armv7a-unknown-linux-androideabi-ghc -shared -o libsupport.so \ + -optl-Wl,-u,setLineBuffering \ + -optl-Wl,-u,pipe_std_to_socket \ + dist/build/*.a + ''; + postInstall = '' mkdir -p $out/_pkg