>From baf3e3987be3a142190244e53604a8eaa0b4190f Mon Sep 17 00:00:00 2001
From: Niko Tyni <ntyni@debian.org>
Date: Mon, 7 Sep 2026 22:19:15 +0100
Subject: [PATCH] Temporarily lower optimization level with GCC-16

This is a workaround that makes Wx::Help load again.

Otherwise we get an unhelpful error like

  Can't load '/build/reproducible-path/libwx-perl-0.9932/ext/help/../../blib/arch/auto/Wx/Help/Help.so' for module Wx::Help:  at /build/reproducible-path/libwx-perl-0.9932/ext/help/../../blib/lib/Wx/Mini.pm line 74.

Bug-Debian: https://bugs.debian.org/1133539
---
 ext/help/XS/HelpController.xs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ext/help/XS/HelpController.xs b/ext/help/XS/HelpController.xs
index 4b790ce..dddc797 100644
--- a/ext/help/XS/HelpController.xs
+++ b/ext/help/XS/HelpController.xs
@@ -39,10 +39,14 @@ wxHelpControllerBase::DisplayTextPopup( text, pos )
     wxString text
     wxPoint pos
 
+#pragma GCC optimize ("O0")
+
 bool
 wxHelpControllerBase::DisplaySection( section )
     wxString section
 
+#pragma GCC optimize ("O2")
+
 bool
 wxHelpControllerBase::DisplaySectionId( section )
     long section
-- 
2.53.0

