anchor.diff:        cat << EOF > user-config.jam
         using gcc : cross : $crossConfig-g++ ;
         EOF
  -      ./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.hostDrv}/include -sEXPAT_LIBPATH=${expat.hostDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
  +      ./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.hostDrv}/include -sEXPAT_LIBPATH=${expat.hostDrv}/lib --layout=${layout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
       '';
     };
   }
  
positive.code:      stdenv.lib.optional enableStatic "static");
  
    # To avoid library name collisions
    finalLayout = if ((enableRelease && enableDebug) ||
      (enableSingleThreaded && enableMultiThreaded) ||
      (enableShared && enableStatic)) then
      "tagged" else "system";
  
    cflags = if (enablePIC && enableExceptions) then
               "cflags=-fPIC -fexceptions cxxflags=-fPIC linkflags=-fPIC"
  
negative.code: , enableStatic ? false
  , enablePIC ? false
  , enableExceptions ? false
  , taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic))
  }:
  
  let
  