From 360f73c3252061a4feaaa4c925458f8e95e3328f Mon Sep 17 00:00:00 2001 From: Maxim Reznik Date: Wed, 21 Aug 2024 19:39:32 +0300 Subject: [PATCH] Add `-O0` for `gpr2-build-actions-post_bind.adb` in `libgpr2` to avoid bugbox crash in GCC 14.1. Refs eng/gpr/gpr-issues#370 --- subprojects/libgpr2.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/subprojects/libgpr2.toml b/subprojects/libgpr2.toml index 98886fea3..29c8e71b8 100644 --- a/subprojects/libgpr2.toml +++ b/subprojects/libgpr2.toml @@ -25,6 +25,15 @@ command = ["bash", "-c", "-x", "[ -d gprconfig_kb ] || git clone https://github. type = "post-fetch" command = ["sed", "-i.bak", "-E", "-e", "s/\\b(X?)BUILD\\b/\\1GPR2_BUILD/g", "Makefile", "gpr2.gpr", "bindings/c/gpr2-c.gpr"] +[[actions]] +type = "post-fetch" +command = [ + "sed", + "-i.bk2", + "-e", ''' + /package Compiler/a for Switches ("gpr2-build-actions-post_bind.adb") use Compiler'Default_Switches ("Ada") & ("-O0");''', + "gpr2.gpr"] + [[actions]] type = "pre-build" command = ["bash", "-c", "-x", "make setup build-lib-${LIBRARY_TYPE:-static} GPR2KBDIR=./gprconfig_kb/db"]