diff options
author | Mark W. Krentel <krentel@rice.edu> | 2019-05-18 23:00:48 -0500 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2019-05-18 23:00:48 -0500 |
commit | e1bb6821aacf43376b628189b4002bad69ad6ba6 (patch) | |
tree | 3de16149577a7bd1b49a8fce33a0c25096db4e68 /var | |
parent | 6ba6c84de54e6f1d1cf3e7a7869346f97f0b5e85 (diff) | |
download | spack-e1bb6821aacf43376b628189b4002bad69ad6ba6.tar.gz spack-e1bb6821aacf43376b628189b4002bad69ad6ba6.tar.bz2 spack-e1bb6821aacf43376b628189b4002bad69ad6ba6.tar.xz spack-e1bb6821aacf43376b628189b4002bad69ad6ba6.zip |
dyninst: rework the cmake args for version 10.1 and later (#11484)
* dyninst: rework the cmake args for version 10.1 and later
Add a separate when() case for the cmake args for Dyninst 10.1.0 and
later. The prereq args have changed enough that this makes things
easier going forward. (My previous commit 26b9369c was inaccurate and
temporary.)
Dyninst 10.1.0 accepts boost 1.70, but earlier dyninst are restricted
to <= 1.69 (not worth back porting every boost change).
Change all the dyninst versions to 3 digits for clarity and
consistency.
* Add version 10.1.0.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/dyninst/package.py | 63 |
1 files changed, 41 insertions, 22 deletions
diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py index 1e370557f2..84a0575bc5 100644 --- a/var/spack/repos/builtin/packages/dyninst/package.py +++ b/var/spack/repos/builtin/packages/dyninst/package.py @@ -11,10 +11,11 @@ class Dyninst(CMakePackage): """API for dynamic binary instrumentation. Modify programs while they are executing without recompiling, re-linking, or re-executing.""" - homepage = "https://paradyn.org" + homepage = "https://dyninst.org" git = "https://github.com/dyninst/dyninst.git" version('develop', branch='master') + version('10.1.0', tag='v10.1.0') version('10.0.0', tag='v10.0.0') version('9.3.2', tag='v9.3.2') version('9.3.0', tag='v9.3.0') @@ -34,7 +35,8 @@ class Dyninst(CMakePackage): boost_libs = '+atomic+chrono+date_time+filesystem+system+thread+timer' - depends_on('boost@1.61.0:1.69.99' + boost_libs) + depends_on('boost@1.61.0:' + boost_libs, when='@10.1.0:') + depends_on('boost@1.61.0:1.69.99' + boost_libs, when='@:10.0.99') depends_on('libiberty+pic') # Dyninst uses elf@1 (elfutils) starting with 9.3.0, and used @@ -44,12 +46,13 @@ class Dyninst(CMakePackage): # Dyninst uses libdw from elfutils (same elf@1) starting with # 10.x, and used libdwarf before that. - depends_on('libdwarf', when='@:9.99') + depends_on('libdwarf', when='@:9.99.99') - depends_on('tbb@2018.6:', when='@10.0:') + depends_on('tbb@2018.6:', when='@10.0.0:') - depends_on('cmake@3.4.0:', type='build', when='@10.0:') - depends_on('cmake@2.8:', type='build', when='@:9.99') + depends_on('cmake@3.4.0:', type='build', when='@10.1.0:') + depends_on('cmake@3.0.0:', type='build', when='@10.0.0:10.0.99') + depends_on('cmake@2.8:', type='build', when='@:9.99.99') patch('stat_dysect.patch', when='+stat_dysect') patch('stackanalysis_h.patch', when='@9.2.0') @@ -64,6 +67,32 @@ class Dyninst(CMakePackage): filter_file('USE_COTIRE true', 'USE_COTIRE false', 'cmake/shared.cmake') + # New style cmake args, starting with 10.1. + @when('@10.1.0:') + def cmake_args(self): + spec = self.spec + + args = [ + '-DBoost_ROOT_DIR=%s' % spec['boost'].prefix, + '-DElfUtils_ROOT_DIR=%s' % spec['elf'].prefix, + '-DLibIberty_ROOT_DIR=%s' % spec['libiberty'].prefix, + '-DTBB_ROOT_DIR=%s' % spec['tbb'].prefix, + ] + + if '+openmp' in spec: + args.append('-DUSE_OpenMP=ON') + else: + args.append('-DUSE_OpenMP=OFF') + + if '+static' in spec: + args.append('-DENABLE_STATIC_LIBS=YES') + else: + args.append('-DENABLE_STATIC_LIBS=NO') + + return args + + # Old style cmake args, up through 10.0. + @when('@:10.0.99') def cmake_args(self): spec = self.spec @@ -84,23 +113,13 @@ class Dyninst(CMakePackage): args = [ '-DPATH_BOOST=%s' % spec['boost'].prefix, '-DIBERTY_LIBRARIES=%s' % spec['libiberty'].libs, - ] - # 10.1 changed the spelling of LibElf and LibDwarf. - if spec.satisfies('@10.1.0:'): - args.extend([ - '-DLibElf_INCLUDE_DIR=%s' % elf_include, - '-DLibElf_LIBRARIES=%s' % spec['elf'].libs, - '-DLibDwarf_INCLUDE_DIR=%s' % dwarf_include, - '-DLibDwarf_LIBRARIES=%s' % dwarf_lib, - ]) - else: - args.extend([ - '-DLIBELF_INCLUDE_DIR=%s' % elf_include, - '-DLIBELF_LIBRARIES=%s' % spec['elf'].libs, - '-DLIBDWARF_INCLUDE_DIR=%s' % dwarf_include, - '-DLIBDWARF_LIBRARIES=%s' % dwarf_lib, - ]) + '-DLIBELF_INCLUDE_DIR=%s' % elf_include, + '-DLIBELF_LIBRARIES=%s' % spec['elf'].libs, + + '-DLIBDWARF_INCLUDE_DIR=%s' % dwarf_include, + '-DLIBDWARF_LIBRARIES=%s' % dwarf_lib, + ] # TBB include and lib directories, version 10.x or later. if spec.satisfies('@10.0.0:'): |