forked from rarias/bscpkgs
Compare commits
3 Commits
a87b99d0a4
...
77ddd1c9c1
Author | SHA1 | Date | |
---|---|---|---|
77ddd1c9c1 | |||
96661ca763 | |||
75c2331d5d |
@ -10,6 +10,9 @@ let
|
|||||||
"printf '%s\n' ${toString (collect (x: x ? outPath) pkgs)} > $out";
|
"printf '%s\n' ${toString (collect (x: x ? outPath) pkgs)} > $out";
|
||||||
|
|
||||||
bscPkgs = {
|
bscPkgs = {
|
||||||
|
aoccUnwrapped = callPackage ./pkgs/aocc/unwrapped.nix { };
|
||||||
|
aocc = callPackage ./pkgs/aocc/default.nix { };
|
||||||
|
stdenvAocc = final.overrideCC final.stdenv final.aocc;
|
||||||
bench6 = callPackage ./pkgs/bench6/default.nix { };
|
bench6 = callPackage ./pkgs/bench6/default.nix { };
|
||||||
bigotes = callPackage ./pkgs/bigotes/default.nix { };
|
bigotes = callPackage ./pkgs/bigotes/default.nix { };
|
||||||
clangOmpss2 = callPackage ./pkgs/llvm-ompss2/default.nix { };
|
clangOmpss2 = callPackage ./pkgs/llvm-ompss2/default.nix { };
|
||||||
|
29
pkgs/aocc/default.nix
Normal file
29
pkgs/aocc/default.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{ lib
|
||||||
|
, aoccUnwrapped
|
||||||
|
, wrapCCWith
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cc = aoccUnwrapped;
|
||||||
|
stdenv = aoccUnwrapped.stdenv;
|
||||||
|
targetConfig = stdenv.targetPlatform.config;
|
||||||
|
|
||||||
|
gcc = stdenv.cc;
|
||||||
|
|
||||||
|
in wrapCCWith {
|
||||||
|
inherit cc;
|
||||||
|
|
||||||
|
extraBuildCommands = ''
|
||||||
|
echo "-isystem ${cc}/include" >> $out/nix-support/cc-cflags
|
||||||
|
|
||||||
|
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${cc}/lib" >> $out/nix-support/cc-ldflags
|
||||||
|
|
||||||
|
# Need the gcc in the path
|
||||||
|
echo 'export "PATH=${gcc}/bin:$PATH"' >> $out/nix-support/cc-wrapper-hook
|
||||||
|
|
||||||
|
# Disable hardening by default
|
||||||
|
echo "" > $out/nix-support/add-hardening.sh
|
||||||
|
'';
|
||||||
|
}
|
47
pkgs/aocc/unwrapped.nix
Normal file
47
pkgs/aocc/unwrapped.nix
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{ lib
|
||||||
|
, fetchurl
|
||||||
|
, stdenv
|
||||||
|
, autoPatchelfHook
|
||||||
|
, rocmPackages
|
||||||
|
, zlib
|
||||||
|
, libffi
|
||||||
|
, elfutils
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
# in newer nixpkgs the runtime is hsakmt
|
||||||
|
rocmRuntime = if rocmPackages ? hsakmt then
|
||||||
|
rocmPackages.hsakmt
|
||||||
|
else
|
||||||
|
rocmPackages.rocm-runtime;
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "aocc-compiler";
|
||||||
|
version = "5.0.0";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://download.amd.com/developer/eula/aocc/aocc-5-0/aocc-compiler-5.0.0.tar";
|
||||||
|
sha256 = "sha256-lm+sLSx1np3m6WnBCtp6ezBsET9/HgfqN2gp7IY4Dao=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ autoPatchelfHook ];
|
||||||
|
buildInputs = [
|
||||||
|
elfutils
|
||||||
|
zlib
|
||||||
|
rocmRuntime
|
||||||
|
stdenv.cc.cc.lib
|
||||||
|
];
|
||||||
|
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||||
|
dontStrip = true;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -a . $out/
|
||||||
|
|
||||||
|
ln -s ${lib.getLib libffi}/lib/libffi.so $out/lib/libffi.so.6
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
isClang = true;
|
||||||
|
};
|
||||||
|
})
|
@ -43,23 +43,23 @@ let
|
|||||||
|
|
||||||
source = if (useGit) then git else release;
|
source = if (useGit) then git else release;
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation {
|
||||||
pname = "clang-ompss2";
|
pname = "clang-ompss2";
|
||||||
inherit (source) src version;
|
inherit (source) src version;
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
isClang = true;
|
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
CC = "clang";
|
CC = "clang";
|
||||||
CXX = "clang++";
|
CXX = "clang++";
|
||||||
|
|
||||||
|
isClang = true;
|
||||||
|
isClangWithOmpss = true;
|
||||||
|
|
||||||
|
inherit gcc zlib;
|
||||||
};
|
};
|
||||||
|
|
||||||
isClangWithOmpss = true;
|
nativeBuildInputs = [
|
||||||
|
|
||||||
nativeBuildInputs = [ zlib ];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
which
|
which
|
||||||
bash
|
bash
|
||||||
python3
|
python3
|
||||||
@ -67,9 +67,13 @@ in stdenv.mkDerivation rec {
|
|||||||
cmake
|
cmake
|
||||||
llvmPackages_latest.lld
|
llvmPackages_latest.lld
|
||||||
elfutils
|
elfutils
|
||||||
libffi
|
|
||||||
pkg-config
|
pkg-config
|
||||||
zlib
|
zlib
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
libffi
|
||||||
|
zlib
|
||||||
gcc.cc.lib # Required for libstdc++.so.6
|
gcc.cc.lib # Required for libstdc++.so.6
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user