summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2024-08-13 21:19:50 +0530
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>2024-08-14 10:12:02 +0100
commit91b4a1f757f591fe25a89e2076a61ed40529ac7f (patch)
tree18d647ff01f53703623fed0345a37d7cdb3f8ecb
parentad354dd8f9796662e891ae7d2e63caaaee840865 (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/1546>
-rw-r--r--config/linux.config9
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']: