diff options
author | Daniel Barlow <dan@telent.net> | 2017-12-05 10:27:45 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-02-23 20:43:42 -0500 |
commit | 9c50ae6898b2d5dccd6e030c80535fb1a32f703d (patch) | |
tree | f957c334d3b0885adcca2cefa6f90ab805443e30 /pkgs | |
parent | 2682ba63bc0c4dea159ec664d63d375a8d75b12a (diff) | |
download | nixpkgs-9c50ae6898b2d5dccd6e030c80535fb1a32f703d.tar nixpkgs-9c50ae6898b2d5dccd6e030c80535fb1a32f703d.tar.gz nixpkgs-9c50ae6898b2d5dccd6e030c80535fb1a32f703d.tar.bz2 nixpkgs-9c50ae6898b2d5dccd6e030c80535fb1a32f703d.tar.lz nixpkgs-9c50ae6898b2d5dccd6e030c80535fb1a32f703d.tar.xz nixpkgs-9c50ae6898b2d5dccd6e030c80535fb1a32f703d.tar.zst nixpkgs-9c50ae6898b2d5dccd6e030c80535fb1a32f703d.zip |
lib, treewide: Add missing MIPS arches, and fix existing usage
Existing "mips64el" should be "mipsel". This is just the barest minimum so that nixpkgs can recognize them as systems - although required for building individual derivations onto MIPS boards, it is not sufficient if you want to actually build nixos on those targets
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/build-support/bintools-wrapper/default.nix | 11 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.5/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/tools/misc/pkgconfig/default.nix | 3 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kbd/default.nix | 2 | ||||
-rw-r--r-- | pkgs/stdenv/adapters.nix | 4 | ||||
-rw-r--r-- | pkgs/stdenv/default.nix | 2 | ||||
-rw-r--r-- | pkgs/stdenv/linux/default.nix | 4 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
8 files changed, 20 insertions, 12 deletions
diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 48fd8665cb4..98b40114c69 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -58,7 +58,7 @@ let else if (with targetPlatform; isArm && 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.system == "mips64el-linux" then "${libc_lib}/lib/ld.so.1" + else if targetPlatform.isMips then "${libc_lib}/lib/ld.so.1" else if targetPlatform.isDarwin then "/usr/lib/dyld" else if stdenv.lib.hasSuffix "pc-gnu" targetPlatform.config then "ld.so.1" else null; @@ -171,13 +171,20 @@ stdenv.mkDerivation { else if targetPlatform.isWindows then "pe" else "elf" + toString targetPlatform.parsed.cpu.bits; endianPrefix = if targetPlatform.isBigEndian then "big" else "little"; + sep = optionalString (targetPlatform.isx86 || targetPlatform.isArm) "-"; arch = /**/ if targetPlatform.isAarch64 then endianPrefix + "aarch64" else if targetPlatform.isArm then endianPrefix + "arm" else if targetPlatform.isx86_64 then "x86-64" else if targetPlatform.isi686 then "i386" + else if targetPlatform.isMips then { + "mips" = "btsmipn32"; # n32 variant + "mipsel" = "ltsmipn32"; # n32 variant + "mips64" = "btsmip"; + "mips64el" = "ltsmip"; + }.${targetPlatform.parsed.cpu.name} else throw "unknown emulation for platform: " + targetPlatform.config; - in targetPlatform.platform.bfdEmulation or (fmt + "-" + arch); + in targetPlatform.platform.bfdEmulation or (fmt + sep + arch); depsTargetTargetPropagated = extraPackages; diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix index 6b2718f5e69..c63867a1d2d 100644 --- a/pkgs/development/compilers/gcc/4.5/default.nix +++ b/pkgs/development/compilers/gcc/4.5/default.nix @@ -317,8 +317,8 @@ stdenv.mkDerivation ({ # Platform-specific flags optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ - # Trick that should be taken out once we have a mips64el-linux not loongson2f - optional (targetPlatform == hostPlatform && stdenv.system == "mips64el-linux") "--with-arch=loongson2f" + # Trick that should be taken out once we have a mipsel-linux not loongson2f + optional (targetPlatform == hostPlatform && stdenv.system == "mipsel-linux") "--with-arch=loongson2f" ; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; diff --git a/pkgs/development/tools/misc/pkgconfig/default.nix b/pkgs/development/tools/misc/pkgconfig/default.nix index 7cfd78a39a2..15d00b0a2a5 100644 --- a/pkgs/development/tools/misc/pkgconfig/default.nix +++ b/pkgs/development/tools/misc/pkgconfig/default.nix @@ -19,8 +19,7 @@ stdenv.mkDerivation rec { patches = optional (!vanilla) ./requires-private.patch ++ optional stdenv.isCygwin ./2.36.3-not-win32.patch; - preConfigure = optionalString (stdenv.system == "mips64el-linux") - ''cp -v ${automake}/share/automake*/config.{sub,guess} .''; + preConfigure = ""; # TODO(@Ericson2314): Remove next mass rebuild buildInputs = optional (stdenv.isCygwin || stdenv.isDarwin || stdenv.isSunOS) libiconv; configureFlags = [ "--with-internal-glib" ] diff --git a/pkgs/os-specific/linux/kbd/default.nix b/pkgs/os-specific/linux/kbd/default.nix index b97f48af414..d1e40371e37 100644 --- a/pkgs/os-specific/linux/kbd/default.nix +++ b/pkgs/os-specific/linux/kbd/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { # We get a warning in armv5tel-linux and the fuloong2f, so we # disable -Werror in it. - ${stdenv.lib.optionalString (stdenv.isArm || stdenv.system == "mips64el-linux") '' + ${stdenv.lib.optionalString (stdenv.isArm || stdenv.hostPlatform.isMips) '' sed -i s/-Werror// src/Makefile.am ''} ''; diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix index 3090b6283e9..0791d9e1856 100644 --- a/pkgs/stdenv/adapters.nix +++ b/pkgs/stdenv/adapters.nix @@ -94,7 +94,9 @@ rec { # without proper `file` command, libtool sometimes fails # to recognize 64-bit DLLs ++ stdenv.lib.optional (hostPlatform.config == "x86_64-w64-mingw32") pkgs.file - ++ stdenv.lib.optional (hostPlatform.isAarch64 || hostPlatform.libc == "musl") pkgs.updateAutotoolsGnuConfigScriptsHook + ++ stdenv.lib.optional + (hostPlatform.isAarch64 || hostPlatform.isMips || hostPlatform.libc == "musl") + pkgs.updateAutotoolsGnuConfigScriptsHook ; crossConfig = hostPlatform.config; diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix index 098caca0d89..203cf545940 100644 --- a/pkgs/stdenv/default.nix +++ b/pkgs/stdenv/default.nix @@ -45,7 +45,7 @@ in "armv6l-linux" = stagesLinux; "armv7l-linux" = stagesLinux; "aarch64-linux" = stagesLinux; - "mips64el-linux" = stagesLinux; + "mipsel-linux" = stagesLinux; "powerpc-linux" = /* stagesLinux */ stagesNative; "x86_64-darwin" = stagesDarwin; "x86_64-solaris" = stagesNix; diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 249f788c17a..1f56cfbcdfa 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -15,7 +15,7 @@ "armv6l-linux" = import ./bootstrap-files/armv6l.nix; "armv7l-linux" = import ./bootstrap-files/armv7l.nix; "aarch64-linux" = import ./bootstrap-files/aarch64.nix; - "mips64el-linux" = import ./bootstrap-files/loongson2f.nix; + "mipsel-linux" = import ./bootstrap-files/loongson2f.nix; }; "musl" = { "aarch64-linux" = import ./bootstrap-files/aarch64-musl.nix; @@ -40,7 +40,7 @@ let export NIX_ENFORCE_PURITY="''${NIX_ENFORCE_PURITY-1}" export NIX_ENFORCE_NO_NATIVE="''${NIX_ENFORCE_NO_NATIVE-1}" ${if system == "x86_64-linux" then "NIX_LIB64_IN_SELF_RPATH=1" else ""} - ${if system == "mips64el-linux" then "NIX_LIB32_IN_SELF_RPATH=1" else ""} + ${if system == "mipsel-linux" then "NIX_LIB32_IN_SELF_RPATH=1" else ""} ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ffc8abcdf23..081d824e446 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5442,7 +5442,7 @@ with pkgs; xbursttools = assert stdenv ? glibc; callPackage ../tools/misc/xburst-tools rec { # It needs a cross compiler for mipsel to build the firmware it will # load into the Ben Nanonote - crossPrefix = "mips64el-unknown-linux-gnu"; + crossPrefix = "mipsel-unknown-linux-gnu"; gccCross = let pkgsCross = nixpkgsFun { |