public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-7211] rust: Disable --enable-languages=rust and silently exclude it from --enable-languages=all for GCC 13
@ 2023-04-18 10:18 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2023-04-18 10:18 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:54a1630b4abadb8f4b207ebf4baf5c8a6b5adb9a

commit r13-7211-g54a1630b4abadb8f4b207ebf4baf5c8a6b5adb9a
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Apr 18 12:18:13 2023 +0200

    rust: Disable --enable-languages=rust and silently exclude it from --enable-languages=all for GCC 13
    
    As discussed on IRC, gccrs can't compile the standard libraries yet
    and requires annoying -frust-incomplete-and-experimental-compiler-do-not-use
    option to compile anything.
    
    As such it is better to disable this at least for GCC 13.1, we'd keep
    it allowed on the trunk where hopefully support to compile at least
    some standard libraries will land soon and eventually a borrow checker.
    
    If enough Rust support is backported from trunk to 13 branch before
    13.2, we could revert this change then.
    
    Tested on x86_64-linux with --enable-languages=c,c++,rust and
    --enable-languages=c,c++,all , ok for 13 branch?
    
    2023-04-18  Jakub Jelinek  <jakub@redhat.com>
    
            * configure.ac: For --enable-languages= mentioning explicitly
            rust emit an error, if included in all etc., silently disable
            rust.
            * configure: Regenerated.

Diff:
---
 configure    | 12 ++++++++++++
 configure.ac | 12 ++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/configure b/configure
index 85883099410..117a7ef23f2 100755
--- a/configure
+++ b/configure
@@ -8909,6 +8909,18 @@ $as_echo "$as_me: WARNING: GDC is required to build $language" >&2;}
             ;;
         esac
 
+        # Disable Rust for GCC 13 release.
+        case ${add_this_lang}:${language} in
+          yes:rust)
+            # Specifically requested language; tell them.
+            as_fn_error $? "Rust is not supported in GCC 13 release" "$LINENO" 5
+           ;;
+          *:rust)
+            # Silently disable.
+            add_this_lang=unsupported
+            ;;
+        esac
+
         # Disable jit if -enable-host-shared not specified
         # but not if building for Mingw. All code in Windows
         # is position independent code (PIC).
diff --git a/configure.ac b/configure.ac
index 2b612dce6e9..b3e9bbd2aa5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2150,6 +2150,18 @@ if test -d ${srcdir}/gcc; then
             ;;
         esac
 
+        # Disable Rust for GCC 13 release.
+        case ${add_this_lang}:${language} in
+          yes:rust)
+            # Specifically requested language; tell them.
+            AC_MSG_ERROR([Rust is not supported in GCC 13 release])
+           ;;
+          *:rust)
+            # Silently disable.
+            add_this_lang=unsupported
+            ;;
+        esac
+
         # Disable jit if -enable-host-shared not specified
         # but not if building for Mingw. All code in Windows
         # is position independent code (PIC).

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-18 10:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-18 10:18 [gcc r13-7211] rust: Disable --enable-languages=rust and silently exclude it from --enable-languages=all for GCC 13 Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).