Merge pull request #177928 from AndersonTorres/new-uclibc-ng

uclibc-ng: 1.0.38 -> 1.0.41

authored by Anderson Torres and committed by GitHub e5fe188a c1136b34

+55 -28
+45 -22
pkgs/os-specific/linux/uclibc/default.nix pkgs/os-specific/linux/uclibc-ng/default.nix
··· 1 - { lib, stdenv, buildPackages 2 - , fetchurl, linuxHeaders, libiconvReal 1 + { lib 2 + , stdenv 3 + , buildPackages 4 + , fetchurl 5 + , linuxHeaders 6 + , libiconvReal 3 7 , extraConfig ? "" 4 8 }: 5 9 6 10 let 11 + isCross = (stdenv.buildPlatform != stdenv.hostPlatform); 7 12 configParser = '' 8 13 function parseconfig { 9 14 set -x ··· 36 41 UCLIBC_HAS_RPC y 37 42 DO_C99_MATH y 38 43 UCLIBC_HAS_PROGRAM_INVOCATION_NAME y 44 + UCLIBC_HAS_RESOLVER_SUPPORT y 39 45 UCLIBC_SUSV4_LEGACY y 40 46 UCLIBC_HAS_THREADS_NATIVE y 41 47 KERNEL_HEADERS "${linuxHeaders}/include" 42 48 '' + lib.optionalString (stdenv.hostPlatform.gcc.float or "" == "soft") '' 43 49 UCLIBC_HAS_FPU n 44 - '' + lib.optionalString (stdenv.isAarch32 && stdenv.buildPlatform != stdenv.hostPlatform) '' 50 + '' + lib.optionalString (stdenv.isAarch32 && isCross) '' 45 51 CONFIG_ARM_EABI y 46 52 ARCH_WANTS_BIG_ENDIAN n 47 53 ARCH_BIG_ENDIAN n ··· 49 55 ARCH_LITTLE_ENDIAN y 50 56 UCLIBC_HAS_FPU n 51 57 ''; 52 - 53 - version = "1.0.38"; 54 58 in 55 - 56 - stdenv.mkDerivation { 59 + stdenv.mkDerivation rec { 57 60 pname = "uclibc-ng"; 58 - inherit version; 61 + version = "1.0.41"; 59 62 60 63 src = fetchurl { 61 - url = "https://downloads.uclibc-ng.org/releases/${version}/uClibc-ng-${version}.tar.bz2"; 62 - # from "${url}.sha256"; 63 - sha256 = "sha256-7wexvOOfDpIsM3XcdhHxESz7GsOW+ZkiA0dfiN5rHrU="; 64 + url = "https://downloads.uclibc-ng.org/releases/${version}/uClibc-ng-${version}.tar.xz"; 65 + sha256 = "sha256-syqSoCGNlZItaXZGTm71Hi66z7zbYFggRY2du4ph4CU="; 64 66 }; 65 67 66 68 # 'ftw' needed to build acl, a coreutils dependency ··· 78 80 hardeningDisable = [ "stackprotector" ]; 79 81 80 82 # Cross stripping hurts. 81 - dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; 83 + dontStrip = isCross; 82 84 83 85 depsBuildBuild = [ buildPackages.stdenv.cc ]; 84 86 ··· 86 88 "ARCH=${stdenv.hostPlatform.linuxArch}" 87 89 "TARGET_ARCH=${stdenv.hostPlatform.linuxArch}" 88 90 "VERBOSE=1" 89 - ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 91 + ] ++ lib.optionals (isCross) [ 90 92 "CROSS=${stdenv.cc.targetPrefix}" 91 93 ]; 92 94 ··· 95 97 enableParallelBuilding = false; 96 98 97 99 installPhase = '' 100 + runHook preInstall 101 + 98 102 mkdir -p $out 99 103 make $makeFlags PREFIX=$out VERBOSE=1 install 100 104 (cd $out/include && ln -s $(ls -d ${linuxHeaders}/include/* | grep -v "scsi$") .) 101 105 # libpthread.so may not exist, so I do || true 102 106 sed -i s@/lib/@$out/lib/@g $out/lib/libc.so $out/lib/libpthread.so || true 107 + 108 + runHook postInstall 103 109 ''; 104 110 111 + meta = with lib; { 112 + homepage = "https://uclibc-ng.org"; 113 + description = "Embedded C library"; 114 + longDescription = '' 115 + uClibc-ng is a small C library for developing embedded Linux systems. It 116 + is much smaller than the GNU C Library, but nearly all applications 117 + supported by glibc also work perfectly with uClibc-ng. 118 + 119 + Porting applications from glibc to uClibc-ng typically involves just 120 + recompiling the source code. uClibc-ng supports shared libraries and 121 + threading. It currently runs on standard Linux and MMU-less (also known as 122 + uClinux) systems with support for Aarch64, Alpha, ARC, ARM, AVR32, 123 + Blackfin, CRIS, C-Sky, C6X, FR-V, H8/300, HPPA, i386, IA64, KVX, LM32, 124 + M68K/Coldfire, Metag, Microblaze, MIPS, MIPS64, NDS32, NIOS2, OpenRISC, 125 + PowerPC, RISCV64, Sparc, Sparc64, SuperH, Tile, X86_64 and XTENSA 126 + processors. Alpha, FR-V, HPPA, IA64, LM32, NIOS2, Tile and Sparc64 are 127 + experimental and need more testing. 128 + ''; 129 + license = licenses.lgpl2Plus; 130 + maintainers = with maintainers; [ rasendubi AndersonTorres ]; 131 + platforms = platforms.linux; 132 + badPlatforms = platforms.aarch64; 133 + }; 134 + 105 135 passthru = { 106 - # Derivations may check for the existance of this attribute, to know what to link to. 136 + # Derivations may check for the existance of this attribute, to know what to 137 + # link to. 107 138 libiconv = libiconvReal; 108 139 }; 109 140 110 - meta = with lib; { 111 - homepage = "https://uclibc-ng.org"; 112 - description = "A small implementation of the C library"; 113 - maintainers = with maintainers; [ rasendubi ]; 114 - license = licenses.lgpl2; 115 - platforms = platforms.linux; 116 - broken = stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64; 117 - }; 118 141 }
+10 -6
pkgs/top-level/all-packages.nix
··· 1 1 /* The top-level package collection of nixpkgs. 2 - * It is sorted by categories corresponding to the folder names 3 - * in the /pkgs folder. Inside the categories packages are roughly 4 - * sorted by alphabet, but strict sorting has been long lost due 5 - * to merges. Please use the full-text search of your editor. ;) 2 + * It is sorted by categories corresponding to the folder names in the /pkgs 3 + * folder. Inside the categories packages are roughly sorted by alphabet, but 4 + * strict sorting has been long lost due to merges. Please use the full-text 5 + * search of your editor. ;) 6 6 * Hint: ### starts category names. 7 7 */ 8 8 { lib, noSysDirs, config, overlays }: ··· 24072 24072 buildBarebox 24073 24073 bareboxTools; 24074 24074 24075 - uclibc = callPackage ../os-specific/linux/uclibc { }; 24075 + uclibc-ng = callPackage ../os-specific/linux/uclibc-ng { }; 24076 24076 24077 - uclibcCross = callPackage ../os-specific/linux/uclibc { 24077 + uclibc-ng-cross = callPackage ../os-specific/linux/uclibc-ng { 24078 24078 stdenv = crossLibcStdenv; 24079 24079 }; 24080 + 24081 + # Aliases 24082 + uclibc = uclibc-ng; 24083 + uclibcCross = uclibc-ng-cross; 24080 24084 24081 24085 eudev = callPackage ../os-specific/linux/eudev { util-linux = util-linuxMinimal; }; 24082 24086