gnat{11,12,13}: fix build on x86_64-darwin

- gnat11: make sure to use the gnat-bootstrap gcc in the stdenv; and
- Drop the dual assemblers. x86_64-darwin uses the clang assembler by
default, so it no longer needs the workaround for the GNU assembler.

+7 -25
-25
pkgs/development/compilers/gcc/common/pre-configure.nix
··· 38 38 export GFORTRAN_FOR_TARGET=${pkgsBuildTarget.gfortran}/bin/${stdenv.targetPlatform.config}-gfortran 39 39 '' 40 40 41 - # On x86_64-darwin, the gnat-bootstrap bootstrap compiler that we need to build a 42 - # native GCC with Ada support emits assembly that is accepted by the Clang 43 - # integrated assembler, but not by the GNU assembler in cctools-port that Nix 44 - # usually in the x86_64-darwin stdenv. In particular, x86_64-darwin gnat-bootstrap 45 - # emits MOVQ as the mnemonic for quadword interunit moves, such as between XMM 46 - # and general registers (e.g "movq %xmm0, %rbp"); the cctools-port assembler, 47 - # however, only recognises MOVD for such moves. 48 - # 49 - # Therefore, for native x86_64-darwin builds that support Ada, we have to use 50 - # the Clang integrated assembler to build (at least stage 1 of) GCC, but have to 51 - # target GCC at the cctools-port GNU assembler. In the wrapped x86_64-darwin 52 - # gnat-bootstrap, the former is provided as `as`, while the latter is provided as 53 - # `gas`. 54 - # 55 - + lib.optionalString ( 56 - langAda 57 - && buildPlatform == hostPlatform 58 - && hostPlatform == targetPlatform 59 - && targetPlatform.isx86_64 60 - && targetPlatform.isDarwin 61 - ) '' 62 - export AS_FOR_BUILD=${gnat-bootstrap}/bin/as 63 - export AS_FOR_TARGET=${gnat-bootstrap}/bin/gas 64 - '' 65 - 66 41 # NOTE 2020/3/18: This environment variable prevents configure scripts from 67 42 # detecting the presence of aligned_alloc on Darwin. There are many facts that 68 43 # collectively make this fix necessary:
+7
pkgs/top-level/all-packages.nix
··· 15791 15791 && stdenv.buildPlatform == stdenv.hostPlatform 15792 15792 then buildPackages.gnat-bootstrap11 15793 15793 else buildPackages.gnat11; 15794 + stdenv = 15795 + if stdenv.hostPlatform == stdenv.targetPlatform 15796 + && stdenv.buildPlatform == stdenv.hostPlatform 15797 + && stdenv.buildPlatform.isDarwin 15798 + && stdenv.buildPlatform.isx86_64 15799 + then overrideCC stdenv gnat-bootstrap11 15800 + else stdenv; 15794 15801 }); 15795 15802 15796 15803 gnat12 = wrapCC (gcc12.cc.override {