From bc93fb2af42654ac94806a750df7873afb4046e1 Mon Sep 17 00:00:00 2001 From: Sam Estep Date: Fri, 22 May 2026 21:08:40 -0400 Subject: [PATCH] applgrid: fix aarch64-linux build Assisted-by: Claude:opus-4.7 --- pkgs/by-name/ap/applgrid/no-m64.patch | 10 ++++++++++ pkgs/by-name/ap/applgrid/package.nix | 8 ++++++++ 2 files changed, 18 insertions(+) create mode 100644 pkgs/by-name/ap/applgrid/no-m64.patch diff --git a/pkgs/by-name/ap/applgrid/no-m64.patch b/pkgs/by-name/ap/applgrid/no-m64.patch new file mode 100644 index 000000000000..5848af7d1e3e --- /dev/null +++ b/pkgs/by-name/ap/applgrid/no-m64.patch @@ -0,0 +1,10 @@ +--- a/configure ++++ b/configure +@@ -16130,7 +16130,6 @@ + $as_echo "$as_me: WARNING: ****************************************************************" >&2;} + fi + +-( echo $CXXFLAGS | grep -q "m64" ) || CXXFLAGS+=" -m64 " + + + diff --git a/pkgs/by-name/ap/applgrid/package.nix b/pkgs/by-name/ap/applgrid/package.nix index 136ab20b5656..bda97414b7a2 100644 --- a/pkgs/by-name/ap/applgrid/package.nix +++ b/pkgs/by-name/ap/applgrid/package.nix @@ -19,6 +19,14 @@ stdenv.mkDerivation (finalAttrs: { }; patches = [ + # Upstream's configure unconditionally injects `-m64` into CXXFLAGS, which is + # invalid on aarch64 (and redundant on x86_64). The line was added in r1946 + # for applgrid 1.6.17 with the commit message "add default m64 compilation". + # There is no public bug tracker upstream, and the line is still present in + # trunk. We patch only the generated `configure` (not `configure.ac`) so + # that make doesn't try to re-run autotools during the build. + ./no-m64.patch + # ROOT 6.40 made rootcling fail when no selection rules are provided # (https://root.cern/doc/v640/release-notes.html#core-libraries). The patch # appends $*LinkDef.h to the dictionary pattern rule so rootcint picks up