# build a docker image with native deps img="$PROJECT_NAME/cross-build:$TARGET" target=${TARGET^^} docker build -t "$img" -< Cross.toml [target.$TARGET] image = "$img" EOF # override for static linking libstdcxx_path="$(docker run --rm $img bash -c "dirname \$($TARGET_CXX --print-file-name libstdc++.a)")" cat <> .cargo/config [target.$TARGET.botan-2] rustc-link-search = ["native=$PREFIX/lib", "native=$libstdcxx_path"] rustc-link-lib = ["static=botan-2", "static=stdc++", "static=ssp"] EOF