fix(haskell): link statically only the arm64 executable

The project-wide flags also reached the library's shared object, which
can't be linked with -static.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 035ce528082709f2837e953c3fc70c32a2da7a46 parent a5d8861
3 files changed, +5 −6
  • apps/haskell/Makefile +1 −1
  • apps/haskell/cabal.project.arm64 +0 −5
  • apps/haskell/todo-haskell.cabal +4 −0
diff --git a/apps/haskell/Makefile b/apps/haskell/Makefile
index 32fb769..8b1b9f1 100644
--- a/apps/haskell/Makefile
+++ b/apps/haskell/Makefile
@@ -30,7 +30,7 @@ build: gen/BuildVersion.hs $(CACHE)/x86-lib/libgmp.so
build-arm64: gen/BuildVersion.hs
@[ -d $(CACHE)/cabal-arm64/packages ] || $(ARM64_CABAL) update
- $(ARM64_CABAL) build -j --project-file=cabal.project.arm64 --builddir=$(CACHE)/dist-arm64 exe:todo-haskell
+ $(ARM64_CABAL) build -j --builddir=$(CACHE)/dist-arm64 exe:todo-haskell
@mkdir -p dist
cp $(ARM64_BIN) dist/app-linux-arm64.new && mv dist/app-linux-arm64.new dist/app-linux-arm64
diff --git a/apps/haskell/cabal.project.arm64 b/apps/haskell/cabal.project.arm64
deleted file mode 100644
index c859efa..0000000
--- a/apps/haskell/cabal.project.arm64
+++ /dev/null
@@ -1,5 +0,0 @@
--- The shipped linux-arm64 build, run inside the arm64 root. One static
--- binary: glibc and everything else linked in.
-import: cabal.project
-package todo-haskell
- ghc-options: -static -optl-static -optl-pthread -optl-s
diff --git a/apps/haskell/todo-haskell.cabal b/apps/haskell/todo-haskell.cabal
index 4e5390e..3edbd2f 100644
--- a/apps/haskell/todo-haskell.cabal
+++ b/apps/haskell/todo-haskell.cabal
@@ -56,6 +56,10 @@ executable todo-haskell
, wai
, warp >=3.3.25 && <3.5
ghc-options: -threaded -rtsopts "-with-rtsopts=-N2"
+ -- The shipped linux-arm64 binary is one static file: glibc and every
+ -- library linked in, symbols stripped.
+ if os(linux) && arch(aarch64)
+ ghc-options: -static -optl-static -optl-pthread -optl-s
test-suite spec
import: shared