From 7f2c79166d642c4cded57009f254c82ab776a703 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 8 Apr 2025 12:25:36 +0200 Subject: [PATCH 01/15] win32: skip some CPU detection on Windows with MinGW like amd64 MSVC The only known working implementation is for i686 MSVC. - detection was already disabled and marked at not working with amd64 MSVC, - detection was already disabled on amd64 MinGW because amd64 Windows was tested, not just amd64 MSVC, - there is no MinGW implementation in the code, - this disables detection on MinGW explicitely whatever the architecture. --- src/trusted/platform_qualify/arch/x86/vcpuid.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/trusted/platform_qualify/arch/x86/vcpuid.c b/src/trusted/platform_qualify/arch/x86/vcpuid.c index dbefa9b11c..17db404b85 100644 --- a/src/trusted/platform_qualify/arch/x86/vcpuid.c +++ b/src/trusted/platform_qualify/arch/x86/vcpuid.c @@ -38,7 +38,15 @@ const int kMagicConst_ROUNDSS = 0xc0000000; const int kMagicConst_POPCNT = 13; const int kMagicConst_CRC32 = 0xb906c3ea; -#if !(NACL_WINDOWS && (NACL_BUILD_SUBARCH == 64)) +#if (NACL_WINDOWS && defined(_MSC_VER) && (NACL_BUILD_SUBARCH == 64)) +# define NACL_WINDOWS_MSC_64 +#endif + +#if (NACL_WINDOWS && !defined(_MSC_VER)) +# define NACL_WINDOWS_MINGW +#endif + +#if !defined(NACL_WINDOWS_MSC_64) && !defined(NACL_WINDOWS_MINGW) static int asm_HasMMX(void) { volatile int before, after; before = kMagicConst; @@ -386,7 +394,7 @@ static int asm_HasCX8(void) { #endif /* 0 */ #endif /* 64-bit Windows */ -#if NACL_WINDOWS && (NACL_BUILD_SUBARCH == 64) +#if defined(NACL_WINDOWS_MSC_64) || defined(NACL_WINDOWS_MINGW) static int CheckCPUFeatureDetection(NaClCPUFeaturesX86 *cpuf) { /* Unfortunately the asm_ tests will not work on 64-bit Windows */ return 0; From 62cc0c1818ba9b8d8949ee1c29a65f9c6cbc590c Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 6 Oct 2026 01:42:02 +0200 Subject: [PATCH 02/15] win32: silence the warning for the unused CheckCPUFeatureDetection() parameter --- src/trusted/platform_qualify/arch/x86/vcpuid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/trusted/platform_qualify/arch/x86/vcpuid.c b/src/trusted/platform_qualify/arch/x86/vcpuid.c index 17db404b85..27e5abb328 100644 --- a/src/trusted/platform_qualify/arch/x86/vcpuid.c +++ b/src/trusted/platform_qualify/arch/x86/vcpuid.c @@ -396,6 +396,7 @@ static int asm_HasCX8(void) { #if defined(NACL_WINDOWS_MSC_64) || defined(NACL_WINDOWS_MINGW) static int CheckCPUFeatureDetection(NaClCPUFeaturesX86 *cpuf) { + (void)cpuf; /* Unfortunately the asm_ tests will not work on 64-bit Windows */ return 0; } From 1f2612f1b1c6b857e20419fcc16d5c428b98d5e2 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Wed, 7 Oct 2026 04:01:18 +0200 Subject: [PATCH 03/15] scons: do not use /safeseh on windows-i686-mingw --- SConstruct | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 69aaa7939e..7bba0d2553 100755 --- a/SConstruct +++ b/SConstruct @@ -2328,7 +2328,8 @@ def MakeWindowsEnv(platform=None): # This linker option allows us to ensure our builds are compatible with # Chromium, which uses it. if windows_env.Bit('build_x86_32'): - windows_env.Append(LINKFLAGS = "/safeseh") + if not windows_env.Bit('mingw'): + windows_env.Append(LINKFLAGS = "/safeseh") mingw_dir = os.path.abspath(ARGUMENTS.get('mingw_dir', 'You.must.provide.the.mingw_dir.argument')) windows_env['MINGW_BIN'] = os.path.join(mingw_dir, 'bin') From 8e37f2af7cc404877c35e554d49a98676cee6705 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Wed, 7 Oct 2026 00:32:50 +0200 Subject: [PATCH 04/15] ci: enable windows-i686-mingw --- .github/workflows/build_test.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 22f94477a1..a278e46bd3 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -84,6 +84,15 @@ jobs: python_packages: pywin32 mingw_url: https://github.com/niXman/mingw-builds-binaries/releases/download/16.1.0-rt_v14-rev1/x86_64-16.1.0-release-posix-seh-msvcrt-rt_v14-rev1.7z + - name: Windows i686 MinGW + vm_image: windows-2022 + sdk_platform: windows-amd64 + scons_build_args: platform=x86-32 --no-clang mingw=1 werror=1 mingw_dir=mingw/mingw + scons_tests: small_tests medium_tests large_tests disable_tests=run_toolchain_python_tests + vpython: pyenv/Scripts/python + python_packages: pywin32 + mingw_url: https://github.com/niXman/mingw-builds-binaries/releases/download/16.1.0-rt_v14-rev1/i686-16.1.0-release-posix-dwarf-msvcrt-rt_v14-rev1.7z + # Azure exposed matrix values as environment variables; do the same here # so the scripts below can stay as plain shell. env: From 8e1fc11f533f34384466bdb33c8d99a92ee577ee Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Wed, 7 Oct 2026 00:35:08 +0200 Subject: [PATCH 05/15] readme: add the windows-i686-mingw CI badge --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e24f101e81..11b847c463 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,8 @@ Target & compiler|Build status|Target & compiler|Build status Linux amd64 GCC|[![Build Status](https://img.shields.io/github/check-runs/DaemonEngine/native_client/master?nameFilter=Linux%20amd64%20GCC)](https://github.com/DaemonEngine/native_client/actions/workflows/build_test.yml?query=branch%3Amaster)|Windows amd64 MSVC|[![Build Status](https://img.shields.io/github/check-runs/DaemonEngine/native_client/master?nameFilter=Windows%20amd64%20MSVC)](https://github.com/DaemonEngine/native_client/actions/workflows/build_test.yml?query=branch%3Amaster) Linux amd64 Clang|[![Build Status](https://img.shields.io/github/check-runs/DaemonEngine/native_client/master?nameFilter=Linux%20amd64%20Clang)](https://github.com/DaemonEngine/native_client/actions/workflows/build_test.yml?query=branch%3Amaster)|Windows i686 MSVC|[![Build Status](https://img.shields.io/github/check-runs/DaemonEngine/native_client/master?nameFilter=Windows%20i686%20MSVC)](https://github.com/DaemonEngine/native_client/actions/workflows/build_test.yml?query=branch%3Amaster) Linux i686 GCC|[![Build Status](https://img.shields.io/github/check-runs/DaemonEngine/native_client/master?nameFilter=Linux%20i686%20GCC)](https://github.com/DaemonEngine/native_client/actions/workflows/build_test.yml?query=branch%3Amaster)|Windows amd64 MinGW|[![Build Status](https://img.shields.io/github/check-runs/DaemonEngine/native_client/master?nameFilter=Windows%20amd64%20MinGW)](https://github.com/DaemonEngine/native_client/actions/workflows/build_test.yml?query=branch%3Amaster) -Linux armhf GCC|[![Build Status](https://img.shields.io/github/check-runs/DaemonEngine/native_client/master?nameFilter=Linux%20armhf%20GCC)](https://github.com/DaemonEngine/native_client/actions/workflows/build_test.yml?query=branch%3Amaster)|macOS amd64 AppleClang|[![Build Status](https://img.shields.io/github/check-runs/DaemonEngine/native_client/master?nameFilter=macOS%20amd64%20AppleClang)](https://github.com/DaemonEngine/native_client/actions/workflows/build_test.yml?query=branch%3Amaster) +Linux armhf GCC|[![Build Status](https://img.shields.io/github/check-runs/DaemonEngine/native_client/master?nameFilter=Linux%20armhf%20GCC)](https://github.com/DaemonEngine/native_client/actions/workflows/build_test.yml?query=branch%3Amaster)|Windows i686 MinGW|[![Build Status](https://img.shields.io/github/check-runs/DaemonEngine/native_client/master?nameFilter=Windows%20i686%20MinGW)](https://github.com/DaemonEngine/native_client/actions/workflows/build_test.yml?query=branch%3Amaster) +macOS amd64 AppleClang|[![Build Status](https://img.shields.io/github/check-runs/DaemonEngine/native_client/master?nameFilter=macOS%20amd64%20AppleClang)](https://github.com/DaemonEngine/native_client/actions/workflows/build_test.yml?query=branch%3Amaster) Native Client (also known as NaCl) is a sandboxing technology by Google. It was used by Chrome extensions and Chrome apps. From 9971292012b5e3ab986bfbe223d7dc5dcf009222 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Wed, 7 Oct 2026 06:00:38 +0200 Subject: [PATCH 06/15] win32: fix GCC attribute placement for NaClThreadContext Move the Windows alignment attribute after the struct keyword so GCC accepts the declaration without triggering -Werror=attributes. --- src/trusted/service_runtime/arch/x86_32/sel_rt_32.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/trusted/service_runtime/arch/x86_32/sel_rt_32.h b/src/trusted/service_runtime/arch/x86_32/sel_rt_32.h index cce501c92d..6f260e8f57 100644 --- a/src/trusted/service_runtime/arch/x86_32/sel_rt_32.h +++ b/src/trusted/service_runtime/arch/x86_32/sel_rt_32.h @@ -98,9 +98,17 @@ struct NaClGsSegment { */ #if NACL_WINDOWS /* Align gs_segment for better performance on Intel Atom */ -__declspec(align(64)) +#if defined(_MSC_VER) +#define NACL_THREAD_CONTEXT_ALIGN __declspec(align(64)) +#elif defined(__GNUC__) +#define NACL_THREAD_CONTEXT_ALIGN __attribute__((aligned(64))) +#else +#define NACL_THREAD_CONTEXT_ALIGN #endif -struct NaClThreadContext { +#else +#define NACL_THREAD_CONTEXT_ALIGN +#endif +struct NACL_THREAD_CONTEXT_ALIGN NaClThreadContext { /* * We align gs_segment to a multiple of 64 bytes because otherwise * memory accesses through the %gs segment are slow on Intel Atom From 9971054dfd541e1ae2714a47ecd89a1ac3142275 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Wed, 7 Oct 2026 06:27:42 +0200 Subject: [PATCH 07/15] scons: enable SSE2 for windows-i686-mingw builds Enable SSE2 for x86-32 Windows builds so GCC can compile SSE intrinsics such as _mm_sfence() without a target-specific option mismatch. --- SConstruct | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SConstruct b/SConstruct index 7bba0d2553..78c1b941c8 100755 --- a/SConstruct +++ b/SConstruct @@ -2314,6 +2314,9 @@ def MakeWindowsEnv(platform=None): if windows_env.Bit('mingw'): # Some C++-using binaries are linked with the C compiler windows_env.Append(LIBS = ['stdc++']) + if windows_env.Bit('build_x86_32'): + # Enable SSE2 for x86-32 MinGW builds so SSE intrinsics compile correctly. + windows_env.Append(CCFLAGS = ['-msse2']) else: # TODO(bsy) remove 4355 once cross-repo # NACL_ALLOW_THIS_IN_INITIALIZER_LIST changes go in. From 8728b3c2bbb026a39024bbde2e9ad281f2e5b5ed Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Wed, 7 Oct 2026 06:33:13 +0200 Subject: [PATCH 08/15] win32: fix noreturn handling for GCC Add the GCC compiler check to the existing __builtin_unreachable() workaround so GCC recognizes that NaClSwitch does not return. --- src/trusted/service_runtime/arch/x86_32/nacl_switch_to_app_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/trusted/service_runtime/arch/x86_32/nacl_switch_to_app_32.c b/src/trusted/service_runtime/arch/x86_32/nacl_switch_to_app_32.c index 47e4d9d9b8..5a5ec20e6a 100644 --- a/src/trusted/service_runtime/arch/x86_32/nacl_switch_to_app_32.c +++ b/src/trusted/service_runtime/arch/x86_32/nacl_switch_to_app_32.c @@ -71,7 +71,7 @@ NORETURN void NaClStartThreadInApp(struct NaClAppThread *natp, NaClSwitch(context); -#if NACL_WINDOWS && defined(__clang__) +#if NACL_WINDOWS && (defined(__clang__) || defined(__GNUC__)) /* * NaClSwitch is a function pointer in x86_32 and there's no way to mark * the function pointed to by a function pointer as noreturn in clang-cl mode. From dd3da78c11792c7a3b84a9b0d540a279beeabd71 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Wed, 7 Oct 2026 06:41:27 +0200 Subject: [PATCH 09/15] win32: fix Windows segment register assembly for GCC Add GCC-compatible inline assembly for accessing Windows segment registers and the stack pointer while preserving the existing MSVC implementation. I used an LLM to convert the syntax. --- .../service_runtime/win/sel_segments.c | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/trusted/service_runtime/win/sel_segments.c b/src/trusted/service_runtime/win/sel_segments.c index f18785d9aa..fd5dd4fdde 100644 --- a/src/trusted/service_runtime/win/sel_segments.c +++ b/src/trusted/service_runtime/win/sel_segments.c @@ -16,7 +16,11 @@ uint16_t NaClGetCs(void) { uint16_t seg1; +#if defined(__GNUC__) + __asm__ volatile ("mov %%cs, %0" : "=r"(seg1)); +#else __asm mov seg1, cs; +#endif return seg1; } @@ -25,59 +29,95 @@ uint16_t NaClGetCs(void) { uint16_t NaClGetDs(void) { uint16_t seg1; +#if defined(__GNUC__) + __asm__ volatile ("mov %%ds, %0" : "=r"(seg1)); +#else __asm mov seg1, ds; +#endif return seg1; } void NaClSetDs(uint16_t seg1) { +#if defined(__GNUC__) + __asm__ volatile ("mov %0, %%ds" : : "r"(seg1)); +#else __asm mov ds, seg1; +#endif } uint16_t NaClGetEs(void) { uint16_t seg1; +#if defined(__GNUC__) + __asm__ volatile ("mov %%es, %0" : "=r"(seg1)); +#else __asm mov seg1, es; +#endif return seg1; } void NaClSetEs(uint16_t seg1) { +#if defined(__GNUC__) + __asm__ volatile ("mov %0, %%es" : : "r"(seg1)); +#else __asm mov es, seg1; +#endif } uint16_t NaClGetFs(void) { uint16_t seg1; +#if defined(__GNUC__) + __asm__ volatile ("mov %%fs, %0" : "=r"(seg1)); +#else __asm mov seg1, fs; +#endif return seg1; } void NaClSetFs(uint16_t seg1) { +#if defined(__GNUC__) + __asm__ volatile ("mov %0, %%fs" : : "r"(seg1)); +#else __asm mov fs, seg1; +#endif } uint16_t NaClGetGs(void) { uint16_t seg1; +#if defined(__GNUC__) + __asm__ volatile ("mov %%gs, %0" : "=r"(seg1)); +#else __asm mov seg1, gs; +#endif return seg1; } void NaClSetGs(uint16_t seg1) { +#if defined(__GNUC__) + __asm__ volatile ("mov %0, %%gs" : : "r"(seg1)); +#else __asm mov gs, seg1; +#endif } uint16_t NaClGetSs(void) { uint16_t seg1; +#if defined(__GNUC__) + __asm__ volatile ("mov %%ss, %0" : "=r"(seg1)); +#else __asm mov seg1, ss; +#endif return seg1; } @@ -85,7 +125,11 @@ uint16_t NaClGetSs(void) { uint32_t NaClGetStackPtr(void) { uint32_t stack_ptr; +#if defined(__GNUC__) + __asm__ volatile ("mov %%esp, %0" : "=r"(stack_ptr)); +#else _asm mov stack_ptr, esp; +#endif return stack_ptr; } #endif From 5b6294bd8baa32ac7e15b2ad93e197168d0b167d Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Wed, 7 Oct 2026 06:46:44 +0200 Subject: [PATCH 10/15] win32: fix pointer cast in Windows backtrace test Cast the stack frame address through uintptr_t to avoid an integer-to-pointer size warning when building the 32-bit Windows test with GCC. --- tests/trusted_crash/crash_in_syscall/test_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/trusted_crash/crash_in_syscall/test_host.c b/tests/trusted_crash/crash_in_syscall/test_host.c index 1e8f0919c6..4cf25deff6 100644 --- a/tests/trusted_crash/crash_in_syscall/test_host.c +++ b/tests/trusted_crash/crash_in_syscall/test_host.c @@ -127,7 +127,7 @@ static void Backtrace(CONTEXT *initial_context) { } fprintf(stderr, "#%i: ip=%p stack=%llx frame=%llx ", frame_number, - (void *) frame.AddrPC.Offset, + (void *) (uintptr_t) frame.AddrPC.Offset, frame.AddrStack.Offset, frame.AddrFrame.Offset); PrintSymbolForAddress(frame.AddrPC.Offset); From df4385bba4d700544f3fb6fc437b55cc47835079 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Wed, 7 Oct 2026 17:38:05 +0200 Subject: [PATCH 11/15] win32: make possible to build tls_edit with the 32-bit MinGW toolchain Add a tls_edit_i686 build option that makes the native tls_edit host tool use the x86-32 build environment, reusing the existing 32-bit MinGW toolchain instead of requiring a separate x86-64 MinGW toolchain. Supposedly an amd64 Windows machine can run a native i686 host tool, so we don't need to cross-compile the host tools. The option requires mingw=1 and a 32-bit target. --- SConstruct | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SConstruct b/SConstruct index 78c1b941c8..fbe21e2a9c 100755 --- a/SConstruct +++ b/SConstruct @@ -277,6 +277,9 @@ def SetUpArgumentBits(env): BitFromArgument(env, 'mingw', default=False, desc='Use MinGW toolchain for trusted build') + BitFromArgument(env, 'tls_edit_i686', default=False, + desc='Build tls_edit as an i686 Windows host tool') + BitFromArgument(env, 'pnacl_native_clang_driver', default=False, desc='Use the (experimental) native PNaCl Clang driver') @@ -3722,6 +3725,14 @@ def LinkTrustedEnv(selected_envs): def MakeBuildEnv(): build_platform = GetBuildPlatform() + if pre_base_env.Bit('tls_edit_i686'): + if not pre_base_env.Bit('mingw'): + raise UserError('tls_edit_i686 requires mingw=1') + if GetTargetPlatform() != 'x86-32': + raise UserError( + 'tls_edit_i686 requires a 32-bit target (platform=x86-32)') + build_platform = 'x86-32' + # Build Platform Base Function platform_func_map = { 'win32' : MakeWindowsEnv, From 1427714f4d73457cdb5a62291a493aa908ffe650 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Wed, 7 Oct 2026 17:41:02 +0200 Subject: [PATCH 12/15] wip: tls_edit_i686 --- .github/workflows/build_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index a278e46bd3..378d7e7b1a 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -87,7 +87,7 @@ jobs: - name: Windows i686 MinGW vm_image: windows-2022 sdk_platform: windows-amd64 - scons_build_args: platform=x86-32 --no-clang mingw=1 werror=1 mingw_dir=mingw/mingw + scons_build_args: platform=x86-32 --no-clang mingw=1 werror=1 mingw_dir=mingw/mingw tls_edit_i686=1 scons_tests: small_tests medium_tests large_tests disable_tests=run_toolchain_python_tests vpython: pyenv/Scripts/python python_packages: pywin32 From 2cfcbacf2a78130f16e5e49bc9b348eb0b796dd3 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Wed, 7 Oct 2026 17:54:35 +0200 Subject: [PATCH 13/15] test --- .github/workflows/build_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 378d7e7b1a..cbd54c9f92 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -160,4 +160,4 @@ jobs: run: | set -xue parallelism="$(${NPROC_COMMAND:-nproc})" - ${VPYTHON} -m SCons --mode=opt-host,nacl saigo=1 saigo_newlib_dir=sdk/sdk ${SCONS_BUILD_ARGS} ${SCONS_TESTS} -j${parallelism} --verbose --keep-going disable_flaky_tests=1 + ${VPYTHON} -m SCons -Q --mode=opt-host,nacl saigo=1 saigo_newlib_dir=sdk/sdk ${SCONS_BUILD_ARGS} ${SCONS_TESTS} -j${parallelism} --verbose --keep-going disable_flaky_tests=1 From 03c025c299a8ccc7547e85028b63d59b9143a3ee Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Fri, 9 Oct 2026 01:16:33 +0200 Subject: [PATCH 14/15] test-i686-scons --- SConstruct | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index fbe21e2a9c..8c4ddd69c4 100755 --- a/SConstruct +++ b/SConstruct @@ -3725,7 +3725,8 @@ def LinkTrustedEnv(selected_envs): def MakeBuildEnv(): build_platform = GetBuildPlatform() - if pre_base_env.Bit('tls_edit_i686'): + tls_edit_i686 = pre_base_env.Bit('tls_edit_i686') + if tls_edit_i686: if not pre_base_env.Bit('mingw'): raise UserError('tls_edit_i686 requires mingw=1') if GetTargetPlatform() != 'x86-32': @@ -3743,7 +3744,12 @@ def MakeBuildEnv(): } if sys.platform not in platform_func_map: raise UserError('Unrecognized host platform: %s', sys.platform) - make_env_func = platform_func_map[sys.platform] + # tls_edit_i686 builds a Windows host tool with the i686 MinGW + # toolchain, even when SCons itself is running on Linux. + if tls_edit_i686: + make_env_func = MakeWindowsEnv + else: + make_env_func = platform_func_map[sys.platform] build_env = make_env_func(build_platform) build_env['IS_BUILD_ENV'] = True From a307862de6058ebb9bf7b17c19ed05b0223497d3 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Fri, 9 Oct 2026 01:23:27 +0200 Subject: [PATCH 15/15] test-static-mingw --- SConstruct | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SConstruct b/SConstruct index 8c4ddd69c4..8cebb70a30 100755 --- a/SConstruct +++ b/SConstruct @@ -3753,6 +3753,12 @@ def MakeBuildEnv(): build_env = make_env_func(build_platform) build_env['IS_BUILD_ENV'] = True + if tls_edit_i686: + build_env.Append(LINKFLAGS=[ + '-static', + '-static-libgcc', + '-static-libstdc++', + ]) # Building tls_edit depends on gio, platform, and validator_ragel. build_env['BUILD_SCONSCRIPTS'] = [