From f2ac16ec28a880fb0a0e009020e6f4befeb4db40 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Thu, 11 Feb 2021 17:33:24 -0800 Subject: [PATCH] gcc: support -m32 on ppc64le This is needed to build grub2 for powerpc64le hosts. Running powerpcle code on powerpc64le is somewhat analogous to running multiarch i686 code on x86_64, so it's also useful to have in general. --- pkgs/development/compilers/gcc/common/configure-flags.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index 4bdec26fd993..5e7b74104663 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -147,6 +147,10 @@ let (lib.enableFeature enablePlugin "plugin") ] + # Support -m32 on powerpc64le + ++ lib.optional (targetPlatform.system == "powerpc64le-linux") + "--enable-targets=powerpcle-linux" + # Optional features ++ lib.optional (isl != null) "--with-isl=${isl}" ++ lib.optionals (cloog != null) [