From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EE5FF3858C27; Wed, 19 Jan 2022 10:50:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EE5FF3858C27 From: "doko at debian dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/104065] [12 Regression] trunk 20220117 fails to build modula2 Date: Wed, 19 Jan 2022 10:50:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: doko at debian dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: gaius at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jan 2022 10:50:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104065 Matthias Klose changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |--- Status|RESOLVED |NEW --- Comment #4 from Matthias Klose --- reopening. the build failure is still there. the branch currently has: --- a/gcc/hwint.h +++ b/gcc/hwint.h @@ -257,11 +257,14 @@ exact_log2 (unsigned HOST_WIDE_INT x) (HOST_WIDE_INT_1U << (HOST_BITS_PER_WIDE_INT - 1)) #define HOST_WIDE_INT_MAX (~(HOST_WIDE_INT_MIN)) +#ifndef __cplusplus extern HOST_WIDE_INT abs_hwi (HOST_WIDE_INT); extern unsigned HOST_WIDE_INT absu_hwi (HOST_WIDE_INT); -extern HOST_WIDE_INT gcd (HOST_WIDE_INT, HOST_WIDE_INT); extern HOST_WIDE_INT pos_mul_hwi (HOST_WIDE_INT, HOST_WIDE_INT); extern HOST_WIDE_INT mul_hwi (HOST_WIDE_INT, HOST_WIDE_INT); +#endif /* !cplusplus. */ + +extern HOST_WIDE_INT gcd (HOST_WIDE_INT, HOST_WIDE_INT); extern HOST_WIDE_INT least_common_multiple (HOST_WIDE_INT, HOST_WIDE_INT); /* Like ctz_hwi, except 0 when x =3D=3D 0. */ @@ -316,6 +319,7 @@ zext_hwi (unsigned HOST_WIDE_INT src, unsigned int prec) } } +#ifdef __cplusplus /* Compute the absolute value of X. */ inline HOST_WIDE_INT @@ -374,5 +378,6 @@ mul_hwi (HOST_WIDE_INT a, HOST_WIDE_INT b, bool *overfl= ow) return result; #endif } +#endif /* ! __cplusplus */ #endif /* ! GCC_HWINT_H */ and the file is compiled using gcc (at least in stage1). Looks like m2/Make-lang.in uses it's own definition HOSTCC to build these files. So maybe define a HOSTCXX and build with that instead? There's als= o a macro CPLUS which is unused. However, these macros should be taken from the parent Makefile, so maybe ju= st use CC and CXX instead? Trying --- a/gcc/m2/Make-lang.in +++ b/gcc/m2/Make-lang.in @@ -32,7 +32,7 @@ GM2_1 =3D ./gm2 -B./stage1/m2 -g -fm2-g XGCC =3D ./xgcc -B./ GM2_2 =3D ./gm2 -B./stage2/m2 -g -fm2-g -HOSTCC =3D gcc +HOSTCC =3D $(CXX) CFLAGS=3D-g ## remove this LDLAGS=3D-g ## remove this doesn't work, gm2 isn't yet C++ ready. Jakub confirmed on irc: compiling with hwint.h includes with C is not supported anymore...=