[Bug rust/113056] [14 regression] Build failure in libgrust

2023-12-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113056

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug rust/113056] [14 regression] Build failure in libgrust

2023-12-18 Thread sjames at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113056

--- Comment #10 from Sam James  ---
(In reply to Sam James from comment #8)
> for the pkg build (original report): no
> for the quick test I did earlier: yes because I was rushing, oops

/tmp/build $ ~/git/gcc/configure --prefix=/tmp/gcc
--enable-languages=c,c++,rust --enable-multilib --with-multilib-list=m32,m64
--with-checking=yes,extra,rtl --disable-analyzer --disable-cet
--disable-default-pie --disable-default-ssp --disable-gcov --disable-libada
--disable-libatomic --disable-libgomp --disable-libitm --disable-libquadmath
--disable-libsanitizer --disable-libssp --disable-libstdcxx-pch
--disable-libvtv --disable-lto --disable-nls --disable-objc-gc
--disable-systemtap --disable-werror && make -j$(nproc)

failed for me as well, so out of source indeed fails as well

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug rust/113056] [14 regression] Build failure in libgrust

2023-12-18 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113056

Thomas Schwinge  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |tschwinge at gcc dot 
gnu.org
 Status|WAITING |ASSIGNED
 CC||tschwinge at gcc dot gnu.org

--- Comment #11 from Thomas Schwinge  ---
Reproduced, and I think I know what's happening.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

libgrust: 'AM_ENABLE_MULTILIB' only for target builds [PR113056] (was: [PATCH v2 2/4] libgrust: Add libproc_macro and build system)

2023-12-18 Thread Thomas Schwinge
Hi!

> --- a/libgrust/configure.ac
> +++ b/libgrust/configure.ac

> -# AM_ENABLE_MULTILIB(, ..)
> +AM_ENABLE_MULTILIB(, ..)

Such a change was applied eventually, and is necessary for target builds
-- but potentially harmful for host builds.  OK to push the attached
"libgrust: 'AM_ENABLE_MULTILIB' only for target builds [PR113056]"?


Grüße
 Thomas


-
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 
München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas 
Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht 
München, HRB 106955
>From 71e00b191bd630aa3be66e38069c707ae76a91d3 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge 
Date: Mon, 18 Dec 2023 16:27:39 +0100
Subject: [PATCH] libgrust: 'AM_ENABLE_MULTILIB' only for target builds
 [PR113056]

..., but not for host builds, which don't need it, and it may cause the build
to fail.

Use what appears to be the standard pattern for that (see
'libbacktrace/configure.ac', 'zlib/configure.ac').

	PR rust/113056
	libgrust/
	* configure.ac: 'AM_ENABLE_MULTILIB' only for target builds.
	* configure: Regenerate.
---
 libgrust/configure| 8 +---
 libgrust/configure.ac | 4 +++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/libgrust/configure b/libgrust/configure
index 5388a0e22a6..e778a253915 100755
--- a/libgrust/configure
+++ b/libgrust/configure
@@ -2387,7 +2387,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 ac_config_files="$ac_config_files Makefile"
 
 
-# Default to --enable-multilib
+if test -n "${with_target_subdir}"; then
+  # Default to --enable-multilib
 # Check whether --enable-multilib was given.
 if test "${enable_multilib+set}" = set; then :
   enableval=$enable_multilib; case "$enableval" in
@@ -2424,6 +2425,7 @@ fi
 
 ac_config_commands="$ac_config_commands default-1"
 
+fi
 
 # Do not delete or change the following two lines.  For why, see
 # http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
@@ -12653,7 +12655,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12656 "configure"
+#line 12658 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12759,7 +12761,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12762 "configure"
+#line 12764 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/libgrust/configure.ac b/libgrust/configure.ac
index 226c42ba649..adfb3500fb3 100644
--- a/libgrust/configure.ac
+++ b/libgrust/configure.ac
@@ -2,7 +2,9 @@ AC_INIT([libgrust], version-unused,,libgrust)
 AC_CONFIG_SRCDIR(Makefile.am)
 AC_CONFIG_FILES([Makefile])
 
-AM_ENABLE_MULTILIB(, ..)
+if test -n "${with_target_subdir}"; then
+  AM_ENABLE_MULTILIB(, ..)
+fi
 
 # Do not delete or change the following two lines.  For why, see
 # http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
-- 
2.34.1



[Bug rust/113056] [14 regression] Build failure in libgrust

2023-12-18 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113056

Thomas Schwinge  changed:

   What|Removed |Added

   Keywords||patch

--- Comment #12 from Thomas Schwinge  ---
(In reply to Sam James from comment #0)
> checking for suffix of object files... configure: error: in
> `/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231217/work/build/32/libgrust':
> configure: error: cannot compute suffix of object files: cannot compile
> See `config.log' for more details
> make[1]: *** [Makefile:16176: configure-libgrust] Error 1

Notice that this is the *host* libgrust build -- unexpectedly multilibbed. 
Please test

"libgrust: 'AM_ENABLE_MULTILIB' only for target builds [PR113056]".

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Re: [PATCH v3] libcpp: add function to check XID properties

2023-12-18 Thread Joseph Myers
On Fri, 8 Sep 2023, Arthur Cohen wrote:

> +  if (c < 0x80)
> +  {
> +if (('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z'))
> +  return CPP_XID_START | CPP_XID_CONTINUE;
> +if (('0' <= c && c <= '9') || c == '_')
> +  return CPP_XID_CONTINUE;

This may be an artifact of how the patch was mailed, but indentation seems 
off here (should be six spaces for both return statements).

> +  md = (mn + mx) / 2;
> +  if (c <= ucnranges[md].end)
> +  mx = md;
> +  else
> +  mn = md + 1;

And likewise here (should be a tab for both assignments).

OK with those indentation fixes.

-- 
Joseph S. Myers
jos...@codesourcery.com