diff options
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/gcc/common/configure-flags.nix')
-rw-r--r-- | nixpkgs/pkgs/development/compilers/gcc/common/configure-flags.nix | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/development/compilers/gcc/common/configure-flags.nix b/nixpkgs/pkgs/development/compilers/gcc/common/configure-flags.nix index 997771c2abfe..6744ad8b0bfe 100644 --- a/nixpkgs/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/nixpkgs/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -133,7 +133,7 @@ let "--with-system-zlib" "--enable-static" "--enable-languages=${ - lib.concatStrings (lib.intersperse "," + lib.concatStringsSep "," ( lib.optional langC "c" ++ lib.optional langCC "c++" ++ lib.optional langD "d" @@ -146,7 +146,6 @@ let ++ lib.optionals crossDarwin [ "objc" "obj-c++" ] ++ lib.optional langJit "jit" ) - ) }" ] @@ -158,9 +157,15 @@ let (lib.enableFeature enablePlugin "plugin") ] - # Support -m32 on powerpc64le + # Support -m32 on powerpc64le/be ++ lib.optional (targetPlatform.system == "powerpc64le-linux") "--enable-targets=powerpcle-linux" + ++ lib.optional (targetPlatform.system == "powerpc64-linux") + "--enable-targets=powerpc-linux" + + # Fix "unknown long double size, cannot define BFP_FMT" + ++ lib.optional (targetPlatform.isPower && targetPlatform.isMusl) + "--disable-decimal-float" # Optional features ++ lib.optional (isl != null) "--with-isl=${isl}" @@ -170,8 +175,11 @@ let "--enable-cloog-backend=isl" ] - # Ada options - ++ lib.optional langAda "--enable-libada" + # Ada options, gcc can't build the runtime library for a cross compiler + ++ lib.optional langAda + (if hostPlatform == targetPlatform + then "--enable-libada" + else "--disable-libada") # Java options ++ lib.optionals langJava [ |