# SPDX-License-Identifier: CC0-1.0 { genodeSources, genodeBase }: genodeSources.buildUpstream { name = "libc"; outputs = [ "out" "dev" ]; targets = [ "LIB=libm" ]; portInputs = [ genodeSources.ports.libc ]; propagatedBuildInputs = [ genodeBase ]; LIBC_PORT = genodeSources.ports.libc; postInstall = '' mkdir -p $dev/include pushd $LIBC_PORT/* cp -r \ include/libc/* \ include/openlibm/* \ $GENODE_DIR/repos/libports/include/libc \ $dev/include/ for spec in ${toString genodeSources.specs}; do dir=include/spec/$spec/libc if [ -d $dir ]; then cp -r $dir/* $dev/include/ fi done popd ''; }