apex: fix compilation with binutils (#30638)

This commit is contained in:
Mikael Simberg 2022-06-14 16:04:53 +02:00 committed by GitHub
parent 633ebd149c
commit f8a6799e67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,6 +55,7 @@ class Apex(CMakePackage):
depends_on('zlib')
depends_on('cmake@3.10.0:', type='build')
depends_on('binutils@2.33:+libiberty+headers', when='+binutils')
depends_on('gettext', when='+binutils ^binutils+nls')
depends_on('activeharmony@4.6:', when='+activeharmony')
depends_on('activeharmony@4.6:', when='+plugins')
depends_on('otf2@2.1:', when='+otf2')
@ -113,6 +114,9 @@ def cmake_args(self):
if '+binutils' in spec:
args.append('-DBFD_ROOT={0}'.format(spec['binutils'].prefix))
if '+binutils ^binutils+nls' in spec:
args.append('-DCMAKE_SHARED_LINKER_FLAGS=-lintl')
if '+otf2' in spec:
args.append('-DOTF2_ROOT={0}'.format(spec['otf2'].prefix))