2020-03-27 10:08:22 +01:00
|
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
|
|
|
{ stdenv, 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
|
2020-03-24 13:47:30 +01:00
|
|
|
'';
|
2020-03-27 10:08:22 +01:00
|
|
|
}
|