From 91b4a1f757f591fe25a89e2076a61ed40529ac7f Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 13 Aug 2024 21:19:50 +0530 Subject: cerbero: Disable rust variant on Linux if binutils is too old We only support binutils >=2.36 on Linux, which means Ubuntu 22.04 or Debian Bookworm, or thereabouts. Fixes https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/490 Part-of: --- config/linux.config | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config/linux.config b/config/linux.config index d066b600..f786bee5 100644 --- a/config/linux.config +++ b/config/linux.config @@ -4,10 +4,17 @@ # PLEASE, DO NOT EDIT THIS FILE import os +from cerbero.utils import shell +from cerbero.utils import messages as m from cerbero.config import Architecture, Distro +vlist = ['alsa', 'x11', 'pulse', 'cdparanoia', 'v4l2', 'gi', 'unwind'] +if '--export-dynamic-symbol' in shell.check_output(['ld', '--help']): + vlist += ['rust'] +elif prefix != build_tools_prefix: + m.warning('Disabling rust variant: binutils is too old, need >=2.36') # Set default values for some optional variants -variants.override(['alsa', 'x11', 'pulse', 'cdparanoia', 'v4l2', 'gi', 'unwind', 'rust']) +variants.override(vlist) for f in ['CPPFLAGS', 'CFLAGS', 'CCASFLAGS', 'CXXFLAGS', 'LDFLAGS', 'OBJCFLAGS']: -- cgit v1.2.3