Compare commits

..

1 Commits

Author SHA1 Message Date
bb5f98647a aocc: init at 5.0.0 2025-10-07 16:32:54 +02:00
5 changed files with 91 additions and 36 deletions

View File

@@ -8,6 +8,9 @@ let
bscPkgs = {
amd-uprof = prev.callPackage ./pkgs/amd-uprof/default.nix { };
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 { };
bigotes = callPackage ./pkgs/bigotes/default.nix { };
clangOmpss2 = callPackage ./pkgs/llvm-ompss2/default.nix { };

16
pkgs/aocc/default.nix Normal file
View File

@@ -0,0 +1,16 @@
{ wrapCCWith
, aoccUnwrapped
}:
let
cc = aoccUnwrapped;
in wrapCCWith {
inherit cc;
extraBuildCommands = ''
echo "-isystem ${cc}/include" >> $out/nix-support/cc-cflags
wrap aocc $wrapper $ccPath/clang
wrap aocc++ $wrapper $ccPath/clang++
'';
}

51
pkgs/aocc/unwrapped.nix Normal file
View File

@@ -0,0 +1,51 @@
{ 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 {
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 = {
inherit rocmRuntime;
isClang = true; # Needed for wrapCCWith
};
meta.mainProgram = "clang";
}

View File

@@ -1,4 +1,5 @@
{ stdenv
{
stdenv
, fetchFromGitHub
, autoreconfHook
, boost
@@ -11,17 +12,14 @@
, openssl
, glibcLocales
, wrapGAppsHook
, enableDebug ? false
}:
let
wx = wxGTK32;
version = "4.12.0";
in
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "wxparaver";
inherit version;
version = "4.12.0";
src = fetchFromGitHub {
owner = "bsc-performance-tools";
@@ -38,26 +36,21 @@ stdenv.mkDerivation {
./fix-boost-87.patch
];
hardeningDisable = [ "all" ];
# Fix the PARAVER_HOME variable
postPatch = ''
sed -i 's@^PARAVER_HOME=.*$@PARAVER_HOME='$out'@g' docs/wxparaver
sed -i '1aexport LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"' docs/wxparaver
'';
dontStrip = true;
enableParallelBuilding = true;
hardeningDisable = [ "all" ];
dontStrip = true;
env =
let
flags = if enableDebug then "-ggdb -Og" else "-O3";
in
{
CFLAGS = flags;
CXXFLAGS = flags;
};
preConfigure = ''
export CFLAGS="-O3"
export CXXFLAGS="-O3"
'';
configureFlags = [
"--with-boost=${boost}"
@@ -75,11 +68,11 @@ stdenv.mkDerivation {
buildInputs = [
boost
libxml2
libxml2.dev
xml2
wx
paraverKernel
openssl
openssl.dev
];
postInstall = ''

View File

@@ -1,4 +1,5 @@
{ stdenv
{
stdenv
, fetchFromGitHub
, autoreconfHook
, boost
@@ -8,16 +9,11 @@
, automake
, pkg-config
, zlib
, enableDebug ? false
}:
let
version = "4.12.0";
in
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "paraver-kernel";
inherit version;
version = "4.12.0";
src = fetchFromGitHub {
owner = "bsc-performance-tools";
@@ -38,14 +34,10 @@ stdenv.mkDerivation {
dontStrip = true;
env =
let
flags = "-DPARALLEL_ENABLED " + (if enableDebug then "-ggdb -Og" else "-O3");
in
{
CFLAGS = flags;
CXXFLAGS = flags;
};
preConfigure = ''
export CFLAGS="-O3 -DPARALLEL_ENABLED"
export CXXFLAGS="-O3 -DPARALLEL_ENABLED"
'';
configureFlags = [
"--with-boost=${boost}"