From 65a06a1981b04726447bc46213f2bccef126e800 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Wed, 27 May 2020 17:53:50 +0530 Subject: [PATCH] genodeLibcCross: no dummy libraries The ABI stub libraries are not mechanically derived from real libraries and must not be used for non-depot builds. --- overlay/libc/default.nix | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/overlay/libc/default.nix b/overlay/libc/default.nix index 423ff9c..a061c9e 100644 --- a/overlay/libc/default.nix +++ b/overlay/libc/default.nix @@ -1,26 +1,18 @@ # SPDX-License-Identifier: CC0-1.0 -{ genodeSources, genodeBase, writeText }: +{ genodeSources, genodeBase, symlinkJoin }: -genodeSources.buildDepot { +symlinkJoin { name = "posix"; - propagatedBuildInputs = [ genodeBase ]; - portInputs = [ genodeSources.ports.libc ]; - preInstall = - # Take the libc ABI stubs rather than the actual libc. - # The libc needs a lot of work and we can't afford to - # rebuild the toolchain for every fix. - '' - find depot -name libc.abi.so -exec install -D {} "''${!outputLib}/libc.so" \; - ''; - postInstall = '' + paths = map genodeSources.depot [ "libc" "posix" ]; + postBuild = '' local headerDir="''${!outputDev}/include" mkdir -p "$headerDir" pushd ${genodeSources.ports.libc}/* cp -r \ include/libc/* \ include/openlibm/* \ - $GENODE_DIR/repos/libports/include/libc \ + ${genodeSources}/repos/libports/include/libc \ "$headerDir" for spec in ${toString genodeSources.specs}; do dir=include/spec/$spec/libc