diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2024-08-13 21:19:50 +0530 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2024-08-14 05:54:46 +0000 |
commit | c99e186fdd1ca923983e71be3f7fa57283ab96bd (patch) | |
tree | cc147213e48b3c768d155ff727077d462fce68c6 | |
parent | e981927eb81a27f492e1654eac6f1abb3ade87c7 (diff) |
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: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1545>
-rw-r--r-- | config/linux.config | 9 |
1 files changed, 8 insertions, 1 deletions
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']: |