gcc: fixed compilation on OpenSUSE (#18190)
Set location for dependencies specifying explicitly both the include and lib path. This permits to handle cases where the libraries are installed in lib64 instead of lib. fixes #17556 fixes #10842 closes #18150
This commit is contained in:
parent
1addcff724
commit
573ce3fe81
@ -451,9 +451,7 @@ def configure_args(self):
|
|||||||
'--enable-languages={0}'.format(
|
'--enable-languages={0}'.format(
|
||||||
','.join(spec.variants['languages'].value)),
|
','.join(spec.variants['languages'].value)),
|
||||||
# Drop gettext dependency
|
# Drop gettext dependency
|
||||||
'--disable-nls',
|
'--disable-nls'
|
||||||
'--with-mpfr={0}'.format(spec['mpfr'].prefix),
|
|
||||||
'--with-gmp={0}'.format(spec['gmp'].prefix),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# Use installed libz
|
# Use installed libz
|
||||||
@ -483,13 +481,23 @@ def configure_args(self):
|
|||||||
'--enable-bootstrap',
|
'--enable-bootstrap',
|
||||||
])
|
])
|
||||||
|
|
||||||
# MPC
|
# Configure include and lib directories explicitly for these
|
||||||
if 'mpc' in spec:
|
# dependencies since the short GCC option assumes that libraries
|
||||||
options.append('--with-mpc={0}'.format(spec['mpc'].prefix))
|
# are installed in "/lib" which might not be true on all OS
|
||||||
|
# (see #10842)
|
||||||
|
#
|
||||||
|
# More info at: https://gcc.gnu.org/install/configure.html
|
||||||
|
for dep_str in ('mpfr', 'gmp', 'mpc', 'isl'):
|
||||||
|
if dep_str not in spec:
|
||||||
|
continue
|
||||||
|
|
||||||
# ISL
|
dep_spec = spec[dep_str]
|
||||||
if 'isl' in spec:
|
include_dir = dep_spec.headers.directories[0]
|
||||||
options.append('--with-isl={0}'.format(spec['isl'].prefix))
|
lib_dir = dep_spec.libs.directories[0]
|
||||||
|
options.extend([
|
||||||
|
'--with-{0}-include={1}'.format(dep_str, include_dir),
|
||||||
|
'--with-{0}-lib={1}'.format(dep_str, lib_dir)
|
||||||
|
])
|
||||||
|
|
||||||
# nvptx-none offloading for host compiler
|
# nvptx-none offloading for host compiler
|
||||||
if spec.satisfies('+nvptx'):
|
if spec.satisfies('+nvptx'):
|
||||||
|
Loading…
Reference in New Issue
Block a user