[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1121975: gcc-15: Please cherry-pick upstream patch to fix FTBFS on sparc64



Source: gcc-15
Version: 15.2.0-10
Severity: normal
Tags: patch
User: debian-sparc@lists.debian.org
Usertags: sparc64
X-Debbugs-Cc: debian-sparc@lists.debian.org

Hi,

gcc-15 currently fails to build from source on sparc64 [1]:

In file included from ./tm_p.h:4,
                 from ../../src/gcc/algol68/a68-exports.cc:27:
../../src/gcc/config/sparc/sparc-protos.h:46:47: error: use of enum 'memmodel' without previous declaration
   46 | extern void sparc_emit_membar_for_model (enum memmodel, int, int);
      |                                               ^~~~~~~~
make[5]: *** [Makefile:1215: algol68/a68-exports.o] Error 1
make[5]: *** Waiting for unfinished jobs....
In file included from ./tm_p.h:4,
                 from ../../src/gcc/algol68/a68-imports.cc:36:
../../src/gcc/config/sparc/sparc-protos.h:46:47: error: use of enum 'memmodel' without previous declaration
   46 | extern void sparc_emit_membar_for_model (enum memmodel, int, int);
      |                                               ^~~~~~~~
make[5]: *** [Makefile:1215: algol68/a68-imports.o] Error 1

This is most likely fixed by the following upstream commit [2]:

algol68: Fix SPARC build

Algol68 bootstrap currently fails on Solaris/SPARC:

n file included from ./tm_p.h:4,
                 from gcc/algol68/a68-imports.cc:36:
gcc/config/sparc/sparc-protos.h:46:47: error: use of enum ‘memmodel’ without previous declaration
   46 | extern void sparc_emit_membar_for_model (enum memmodel, int, int);
      |                                               ^~~~~~~~

tm_p.h needs memmodel.h on some targets, like SPARC.

Bootstrapped on sparc-sun-solaris2.11.

2025-12-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

gcc/algol68:
* a68-exports.cc: Include memmodel.h.
* a68-imports.cc: Likeswise.

Could you cherry-pick this patch?

Thanks,
Adrian

> [1] https://buildd.debian.org/status/fetch.php?pkg=gcc-15&arch=sparc64&ver=15.2.0-10&stamp=1764694585&raw=0
> [2] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=18a144f969d515b899002bb98b90bfb4f7199a08

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
From 18a144f969d515b899002bb98b90bfb4f7199a08 Mon Sep 17 00:00:00 2001
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Date: Mon, 1 Dec 2025 13:36:35 +0100
Subject: [PATCH] algol68: Fix SPARC build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Algol68 bootstrap currently fails on Solaris/SPARC:

n file included from ./tm_p.h:4,
                 from gcc/algol68/a68-imports.cc:36:
gcc/config/sparc/sparc-protos.h:46:47: error: use of enum ‘memmodel’ without previous declaration
   46 | extern void sparc_emit_membar_for_model (enum memmodel, int, int);
      |                                               ^~~~~~~~

tm_p.h needs memmodel.h on some targets, like SPARC.

Bootstrapped on sparc-sun-solaris2.11.

2025-12-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/algol68:
	* a68-exports.cc: Include memmodel.h.
	* a68-imports.cc: Likeswise.
---
 gcc/algol68/a68-exports.cc | 1 +
 gcc/algol68/a68-imports.cc | 1 +
 2 files changed, 2 insertions(+)

diff --git a/gcc/algol68/a68-exports.cc b/gcc/algol68/a68-exports.cc
index 58d04d5842b..375b6213cef 100644
--- a/gcc/algol68/a68-exports.cc
+++ b/gcc/algol68/a68-exports.cc
@@ -22,6 +22,7 @@
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
+#include "memmodel.h"
 #include "tree.h"
 #include "target.h"
 #include "tm_p.h"
diff --git a/gcc/algol68/a68-imports.cc b/gcc/algol68/a68-imports.cc
index a5c66bcb4cc..6b203b26273 100644
--- a/gcc/algol68/a68-imports.cc
+++ b/gcc/algol68/a68-imports.cc
@@ -31,6 +31,7 @@
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
+#include "memmodel.h"
 #include "tree.h"
 #include "target.h"
 #include "tm_p.h"
-- 
2.51.0


Reply to: