diff options
-rw-r--r-- | cerbero/bootstrap/windows.py | 10 | ||||
-rw-r--r-- | config/windows.config | 2 | ||||
-rw-r--r-- | recipes-toolchain/winpthreads.recipe | 3 | ||||
-rw-r--r-- | recipes/mingw-runtime.recipe | 17 |
4 files changed, 23 insertions, 9 deletions
diff --git a/cerbero/bootstrap/windows.py b/cerbero/bootstrap/windows.py index 6219195f..738f40df 100644 --- a/cerbero/bootstrap/windows.py +++ b/cerbero/bootstrap/windows.py @@ -30,15 +30,15 @@ from cerbero.utils import shell, git from cerbero.utils import messages as m # Toolchain -TOOLCHAIN_BASE_URL = 'https://gstreamer.freedesktop.org/data/cerbero/toolchain/windows/' +TOOLCHAIN_BASE_URL = 'https://gstreamer.freedesktop.org/data/cerbero/toolchain/mingw/14.2.0/' TOOLCHAIN_PLATFORM = { Platform.LINUX: ( - 'mingw-6.0.0-gcc-8.2.0-linux-multilib.tar.xz', - '396ceb50161720b19971e2c71c87ce08150213b091ed8ffc00782df8759921bf', + 'mingw-12.0.0-gcc-14.2.0-linux-multilib.tar.xz', + 'ef3bcdd10716578b9300591da68beb73753002252a46e41f316bb94a577e3c04', ), Platform.WINDOWS: ( - 'mingw-6.0.0-gcc-8.2.0-windows-multilib.tar.xz', - '77fc1319b13894d7340d4994150e3af615e23a63113a9947412d11be95f4d8a9', + 'mingw-12.0.0-gcc-14.2.0-windows-multilib.tar.xz', + '2e9039c6404f68bfce1eecd34172b16715565a15555c76c1652ec26265d5ae89', ), } diff --git a/config/windows.config b/config/windows.config index 1ca9cf5d..f15d5f2c 100644 --- a/config/windows.config +++ b/config/windows.config @@ -165,7 +165,7 @@ if distro == Distro.MSYS: toolchainbin = os.path.join(toolchain_prefix, 'bin') if toolchainbin not in env['PATH']: env['PATH'] = '%s%s%s' % (toolchainbin, os.pathsep, env['PATH']) - libexecdir = os.path.join(toolchain_prefix, "libexec/gcc/x86_64-w64-mingw32/8.2.0/") + libexecdir = os.path.join(toolchain_prefix, "libexec/gcc/x86_64-w64-mingw32/14.2.0/") env['PATH'] = '%s%s%s' % (libexecdir, os.pathsep, env['PATH']) # These only have meaning for autotools, so let's just leave it in the general env diff --git a/recipes-toolchain/winpthreads.recipe b/recipes-toolchain/winpthreads.recipe index 23216b42..2e8ed223 100644 --- a/recipes-toolchain/winpthreads.recipe +++ b/recipes-toolchain/winpthreads.recipe @@ -96,3 +96,6 @@ class Recipe(recipe.Recipe): dest_winpthread_dll = os.path.join(libdir, "libwinpthread-1.dll") Path(dest_winpthread_dll).unlink(missing_ok=True) shutil.move(src_winpthread_dll, libdir) + # and to <toolchain>/bin because dlltool depends on it + bindir = os.path.join(self.config.prefix, 'bin') + shutil.copy(libdir / "libwinpthread-1.dll", bindir) diff --git a/recipes/mingw-runtime.recipe b/recipes/mingw-runtime.recipe index dcfc7680..55baa3b8 100644 --- a/recipes/mingw-runtime.recipe +++ b/recipes/mingw-runtime.recipe @@ -15,18 +15,24 @@ class Recipe(recipe.Recipe): files_libs = ['libwinpthread-1', 'libstdc++-6'] files_devel = ['lib/libstdc++.a', 'lib/libstdc++.la'] files_static = [] - files_headers = ['include/GL'] + files_headers = ['include/GL', 'include/KHR'] def prepare(self): if self.config.target_platform != Platform.WINDOWS: raise InvalidRecipeError(self, "Invalid platform") if self.config.variants.uwp: self.runtime_dep = False + lib_suffix = '' + if self.config.platform != Platform.WINDOWS: + lib_suffix = f'/{self.config.build}' if self.config.target_arch == Architecture.X86: - gcclib = 'lib/gcc/x86_64-w64-mingw32/8.2.0/32/' + gcclib = f'lib{lib_suffix}/gcc/x86_64-w64-mingw32/14.2.0/32/' + # MinGW x86 requires changing GCC's exception model to DWARF2 + # See https://fedoraproject.org/wiki/Changes/Mingw32GccDwarf2 + # self._ehlib = 'libgcc_s_dw2-1' self._ehlib = 'libgcc_s_sjlj-1' else: - gcclib = 'lib/gcc/x86_64-w64-mingw32/8.2.0/' + gcclib = f'lib{lib_suffix}/gcc/x86_64-w64-mingw32/14.2.0/' self._ehlib = 'libgcc_s_seh-1' # mingw's static libraries @@ -71,6 +77,11 @@ class Recipe(recipe.Recipe): shutil.copy( os.path.join(libmingw, f), os.path.join(self.config.prefix, 'bin', f)) + # and to <toolchain>/bin because dlltool depends on it + binwinpthread = os.path.join(self.config.toolchain_prefix, 'bin', f) + if not os.path.exists(binwinpthread): + shutil.copy( + os.path.join(libmingw, f), binwinpthread) for f in ['libstdc++-6.dll']: shutil.copy( os.path.join(libdir, f), |