anchor.diff:  , stdenv
   , coreutils
   , gnugrep
  -, targetPlatform
  +, hostPlatform, targetPlatform
   }:
   
   /* As of this writing, known-good prefix/arch/simulator triples:
  
positive.code: 
    sdk = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhone${sdkType}.platform/Developer/SDKs/iPhone${sdkType}${sdkVer}.sdk";
  
    /* TODO: Properly integrate with gcc-cross-wrapper */
    wrapper = import ../../../build-support/cc-wrapper {
      inherit stdenv coreutils gnugrep;
      nativeTools = false;
      nativeLibc = false;
      inherit binutils;
      libc = runCommand "empty-libc" {} "mkdir -p $out/{lib,include}";
      cc = clang;
      extraBuildCommands = ''
        if ! [ -d ${sdk} ]; then
            echo "You must have ${sdkVer} of the iPhone${sdkType} sdk installed at ${sdk}" >&2
  
negative.code:       # Purposefully overwrite libc-ldflags-before, cctools ld doesn't know dynamic-linker and cc-wrapper doesn't do cross-compilation well enough to adjust
        echo "-arch ${arch} -L${sdk}/usr/lib ${lib.optionalString simulator "-L${sdk}/usr/lib/system "}-i${if simulator then "os_simulator" else "phoneos"}_version_min 7.0.0" > $out/nix-support/libc-ldflags-before
      '';
    }) // {
      inherit sdkType sdkVer sdk;
    }
  