Compile extrae with clang

This commit is contained in:
Rodrigo 2020-06-10 14:28:10 +02:00
parent 20e3f4d4f0
commit b600bb77d4

View File

@ -1,5 +1,5 @@
{ stdenv { stdenv
, fetchurl , fetchgit
, boost , boost
, libdwarf , libdwarf
, libelf , libelf
@ -8,33 +8,45 @@
, papi , papi
, binutils-unwrapped , binutils-unwrapped
, libiberty , libiberty
, gcc
, gfortran , gfortran
, xml2 , xml2
, mpi ? null , mpi ? null
, cuda ? null , cuda ? null
#, withOpenmp ? false , llvmPackages
, autoreconfHook
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "extrae"; name = "extrae";
version = "3.7.1"; version = "3.7.1";
src = fetchurl { # src = fetchurl {
url = "https://ftp.tools.bsc.es/extrae/${name}-${version}-src.tar.bz2"; # url = "https://ftp.tools.bsc.es/extrae/${name}-${version}-src.tar.bz2";
sha256 = "0y036qc7y30pfj1mnb9nzv2vmxy6xxiy4pgfci6l3jc0lccdsgf8"; # sha256 = "0y036qc7y30pfj1mnb9nzv2vmxy6xxiy4pgfci6l3jc0lccdsgf8";
# };
# Use patched Extrae version
src = fetchgit {
url = "https://github.com/rodarima/extrae";
rev = "15883516d6bd802e5b76ff28c4b4a3a5cb113880";
sha256 = "1hmf6400kw5k3j6xdbbd0yw4xhrjhk1kibp6m7r2i000qjgha8v6";
}; };
enableParallelBuilding = true; enableParallelBuilding = true;
nativeBuildInputs = [ gcc gfortran libunwind ];
buildInputs = [ binutils-unwrapped boost boost.dev libiberty mpi buildInputs = [
xml2 libxml2.dev ]; autoreconfHook
gfortran
patchPhase = '' libunwind
sed -ie 's|/usr/bin/find|env find|g' substitute-all binutils-unwrapped
sed -ie 's|/bin/mv|env mv|g' substitute boost
''; boost.dev
libiberty
mpi
xml2
libxml2.dev
]
++ stdenv.lib.optional stdenv.cc.isClang llvmPackages.openmp;
preConfigure = '' preConfigure = ''
configureFlagsArray=( configureFlagsArray=(
@ -58,15 +70,7 @@ stdenv.mkDerivation rec {
else ''--without-mpi''} else ''--without-mpi''}
--without-dyninst) --without-dyninst)
''; '';
# --with-mpi=${mpi}
# --with-mpi-headers=${mpi}/include
# --with-mpi-libs=${mpi}/lib
# ++ (
# if (cuda != null)
# then [ "--with-cuda=${cuda}" ]
# else [ "--without-cuda" ]
# )
# ++ ( # ++ (
# if (openmp) # if (openmp)
# then [ "--enable-openmp" ] # then [ "--enable-openmp" ]