Skip to content

Commit

Permalink
treewide: isArm -> isAarch32
Browse files Browse the repository at this point in the history
Following legacy packing conventions, `isArm` was defined just for
32-bit ARM instruction set. This is confusing to non packagers though,
because Aarch64 is an ARM instruction set.

The official ARM overview for ARMv8[1] is surprisingly not confusing,
given the overall state of affairs for ARM naming conventions, and
offers us a solution. It divides the nomenclature into three levels:

```
ISA:             ARMv8   {-A, -R, -M}
                 /    \
Mode:     Aarch32     Aarch64
             |         /   \
Encoding:   A64      A32   T32
```

At the top is the overall v8 instruction set archicture. Second are the
two modes, defined by bitwidth but differing in other semantics too, and
buttom are the encodings, (hopefully?) isomorphic if they encode the
same mode.

The 32 bit encodings are mostly backwards compatible with previous
non-Thumb and Thumb encodings, and if so we can pun the mode names to
instead mean "sets of compatable or isomorphic encodings", and then
voilà we have nice names for 32-bit and 64-bit arm instruction sets
which do not use the word ARM so as to not confused either laymen or
experienced ARM packages.

[1]: https://developer.arm.com/products/architecture/a-profile
  • Loading branch information
Ericson2314 committed Apr 25, 2018
1 parent e40213e commit ba52ae5
Show file tree
Hide file tree
Showing 69 changed files with 110 additions and 107 deletions.
2 changes: 1 addition & 1 deletion lib/systems/doubles.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ in rec {

none = [];

arm = filterDoubles predicates.isArm;
arm = filterDoubles predicates.isAarch32;
aarch64 = filterDoubles predicates.isAarch64;
x86 = filterDoubles predicates.isx86;
i686 = filterDoubles predicates.isi686;
Expand Down
2 changes: 1 addition & 1 deletion lib/systems/for-meta.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ in rec {
all = [ {} ]; # `{}` matches anything
none = [];

arm = [ patterns.isArm ];
arm = [ patterns.isAarch32 ];
aarch64 = [ patterns.isAarch64 ];
x86 = [ patterns.isx86 ];
i686 = [ patterns.isi686 ];
Expand Down
7 changes: 5 additions & 2 deletions lib/systems/inspect.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ rec {
isx86_64 = { cpu = cpuTypes.x86_64; };
isPowerPC = { cpu = cpuTypes.powerpc; };
isx86 = { cpu = { family = "x86"; }; };
isArm = { cpu = { family = "arm"; }; };
isAarch64 = { cpu = { family = "aarch64"; }; };
isAarch32 = { cpu = { family = "arm"; bits = 32; }; };
isAarch64 = { cpu = { family = "arm"; bits = 64; }; };
isMips = { cpu = { family = "mips"; }; };
isRiscV = { cpu = { family = "riscv"; }; };
isWasm = { cpu = { family = "wasm"; }; };
Expand Down Expand Up @@ -41,6 +41,9 @@ rec {

isEfi = map (family: { cpu.family = family; })
[ "x86" "arm" "aarch64" ];

# Deprecated
isArm = isAarch32;
};

matchAnyAttrs = patterns:
Expand Down
2 changes: 1 addition & 1 deletion lib/systems/parse.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ rec {
armv6l = { bits = 32; significantByte = littleEndian; family = "arm"; };
armv7a = { bits = 32; significantByte = littleEndian; family = "arm"; };
armv7l = { bits = 32; significantByte = littleEndian; family = "arm"; };
aarch64 = { bits = 64; significantByte = littleEndian; family = "aarch64"; };
aarch64 = { bits = 64; significantByte = littleEndian; family = "arm"; };
i686 = { bits = 32; significantByte = littleEndian; family = "x86"; };
x86_64 = { bits = 64; significantByte = littleEndian; family = "x86"; };
mips = { bits = 32; significantByte = bigEndian; family = "mips"; };
Expand Down
2 changes: 1 addition & 1 deletion nixos/lib/qemu-flags.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
];

qemuSerialDevice = if pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64 then "ttyS0"
else if pkgs.stdenv.isArm || pkgs.stdenv.isAarch64 then "ttyAMA0"
else if pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64 then "ttyAMA0"
else throw "Unknown QEMU serial device for system '${pkgs.stdenv.system}'";

qemuBinary = qemuPkg: {
Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/config/gnu.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ with lib;
nano zile
texinfo # for the stand-alone Info reader
]
++ stdenv.lib.optional (!stdenv.isArm) grub2;
++ stdenv.lib.optional (!stdenv.isAarch32) grub2;


# GNU GRUB, where available.
boot.loader.grub.enable = !pkgs.stdenv.isArm;
boot.loader.grub.enable = !pkgs.stdenv.isAarch32;
boot.loader.grub.version = 2;

# GNU lsh.
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/virtualisation/qemu-vm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ in
# FIXME: Consolidate this one day.
virtualisation.qemu.options = mkMerge [
(mkIf (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) [ "-vga std" "-usb" "-device usb-tablet,bus=usb-bus.0" ])
(mkIf (pkgs.stdenv.isArm || pkgs.stdenv.isAarch64) [ "-device virtio-gpu-pci" "-device usb-ehci,id=usb0" "-device usb-kbd" "-device usb-tablet" ])
(mkIf (pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64) [ "-device virtio-gpu-pci" "-device usb-ehci,id=usb0" "-device usb-kbd" "-device usb-tablet" ])
];

# Mount the host filesystem via 9P, and bind-mount the Nix store
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/audio/sunvox/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let
arch =
if stdenv.isAarch64
then "arm64"
else if stdenv.isArm
else if stdenv.isAarch32
then "arm_armhf_raspberry_pi"
else if stdenv.is64bit
then "x86_64"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ stdenv.mkDerivation rec {

buildInputs = [
libtoxcore libsodium ncurses curl gdk_pixbuf libnotify
] ++ stdenv.lib.optionals (!stdenv.isArm) [
] ++ stdenv.lib.optionals (!stdenv.isAarch32) [
openal libopus libvpx freealut libqrencode
];
nativeBuildInputs = [ pkgconfig libconfig ];
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/virtualization/qemu/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
, makeWrapper
, attr, libcap, libcap_ng
, CoreServices, Cocoa, rez, setfile
, numaSupport ? stdenv.isLinux && !stdenv.isArm, numactl
, numaSupport ? stdenv.isLinux && !stdenv.isAarch32, numactl
, seccompSupport ? stdenv.isLinux, libseccomp
, pulseSupport ? !stdenv.isDarwin, libpulseaudio
, sdlSupport ? !stdenv.isDarwin, SDL2
Expand All @@ -29,7 +29,7 @@ let

hostCpuTargets = if stdenv.isx86_64 then "i386-softmmu,x86_64-softmmu"
else if stdenv.isi686 then "i386-softmmu"
else if stdenv.isArm then "arm-softmmu"
else if stdenv.isAarch32 then "arm-softmmu"
else if stdenv.isAarch64 then "aarch64-softmmu"
else throw "Don't know how to build a 'hostCpuOnly = true' QEMU";
in
Expand Down Expand Up @@ -135,7 +135,7 @@ stdenv.mkDerivation rec {
postInstall =
if stdenv.isx86_64 then ''makeWrapper $out/bin/qemu-system-x86_64 $out/bin/qemu-kvm --add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)"''
else if stdenv.isi686 then ''makeWrapper $out/bin/qemu-system-i386 $out/bin/qemu-kvm --add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)"''
else if stdenv.isArm then ''makeWrapper $out/bin/qemu-system-arm $out/bin/qemu-kvm --add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)"''
else if stdenv.isAarch32 then ''makeWrapper $out/bin/qemu-system-arm $out/bin/qemu-kvm --add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)"''
else if stdenv.isAarch64 then ''makeWrapper $out/bin/qemu-system-aarch64 $out/bin/qemu-kvm --add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)"''
else "";

