2
0
Fork 0
Browse Source

Move genodeBase libraries to $out/lib

llvm-10
Emery Hemingway 2 years ago
parent
commit
5063468f3d
  1. 5
      overlay/genode/default.nix
  2. 18
      overlay/llvm-10/default.nix
  3. 1
      packages/default.nix

5
overlay/genode/default.nix

@ -175,8 +175,9 @@ let
# The actual ld.lib.so is kernel specific
# so ship the stubbed library for linking
''
cp $BUILD_DIR/var/libcache/ld/ld.abi.so $out/ld.lib.so
mkdir -p $out/include
mkdir -p $out/include $out/lib
mv $out/*.lib.so $out/lib/
cp $BUILD_DIR/var/libcache/ld/ld.abi.so $out/lib/ld.lib.so
cp -r --no-preserve=mode \
$GENODE_DIR/repos/base/include/* \
$GENODE_DIR/repos/os/include/* \

18
overlay/llvm-10/default.nix

@ -111,9 +111,9 @@ let
echo "-fno-exceptions" >> $out/nix-support/cc-cflags
'' + mkExtraBuildCommands cc
+ stdenv.lib.optionalString stdenv.targetPlatform.isGenode ''
echo "-I${genodeBase}/include" >> $out/nix-support/cc-cflags
echo "--sysroot=${genodeBase}" >> $out/nix-support/cc-cflags
echo "-L ${genodeBase}" >> $out/nix-support/cc-cflags
echo "-isystem=${genodeBase}/include" >> $out/nix-support/cc-cflags
echo "-L ${genodeBase}/lib" >> $out/nix-support/cc-cflags
'';
};
@ -134,7 +134,8 @@ let
'' + mkExtraBuildCommands cc
+ stdenv.lib.optionalString stdenv.targetPlatform.isGenode ''
echo "--sysroot=${genodeBase}" >> $out/nix-support/cc-cflags
echo "-L ${genodeBase}" >> $out/nix-support/cc-cflags
echo "-isystem=${genodeBase}/include" >> $out/nix-support/cc-cflags
echo "-L ${genodeBase}/lib" >> $out/nix-support/cc-cflags
'';
};
@ -154,6 +155,8 @@ let
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
'' + mkExtraBuildCommands cc + stdenv.lib.optionalString stdenv.targetPlatform.isGenode ''
echo "--sysroot=${genodeBase}" >> $out/nix-support/cc-cflags
echo "-isystem=${genodeBase}/include" >> $out/nix-support/cc-cflags
echo "-L ${genodeBase}/lib" >> $out/nix-support/cc-cflags
'';
};
@ -168,6 +171,10 @@ let
extraBuildCommands = ''
echo "-nostartfiles" >> $out/nix-support/cc-cflags
echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
'' + stdenv.lib.optionalString stdenv.targetPlatform.isGenode ''
echo "--sysroot=${genodeBase}" >> $out/nix-support/cc-cflags
echo "-isystem=${genodeBase}/include" >> $out/nix-support/cc-cflags
echo "-L ${genodeBase}/lib" >> $out/nix-support/cc-cflags
'';
};
@ -205,7 +212,10 @@ let
openmp = callPackage ./openmp.nix {};
libunwind = callPackage ./libunwind.nix ({} //
libunwind = if stdenv.targetPlatform.isGenode then
null
else
callPackage ./libunwind.nix ({} //
(stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
}));

1
packages/default.nix

@ -26,6 +26,7 @@ let
in rec {
inherit stdenv genodeSources;
inherit (nixpkgs) genodeBase;
base-hw-pc = buildUpstream {
name = "base-hw-pc";

Loading…
Cancel
Save