From 5d7e17caf7d0971d22446d8a81bcf1cd8c18a0dc Mon Sep 17 00:00:00 2001 From: Alexander Egorenkov Date: Mon, 26 May 2025 14:06:56 +0200 Subject: pkg/csource: remove C23 embed built-in defines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new C23 embed built-in defines cause build errors in executor with GCC 15. :3:9: error: ‘__STDC_EMBED_NOT_FOUND__’ redefined [-Werror] : note: this is the location of the previous definition :4:9: error: ‘__STDC_EMBED_FOUND__’ redefined [-Werror] : note: this is the location of the previous definition :5:9: error: ‘__STDC_EMBED_EMPTY__’ redefined [-Werror] : note: this is the location of the previous definition Signed-off-by: Alexander Egorenkov --- pkg/csource/common.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'pkg/csource/common.go') diff --git a/pkg/csource/common.go b/pkg/csource/common.go index e341c1df0..a065a6bdb 100644 --- a/pkg/csource/common.go +++ b/pkg/csource/common.go @@ -132,10 +132,13 @@ func commonDefines(p *prog.Prog, opts Options) map[string]bool { func removeSystemDefines(src []byte, defines []string) ([]byte, error) { remove := map[string]string{ - "__STDC__": "1", - "__STDC_HOSTED__": "1", - "__STDC_UTF_16__": "1", - "__STDC_UTF_32__": "1", + "__STDC__": "1", + "__STDC_HOSTED__": "1", + "__STDC_UTF_16__": "1", + "__STDC_UTF_32__": "1", + "__STDC_EMBED_NOT_FOUND__": "0", + "__STDC_EMBED_FOUND__": "1", + "__STDC_EMBED_EMPTY__": "2", } for _, def := range defines { eq := strings.IndexByte(def, '=') -- cgit mrf-deployment