From 7e670380373eb5be0c977f467c102eb1210951b5 Mon Sep 17 00:00:00 2001
From: Alfred Wingate <parona@protonmail.com>
Date: Wed, 25 Dec 2024 19:49:40 +0200
Subject: [PATCH 1/2] Set toolchain explicitly for ffmpeg

Signed-off-by: Alfred Wingate <parona@protonmail.com>
--- a/contrib/ffmpeg/module.defs
+++ b/contrib/ffmpeg/module.defs
@@ -76,7 +76,13 @@ FFMPEG.CONFIGURE.extra = \
     --enable-filter=hwdownload \
     --enable-filter=hwmap \
     --enable-filter=hwupload \
-    --cc="$(FFMPEG.GCC.gcc)"
+    --cc="$(FFMPEG.GCC.gcc)" \
+    --cxx="$(FFMPEG.GCC.gxx)" \
+    --ar="$(AR.exe)" \
+    --nm="$(NM.exe)" \
+    --strip="$(STRIP.exe)" \
+    --ranlib="$(RANLIB.exe)" \
+    --pkg-config="$(PKGCONFIG.exe)"
 
 ifeq (size-aggressive,$(GCC.O))
 FFMPEG.CONFIGURE.extra += \
--- a/make/configure.py
+++ b/make/configure.py
@@ -1665,6 +1665,7 @@ try:
         strip      = ToolProbe( 'STRIP.exe',      'strip',      'strip', abort=True )
         tar        = ToolProbe( 'TAR.exe',        'tar',        'gtar', 'tar', abort=True )
         python     = ToolProbe( 'PYTHON.exe',     'python',     os.path.basename(sys.executable), abort=True )
+        nm         = ToolProbe( 'NM.exe',         'nm',         'nm', abort=True )
 
         gcc_tools  = ['GCC.gcc',
                       'cc',
-- 
2.47.1

