forked from rarias/jungle
Compare commits
11 Commits
fc2e51e7c6
...
15a1014280
Author | SHA1 | Date | |
---|---|---|---|
15a1014280 | |||
0a27ae0926 | |||
3ed5463c25 | |||
1430ae7ceb | |||
96bb46cfbf | |||
3a60d4a77e | |||
ed573138e4 | |||
4c1791c95d | |||
f8f3811b67 | |||
684e290a38 | |||
25543ac0a1 |
@ -49,14 +49,25 @@ let
|
|||||||
in (wrapCCWith {
|
in (wrapCCWith {
|
||||||
inherit cc;
|
inherit cc;
|
||||||
extraBuildCommands = ''
|
extraBuildCommands = ''
|
||||||
echo "-isystem ${cc}/include" >> $out/nix-support/cc-cflags
|
|
||||||
echo "-isystem ${cc}/include/intel64" >> $out/nix-support/cc-cflags
|
|
||||||
|
|
||||||
echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
|
echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
|
||||||
echo "-L${gcc.cc.lib}/lib" >> $out/nix-support/cc-ldflags
|
echo "-L${gcc.cc.lib}/lib" >> $out/nix-support/cc-ldflags
|
||||||
echo "-L${cc}/lib" >> $out/nix-support/cc-ldflags
|
echo "-L${cc}/lib" >> $out/nix-support/cc-ldflags
|
||||||
|
|
||||||
echo "--gcc-toolchain=${gcc.cc}" >> $out/nix-support/libcxx-cxxflags
|
# echo "--gcc-toolchain=${gcc.cc}" >> $out/nix-support/libcxx-cxxflags
|
||||||
|
echo "--gcc-toolchain=${gcc.cc}" >> $out/nix-support/cc-cflags
|
||||||
|
|
||||||
|
# For some reason, If we don't resolve the realpath things go wrong
|
||||||
|
for stddef in ${cc}/lib/clang/*/include/stddef.h ; do
|
||||||
|
dir=$(dirname $(realpath "$stddef"))
|
||||||
|
echo "-isystem $dir" >> $out/nix-support/cc-cflags
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "-isystem ${cc}/include" >> $out/nix-support/cc-cflags
|
||||||
|
echo "-isystem ${cc}/include/intel64" >> $out/nix-support/cc-cflags
|
||||||
|
|
||||||
|
for dir in ${gcc.cc}/lib/gcc/${targetConfig}/*/include; do
|
||||||
|
echo "-isystem $dir" >> $out/nix-support/cc-cflags
|
||||||
|
done
|
||||||
|
|
||||||
for dir in ${gcc.cc}/include/c++/*; do
|
for dir in ${gcc.cc}/include/c++/*; do
|
||||||
echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags
|
echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags
|
||||||
@ -69,16 +80,8 @@ let
|
|||||||
# this ugly hack. See https://jungle.bsc.es/git/rarias/bscpkgs/issues/9
|
# this ugly hack. See https://jungle.bsc.es/git/rarias/bscpkgs/issues/9
|
||||||
echo 'path_backup="${gcc.cc}/bin:$path_backup"' >> $out/nix-support/cc-wrapper-hook
|
echo 'path_backup="${gcc.cc}/bin:$path_backup"' >> $out/nix-support/cc-wrapper-hook
|
||||||
|
|
||||||
|
|
||||||
# Disable hardening by default
|
# Disable hardening by default
|
||||||
echo "" > $out/nix-support/add-hardening.sh
|
echo "" > $out/nix-support/add-hardening.sh
|
||||||
|
|
||||||
# For some reason, If we don't resolve the realpath things go wrong
|
|
||||||
for stddef in ${cc}/lib/clang/*/include/stddef.h ; do
|
|
||||||
dir=$(dirname $(realpath "$stddef"))
|
|
||||||
echo "-isystem $dir" >> $out/nix-support/cc-cflags
|
|
||||||
done
|
|
||||||
|
|
||||||
'' + extraBuildCommands;
|
'' + extraBuildCommands;
|
||||||
} // (removeAttrs args ["cc" "extraBuildCommands" "extraInstall"])
|
} // (removeAttrs args ["cc" "extraBuildCommands" "extraInstall"])
|
||||||
).overrideAttrs (old: {
|
).overrideAttrs (old: {
|
||||||
|
@ -95,6 +95,7 @@ let
|
|||||||
wrappedCCIntel = wrapCCWith {
|
wrappedCCIntel = wrapCCWith {
|
||||||
inherit bintools extraPackages;
|
inherit bintools extraPackages;
|
||||||
cc = cc.override { gcc = gcc13; }; # Intel uses gcc13, so we have to match it
|
cc = cc.override { gcc = gcc13; }; # Intel uses gcc13, so we have to match it
|
||||||
|
gccForLibs = gcc13;
|
||||||
# extraPackages adds packages to depsTargetTargetPropagated
|
# extraPackages adds packages to depsTargetTargetPropagated
|
||||||
extraBuildCommands = intelExtraBuildCommands + envExports;
|
extraBuildCommands = intelExtraBuildCommands + envExports;
|
||||||
};
|
};
|
||||||
|
@ -44,13 +44,12 @@ intelPackages.stdenv.mkDerivation {
|
|||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
|
||||||
# NODES requires access to /sys/devices to request NUMA information. It will
|
# NODES requires access to /sys/devices to request NUMA information
|
||||||
# fail to run otherwise, so we disable the sandbox for this test.
|
requiredSystemFeatures = [ "sys-devices" ];
|
||||||
__noChroot = true;
|
|
||||||
|
|
||||||
env.NODES_HOME = nodes;
|
env.NODES_HOME = nodes;
|
||||||
|
|
||||||
NIX_DEBUG = 0;
|
NIX_DEBUG = 1;
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
cp $src hello.cpp
|
cp $src hello.cpp
|
||||||
set -x
|
set -x
|
||||||
|
Loading…
x
Reference in New Issue
Block a user