summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/rocm-gdb/package.py
blob: 0af3beee0b38273bced1faf52fd2dd5994cb8b9d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)


from spack import *


class RocmGdb(AutotoolsPackage):
    """This is ROCmgdb, the ROCm source-level debugger for Linux,
        based on GDB, the GNU source-level debugger."""

    homepage = "https://github.com/ROCm-Developer-Tools/ROCgdb/"
    url      = "https://github.com/ROCm-Developer-Tools/ROCgdb/archive/rocm-3.7.0.tar.gz"

    maintainers = ['srekolam', 'arjun-raj-kuppala']

    version('3.8.0', sha256='a7c11dc30c952587c616bf7769bad603c3bf80522afc8b73ccda5b78d27bed41')
    version('3.7.0', sha256='7a29ef584fd7b6c66bb03aaf8ec2f5a8c758370672a28a4d0d95066e5f6fbdc1')
    version('3.5.0', sha256='cf36d956e84c7a5711b71f281a44b0a9708e13e941d8fca0247d01567e7ee7d1')

    depends_on('cmake@3:', type='build')
    depends_on('texinfo', type='build')
    depends_on('bison', type='build')
    depends_on('flex', type='build')
    depends_on('libunwind', type='build')
    depends_on('expat', type='build')
    depends_on('python', type='build')
    depends_on('zlib', type='link')
    for ver in ['3.5.0', '3.7.0', '3.8.0']:
        depends_on('rocm-dbgapi@' + ver, type='link', when='@' + ver)
        depends_on('comgr@' + ver, type='link', when='@' + ver)

    build_directory = 'spack-build'

    def configure_args(self):
        # Generic options to compile GCC
        options = [
            # Distributor options
            '--program-prefix=roc',
            '--enable-64-bit-bfd',
            '--with-bugurl=https://github.com/ROCm-Developer-Tools/ROCgdb/issues',
            '--with-pkgversion=-ROCm',
            '--enable-targets=x86_64-linux-gnu,amdgcn-amd-amdhsa',
            '--disable-ld',
            '--disable-gas',
            '--disable-gdbserver',
            '--disable-sim',
            '--enable-tui',
            '--disable-gdbtk',
            '--disable-shared',
            '--with-expat',
            '--with-system-zlib'
            '--without-guile',
            '--with-babeltrace',
            '--with-lzma',
            '--with-python',
            '--with-rocm-dbgapi={0}'.format(self.spec['rocm-dbgapi'].prefix)
        ]
        return options