treewide: isArm -> isAarch32
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
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
# Build options
|
||||
, runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime
|
||||
, multithreadBuild ? true # Multithreading via pthreads/win32 threads
|
||||
, sdlSupport ? !stdenv.isArm, SDL ? null, SDL2 ? null
|
||||
, vdpauSupport ? !stdenv.isArm, libvdpau ? null
|
||||
, sdlSupport ? !stdenv.isAarch32, SDL ? null, SDL2 ? null
|
||||
, vdpauSupport ? !stdenv.isAarch32, libvdpau ? null
|
||||
# Developer options
|
||||
, debugDeveloper ? false
|
||||
, optimizationsDeveloper ? true
|
||||
@@ -42,7 +42,7 @@
|
||||
*/
|
||||
|
||||
let
|
||||
inherit (stdenv) icCygwin isDarwin isFreeBSD isLinux isArm;
|
||||
inherit (stdenv) icCygwin isDarwin isFreeBSD isLinux isAarch32;
|
||||
inherit (stdenv.lib) optional optionals enableFeature;
|
||||
|
||||
cmpVer = builtins.compareVersions;
|
||||
@@ -55,9 +55,9 @@ let
|
||||
verFix = withoutFix: fixVer: withFix: if reqMatch fixVer then withFix else withoutFix;
|
||||
|
||||
# Disable dependency that needs fixes before it will work on Darwin or Arm
|
||||
disDarwinOrArmFix = origArg: minVer: fixArg: if ((isDarwin || isArm) && reqMin minVer) then fixArg else origArg;
|
||||
disDarwinOrArmFix = origArg: minVer: fixArg: if ((isDarwin || isAarch32) && reqMin minVer) then fixArg else origArg;
|
||||
|
||||
vaapiSupport = reqMin "0.6" && ((isLinux || isFreeBSD) && !isArm);
|
||||
vaapiSupport = reqMin "0.6" && ((isLinux || isFreeBSD) && !isAarch32);
|
||||
in
|
||||
|
||||
assert openglSupport -> libGLU_combined != null;
|
||||
@@ -153,8 +153,8 @@ stdenv.mkDerivation rec {
|
||||
bzip2 fontconfig freetype gnutls libiconv lame libass libogg libtheora
|
||||
libvdpau libvorbis lzma soxr x264 x265 xvidcore zlib libopus
|
||||
] ++ optional openglSupport libGLU_combined
|
||||
++ optionals (!isDarwin && !isArm) [ libvpx libpulseaudio ] # Need to be fixed on Darwin and ARM
|
||||
++ optional ((isLinux || isFreeBSD) && !isArm) libva
|
||||
++ optionals (!isDarwin && !isAarch32) [ libvpx libpulseaudio ] # Need to be fixed on Darwin and ARM
|
||||
++ optional ((isLinux || isFreeBSD) && !isAarch32) libva
|
||||
++ optional isLinux alsaLib
|
||||
++ optionals isDarwin darwinFrameworks
|
||||
++ optional vdpauSupport libvdpau
|
||||
|
||||
@@ -52,7 +52,7 @@ in stdenv.mkDerivation rec {
|
||||
configureFlags = [ "--disable-static" "--bindir=$(dev)/bin" ];
|
||||
|
||||
# The asm for armel is written with the 'asm' keyword.
|
||||
CFLAGS = optionalString stdenv.isArm "-std=gnu99";
|
||||
CFLAGS = optionalString stdenv.isAarch32 "-std=gnu99";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ stdenv.mkDerivation ({
|
||||
(if cross ? float && cross.float == "soft" then "--without-fp" else "--with-fp")
|
||||
] ++ lib.optionals (cross != null) [
|
||||
"--with-__thread"
|
||||
] ++ lib.optionals (cross == null && stdenv.isArm) [
|
||||
] ++ lib.optionals (cross == null && stdenv.isAarch32) [
|
||||
"--host=arm-linux-gnueabi"
|
||||
"--build=arm-linux-gnueabi"
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ let self = stdenv.mkDerivation rec {
|
||||
# The config.guess in GMP tries to runtime-detect various
|
||||
# ARM optimization flags via /proc/cpuinfo (and is also
|
||||
# broken on multicore CPUs). Avoid this impurity.
|
||||
preConfigure = optionalString stdenv.isArm ''
|
||||
preConfigure = optionalString stdenv.isAarch32 ''
|
||||
configureFlagsArray+=("--build=$(./configfsf.guess)")
|
||||
'';
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ let self = stdenv.mkDerivation rec {
|
||||
# The config.guess in GMP tries to runtime-detect various
|
||||
# ARM optimization flags via /proc/cpuinfo (and is also
|
||||
# broken on multicore CPUs). Avoid this impurity.
|
||||
preConfigure = optionalString stdenv.isArm ''
|
||||
preConfigure = optionalString stdenv.isAarch32 ''
|
||||
configureFlagsArray+=("--build=$(./configfsf.guess)")
|
||||
'';
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
||||
"AR=${stdenv.cc.targetPrefix}ar"
|
||||
"RANLIB=${stdenv.cc.targetPrefix}ranlib"
|
||||
"OBJCOPY=${stdenv.cc.targetPrefix}objcopy"
|
||||
] ++ stdenv.lib.optional stdenv.isArm "ARCH=arm"
|
||||
] ++ stdenv.lib.optional stdenv.isAarch32 "ARCH=arm"
|
||||
++ stdenv.lib.optional stdenv.isAarch64 "ARCH=aarch64";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
||||
@@ -31,7 +31,7 @@ let
|
||||
|
||||
# $(includedir) is different from $(prefix)/include due to multiple outputs
|
||||
sed -i -e 's|^\(CPPFLAGS = .*\) -I\$(prefix)/include|\1 -I$(includedir)|' config/Makefile.inc.in
|
||||
'' + stdenv.lib.optionalString stdenv.isArm ''
|
||||
'' + stdenv.lib.optionalString stdenv.isAarch32 ''
|
||||
# From https://archlinuxarm.org/packages/armv7h/icu/files/icudata-stdlibs.patch
|
||||
sed -e 's/LDFLAGSICUDT=-nodefaultlibs -nostdlib/LDFLAGSICUDT=/' -i config/mh-linux
|
||||
'';
|
||||
|
||||
@@ -16,7 +16,7 @@ stdenv.mkDerivation (rec {
|
||||
# jemalloc is unable to correctly detect transparent hugepage support on
|
||||
# ARM (https://github.com/jemalloc/jemalloc/issues/526), and the default
|
||||
# kernel ARMv6/7 kernel does not enable it, so we explicitly disable support
|
||||
++ stdenv.lib.optional stdenv.isArm "--disable-thp";
|
||||
++ stdenv.lib.optional stdenv.isAarch32 "--disable-thp";
|
||||
doCheck = true;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
"echo : \\\${ac_cv_func_clock_gettime=\'yes\'} > config.cache";
|
||||
|
||||
configureFlags = [ "--enable-install-test-programs" ]
|
||||
++ stdenv.lib.optionals (stdenv.isArm || stdenv.isAarch64)
|
||||
++ stdenv.lib.optionals (stdenv.isAarch32 || stdenv.isAarch64)
|
||||
[ "--enable-tegra-experimental-api" "--enable-etnaviv-experimental-api" ]
|
||||
++ stdenv.lib.optional stdenv.isDarwin "-C";
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [
|
||||
libsodium libmsgpack ncurses libconfig
|
||||
] ++ stdenv.lib.optionals (!stdenv.isArm) [
|
||||
] ++ stdenv.lib.optionals (!stdenv.isAarch32) [
|
||||
libopus
|
||||
libvpx
|
||||
];
|
||||
|
||||
@@ -33,11 +33,11 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
||||
buildInputs = [
|
||||
autoreconfHook libsodium ncurses check libconfig
|
||||
] ++ stdenv.lib.optionals (!stdenv.isArm) [
|
||||
] ++ stdenv.lib.optionals (!stdenv.isAarch32) [
|
||||
libopus
|
||||
];
|
||||
|
||||
propagatedBuildInputs = stdenv.lib.optionals (!stdenv.isArm) [ libvpx ];
|
||||
propagatedBuildInputs = stdenv.lib.optionals (!stdenv.isAarch32) [ libvpx ];
|
||||
|
||||
# Some tests fail randomly due to timeout. This kind of problem is well known
|
||||
# by upstream: https://github.com/irungentoo/toxcore/issues/{950,1054}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (stdenv) isi686 isx86_64 isArm is64bit isMips isDarwin isCygwin;
|
||||
inherit (stdenv) isi686 isx86_64 isAarch32 is64bit isMips isDarwin isCygwin;
|
||||
inherit (stdenv.lib) enableFeature optional optionals;
|
||||
in
|
||||
|
||||
|
||||
@@ -43,11 +43,11 @@
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (stdenv) isi686 isx86_64 isArm is64bit isMips isDarwin isCygwin;
|
||||
inherit (stdenv) isi686 isx86_64 isAarch32 is64bit isMips isDarwin isCygwin;
|
||||
inherit (stdenv.lib) enableFeature optional optionals;
|
||||
in
|
||||
|
||||
assert isi686 || isx86_64 || isArm || isMips; # Requires ARM with floating point support
|
||||
assert isi686 || isx86_64 || isAarch32 || isMips; # Requires ARM with floating point support
|
||||
|
||||
assert vp8DecoderSupport || vp8EncoderSupport || vp9DecoderSupport || vp9EncoderSupport;
|
||||
assert internalStatsSupport && (vp9DecoderSupport || vp9EncoderSupport) -> postprocSupport;
|
||||
|
||||
@@ -33,17 +33,17 @@ else
|
||||
|
||||
let
|
||||
defaultGalliumDrivers =
|
||||
if stdenv.isArm
|
||||
if stdenv.isAarch32
|
||||
then ["nouveau" "freedreno" "vc4" "etnaviv" "imx"]
|
||||
else if stdenv.isAarch64
|
||||
then ["nouveau" "vc4" ]
|
||||
else ["svga" "i915" "r300" "r600" "radeonsi" "nouveau"];
|
||||
defaultDriDrivers =
|
||||
if (stdenv.isArm || stdenv.isAarch64)
|
||||
if (stdenv.isAarch32 || stdenv.isAarch64)
|
||||
then ["nouveau"]
|
||||
else ["i915" "i965" "nouveau" "radeon" "r200"];
|
||||
defaultVulkanDrivers =
|
||||
if (stdenv.isArm || stdenv.isAarch64)
|
||||
if (stdenv.isAarch32 || stdenv.isAarch64)
|
||||
then []
|
||||
else ["intel"] ++ lib.optional enableRadv "radeon";
|
||||
in
|
||||
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = stdenv.lib.optional doCheck libpng;
|
||||
|
||||
configureFlags = stdenv.lib.optional stdenv.isArm "--disable-arm-iwmmxt";
|
||||
configureFlags = stdenv.lib.optional stdenv.isAarch32 "--disable-arm-iwmmxt";
|
||||
|
||||
doCheck = true;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0ckjqw5kz5m30srqi87idj7xhpw6bpki43mj07bazjm2qmh3cdbj";
|
||||
};
|
||||
|
||||
preConfigure = stdenv.lib.optionalString stdenv.isArm ''
|
||||
preConfigure = stdenv.lib.optionalString stdenv.isAarch32 ''
|
||||
configureFlagsArray=("CFLAGS=-DJB_SP=8 -DJB_PC=9")
|
||||
'';
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
assert readline != null;
|
||||
|
||||
let
|
||||
arch = if stdenv.isArm
|
||||
arch = if stdenv.isAarch32
|
||||
then (if stdenv.is64bit then "arm64" else "arm")
|
||||
else (if stdenv.is64bit then "x64" else "ia32");
|
||||
armHardFloat = stdenv.isArm && (stdenv.platform.gcc.float or null) == "hard";
|
||||
armHardFloat = stdenv.isAarch32 && (stdenv.platform.gcc.float or null) == "hard";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
arch = if stdenv.isArm
|
||||
arch = if stdenv.isAarch32
|
||||
then if stdenv.is64bit
|
||||
then"arm64"
|
||||
else "arm"
|
||||
|
||||
@@ -10,7 +10,7 @@ let
|
||||
arch = if stdenv.isx86_64 then "x64"
|
||||
else if stdenv.isi686 then "ia32"
|
||||
else if stdenv.isAarch64 then "arm64"
|
||||
else if stdenv.isArm then "arm"
|
||||
else if stdenv.isAarch32 then "arm"
|
||||
else throw "Unknown architecture for v8";
|
||||
git_url = "https://chromium.googlesource.com";
|
||||
clangFlag = if stdenv.isDarwin then "1" else "0";
|
||||
|
||||
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# Avoid this error:
|
||||
# signal_processing/filter_ar_fast_q12_armv7.S:88: Error: selected processor does not support `sbfx r11,r6,#12,#16' in ARM mode
|
||||
patchPhase = stdenv.lib.optionalString stdenv.isArm ''
|
||||
patchPhase = stdenv.lib.optionalString stdenv.isAarch32 ''
|
||||
substituteInPlace configure --replace 'armv7*|armv8*' 'disabled'
|
||||
'' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
substituteInPlace webrtc/base/checks.cc --replace 'defined(__UCLIBC__)' 1
|
||||
|
||||
Reference in New Issue
Block a user