https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104065
Matthias Klose <doko at debian dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |---
Status|RESOLVED |NEW
--- Comment #4 from Matthias Klose <doko at debian dot org> ---
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 == 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 *overflow)
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 also a
macro CPLUS which is unused.
However, these macros should be taken from the parent Makefile, so maybe just
use CC and CXX instead?
Trying
--- a/gcc/m2/Make-lang.in
+++ b/gcc/m2/Make-lang.in
@@ -32,7 +32,7 @@
GM2_1 = ./gm2 -B./stage1/m2 -g -fm2-g
XGCC = ./xgcc -B./
GM2_2 = ./gm2 -B./stage2/m2 -g -fm2-g
-HOSTCC = gcc
+HOSTCC = $(CXX)
CFLAGS=-g ## remove this
LDLAGS=-g ## remove this
doesn't work, gm2 isn't yet C++ ready.
Jakub confirmed on irc:
<jakub> compiling with hwint.h includes with C is not supported anymore...