anchor.diff:    hardeningDisable = [ "stackprotector" ];
   
     # Cross stripping hurts.
  -  dontStrip = stdenv.hostPlatform != stdenv.buildPlatform;
  +  dontStrip = isCross;
   
     depsBuildBuild = [ buildPackages.stdenv.cc ];
   
  
positive.code: { lib, stdenv, buildPackages
  , fetchurl, linuxHeaders, libiconvReal
  , extraConfig ? ""
  }:
  
  let
    configParser = ''
      function parseconfig {
          set -x
  
negative.code:   enableParallelBuilding = false;
  
    installPhase = ''
      runHook preInstall
  
      mkdir -p $out
      make $makeFlags PREFIX=$out VERBOSE=1 install
      (cd $out/include && ln -s $(ls -d ${linuxHeaders}/include/* | grep -v "scsi$") .)
      # libpthread.so may not exist, so I do || true
      sed -i s@/lib/@$out/lib/@g $out/lib/libc.so $out/lib/libpthread.so || true
  
      runHook postInstall
    '';
  
    meta = with lib; {
      homepage = "https://uclibc-ng.org";
      description = "Embedded C library";
      longDescription = ''
        uClibc-ng is a small C library for developing embedded Linux systems. It
        is much smaller than the GNU C Library, but nearly all applications
        supported by glibc also work perfectly with uClibc-ng.
  
        Porting applications from glibc to uClibc-ng typically involves just
        recompiling the source code. uClibc-ng supports shared libraries and
        threading. It currently runs on standard Linux and MMU-less (also known as
        uClinux) systems with support for Aarch64, Alpha, ARC, ARM, AVR32,
        Blackfin, CRIS, C-Sky, C6X, FR-V, H8/300, HPPA, i386, IA64, KVX, LM32,
        M68K/Coldfire, Metag, Microblaze, MIPS, MIPS64, NDS32, NIOS2, OpenRISC,
        PowerPC, RISCV64, Sparc, Sparc64, SuperH, Tile, X86_64 and XTENSA
        processors. Alpha, FR-V, HPPA, IA64, LM32, NIOS2, Tile and Sparc64 are
        experimental and need more testing.
      '';
      license = licenses.lgpl2Plus;
      maintainers = with maintainers; [ rasendubi AndersonTorres ];
      platforms = platforms.linux;
      badPlatforms = platforms.aarch64;
    };
  
    passthru = {
      # Derivations may check for the existance of this attribute, to know what to
      # link to.
      libiconv = libiconvReal;
    };
  
  }
  