Expand Down
4 changes: 2 additions & 2 deletions pkgs/build-support/bintools-wrapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ let
else if targetPlatform.system == "i686-linux" then "${libc_lib}/lib/ld-linux.so.2"
else if targetPlatform.system == "x86_64-linux" then "${libc_lib}/lib/ld-linux-x86-64.so.2"
# ARM with a wildcard, which can be "" or "-armhf".
else if (with targetPlatform; isArm && isLinux) then "${libc_lib}/lib/ld-linux*.so.3"
else if (with targetPlatform; isAarch32 && isLinux) then "${libc_lib}/lib/ld-linux*.so.3"
else if targetPlatform.system == "aarch64-linux" then "${libc_lib}/lib/ld-linux-aarch64.so.1"
else if targetPlatform.system == "powerpc-linux" then "${libc_lib}/lib/ld.so.1"
else if targetPlatform.isMips then "${libc_lib}/lib/ld.so.1"
Expand Down Expand Up @@ -176,7 +176,7 @@ stdenv.mkDerivation {
sep = optionalString (!targetPlatform.isMips) "-";
arch =
/**/ if targetPlatform.isAarch64 then endianPrefix + "aarch64"
else if targetPlatform.isArm then endianPrefix + "arm"
else if targetPlatform.isAarch32 then endianPrefix + "arm"
else if targetPlatform.isx86_64 then "x86-64"
else if targetPlatform.isi686 then "i386"
else if targetPlatform.isMips then {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/gcc/4.8/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ stdenv.mkDerivation ({
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms =
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isArm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/gcc/4.9/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ stdenv.mkDerivation ({
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms =
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isArm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/gcc/5/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ stdenv.mkDerivation ({
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms =
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isArm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/gcc/6/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ stdenv.mkDerivation ({
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms =
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isArm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/gcc/7/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ stdenv.mkDerivation ({
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms =
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isArm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/gcc/snapshot/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ stdenv.mkDerivation ({
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms =
# TODO(@Ericson2314): Figure out what's going wrong with Arm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isArm
if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
then []
else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/ghc/7.10.3-binary.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
or (throw "cannot bootstrap GHC on this platform"));

nativeBuildInputs = [ perl ];
buildInputs = stdenv.lib.optionals stdenv.targetPlatform.isArm [ llvm_35 ];
buildInputs = stdenv.lib.optionals stdenv.targetPlatform.isAarch32 [ llvm_35 ];

# Cannot patchelf beforehand due to relative RPATHs that anticipate
# the final install location/
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/ghc/8.2.1-binary.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
or (throw "cannot bootstrap GHC on this platform"));

nativeBuildInputs = [ perl ];
buildInputs = stdenv.lib.optionals (stdenv.targetPlatform.isArm || stdenv.targetPlatform.isAarch64) [ llvm_39 ];
buildInputs = stdenv.lib.optionals (stdenv.targetPlatform.isAarch32 || stdenv.targetPlatform.isAarch64) [ llvm_39 ];

# Cannot patchelf beforehand due to relative RPATHs that anticipate
# the final install location/
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/compilers/ghc/8.2.2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
enableShared ?
!(targetPlatform.isDarwin
# On iOS, dynamic linking is not supported
&& (targetPlatform.isAarch64 || targetPlatform.isArm))
&& (targetPlatform.isAarch64 || targetPlatform.isAarch32))
, # Whether to backport https://phabricator.haskell.org/D4388 for
# deterministic profiling symbol names, at the cost of a slightly
# non-standard GHC API
Expand Down Expand Up @@ -109,7 +109,7 @@ stdenv.mkDerivation rec {
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isArm ".gold"}"
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isAarch32 ".gold"}"
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
Expand Down Expand Up @@ -138,7 +138,7 @@ stdenv.mkDerivation rec {
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
"--enable-bootstrap-with-devel-snapshot"
] ++ stdenv.lib.optionals (targetPlatform.isArm) [
] ++ stdenv.lib.optionals (targetPlatform.isAarch32) [
"CFLAGS=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/ghc/8.4.1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ stdenv.mkDerivation rec {
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isArm ".gold"}"
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isAarch32 ".gold"}"
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
Expand Down Expand Up @@ -138,7 +138,7 @@ stdenv.mkDerivation rec {
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
"--enable-bootstrap-with-devel-snapshot"
] ++ stdenv.lib.optionals (targetPlatform.isArm) [
] ++ stdenv.lib.optionals (targetPlatform.isAarch32) [
"CFLAGS=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/ghc/8.4.2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ stdenv.mkDerivation rec {
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isArm ".gold"}"
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isAarch32 ".gold"}"
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
Expand Down Expand Up @@ -120,7 +120,7 @@ stdenv.mkDerivation rec {
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
"--enable-bootstrap-with-devel-snapshot"
] ++ stdenv.lib.optionals (targetPlatform.isArm) [
] ++ stdenv.lib.optionals (targetPlatform.isAarch32) [
"CFLAGS=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/ghc/head.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ stdenv.mkDerivation rec {
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isArm ".gold"}"
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isAarch32 ".gold"}"
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
Expand Down Expand Up @@ -125,7 +125,7 @@ stdenv.mkDerivation rec {
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
"--enable-bootstrap-with-devel-snapshot"
] ++ stdenv.lib.optionals (targetPlatform.isArm) [
] ++ stdenv.lib.optionals (targetPlatform.isAarch32) [
"CFLAGS=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/go/1.10.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ stdenv.mkDerivation rec {
'' + optionalString stdenv.isLinux ''
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go
'' + optionalString stdenv.isArm ''
'' + optionalString stdenv.isAarch32 ''
sed -i '/TestCurrent/areturn' src/os/user/user_test.go
echo '#!${stdenv.shell}' > misc/cgo/testplugin/test.bash
'' + optionalString stdenv.isDarwin ''
Expand Down Expand Up @@ -130,7 +130,7 @@ stdenv.mkDerivation rec {
GOARCH = if stdenv.isDarwin then "amd64"
else if stdenv.system == "i686-linux" then "386"
else if stdenv.system == "x86_64-linux" then "amd64"
else if stdenv.isArm then "arm"
else if stdenv.isAarch32 then "arm"
else if stdenv.isAarch64 then "arm64"
else throw "Unsupported system";
GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/go/1.4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ stdenv.mkDerivation rec {
GOARCH = if stdenv.isDarwin then "amd64"
else if stdenv.system == "i686-linux" then "386"
else if stdenv.system == "x86_64-linux" then "amd64"
else if stdenv.isArm then "arm"
else if stdenv.isAarch32 then "arm"
else throw "Unsupported system";
GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
GO386 = 387; # from Arch: don't assume sse2 on i686
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/go/1.9.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ stdenv.mkDerivation rec {
'' + optionalString stdenv.isLinux ''
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go
'' + optionalString stdenv.isArm ''
'' + optionalString stdenv.isAarch32 ''
sed -i '/TestCurrent/areturn' src/os/user/user_test.go
echo '#!${stdenv.shell}' > misc/cgo/testplugin/test.bash
'' + optionalString stdenv.isDarwin ''
Expand Down Expand Up @@ -132,7 +132,7 @@ stdenv.mkDerivation rec {
GOARCH = if stdenv.isDarwin then "amd64"
else if stdenv.system == "i686-linux" then "386"
else if stdenv.system == "x86_64-linux" then "amd64"
else if stdenv.isArm then "arm"
else if stdenv.isAarch32 then "arm"
else if stdenv.isAarch64 then "arm64"
else throw "Unsupported system";
GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/ocaml/3.12.1.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, ncurses, xlibsWrapper }:

let
useX11 = !stdenv.isArm && !stdenv.isMips;
useX11 = !stdenv.isAarch32 && !stdenv.isMips;
useNativeCompilers = !stdenv.isMips;
inherit (stdenv.lib) optionals optionalString;
in
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/ocaml/4.00.1.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, ncurses, xlibsWrapper }:

let
useX11 = !stdenv.isArm && !stdenv.isMips;
useX11 = !stdenv.isAarch32 && !stdenv.isMips;
useNativeCompilers = !stdenv.isMips;
inherit (stdenv.lib) optionals optionalString;
in
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/ocaml/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ let
real_url = if url == null then
"http://caml.inria.fr/pub/distrib/ocaml-${versionNoPatch}/ocaml-${version}.tar.xz"
else url;
safeX11 = stdenv: !(stdenv.isArm || stdenv.isMips);
safeX11 = stdenv: !(stdenv.isAarch32 || stdenv.isMips);
in

{ stdenv, fetchurl, ncurses, buildEnv
, libX11, xproto, useX11 ? safeX11 stdenv
, flambdaSupport ? false
}:

assert useX11 -> !stdenv.isArm && !stdenv.isMips;
assert useX11 -> !stdenv.isAarch32 && !stdenv.isMips;
assert flambdaSupport -> stdenv.lib.versionAtLeast version "4.03";

let
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/sbcl/bootstrap.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
--add-flags "--core $out/share/sbcl/sbcl.core"
'';

postFixup = stdenv.lib.optionalString (!stdenv.isArm && stdenv.isLinux) ''
postFixup = stdenv.lib.optionalString (!stdenv.isAarch32 && stdenv.isLinux) ''
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/share/sbcl/sbcl
'';

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/sbcl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
(setf features (remove x features))))
''
+ (if threadSupport then "(enable :sb-thread)" else "(disable :sb-thread)")
+ stdenv.lib.optionalString stdenv.isArm "(enable :arm)"
+ stdenv.lib.optionalString stdenv.isAarch32 "(enable :arm)"
+ ''
)) " > customize-target-features.lisp
Expand Down

0 comments on commit ba52ae5

Please sign in to comment.