Archived
1
0
forked from rarias/bscpkgs

Add Intel OneAPI 2022

This commit is contained in:
2022-11-09 23:39:57 +01:00
parent 833d58a875
commit fd84af45f0
11 changed files with 876 additions and 6 deletions

View File

@@ -25,8 +25,16 @@ in wrapCCWith rec {
>> $out/nix-support/setup-hook
# Create the wrappers for icc and icpc
wrap icc $wrapper $ccPath/icc
wrap icpc $wrapper $ccPath/icpc
wrap ifort $wrapper $ccPath/ifort
if [ -e $ccPath/icc ]; then
wrap icc $wrapper $ccPath/icc
fi
if [ -e $ccPath/icpc ]; then
wrap icpc $wrapper $ccPath/icpc
fi
if [ -e $ccPath/ifort ]; then
wrap ifort $wrapper $ccPath/ifort
fi
'';
}

View File

@@ -114,7 +114,7 @@ in
'';
# FIXME: Some dependencies are missing
autoPatchelfIgnoreMissingDeps=true;
autoPatchelfIgnoreMissingDeps = true;
#autoPatchelfIgnoreMissingDeps = [ "*" ];
# Compiler

View File

@@ -0,0 +1,29 @@
{
stdenv
, gcc
, iccUnwrapped
, wrapCCWith
}:
let
targetConfig = stdenv.targetPlatform.config;
inherit gcc;
in wrapCCWith rec {
cc = iccUnwrapped;
extraBuildCommands = ''
echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
echo "-isystem ${iccUnwrapped}/include" >> $out/nix-support/cc-cflags
echo "-isystem ${iccUnwrapped}/include/icc" >> $out/nix-support/cc-cflags
echo "-isystem ${gcc.cc}/include/c++/${gcc.version}" >> $out/nix-support/cc-cflags
echo "-isystem ${gcc.cc}/include/c++/${gcc.version}/${targetConfig}" >> $out/nix-support/cc-cflags
echo "-L${iccUnwrapped}/lib" >> $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
# Create the wrappers for icx*
wrap lld $wrapper $ccPath/lld
wrap icx $wrapper $ccPath/icx
wrap icpx $wrapper $ccPath/icpx
'';
}