aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@baylibre.com>2024-03-22 01:19:10 +0100
committerThomas Schwinge <tschwinge@baylibre.com>2024-03-22 01:22:07 +0100
commita8514ae513dd82742e10dcb6dcf5fbb627c43a90 (patch)
tree5830fc26f683562ef573d30233ca8f73b6aa03f5
parentf96582527ef42d0a02b68aa956d51c2ed40fb8b6 (diff)
parent725fb3595622a4ad8cd078a42fab1c395cbf90cb (diff)
downloadgcc-a8514ae513dd82742e10dcb6dcf5fbb627c43a90.zip
gcc-a8514ae513dd82742e10dcb6dcf5fbb627c43a90.tar.gz
gcc-a8514ae513dd82742e10dcb6dcf5fbb627c43a90.tar.bz2
Merge commit '725fb3595622a4ad8cd078a42fab1c395cbf90cb' into HEAD [#1913, #2288]
-rwxr-xr-xconfigure22
-rw-r--r--configure.ac22
-rw-r--r--gcc/rust/config-lang.in1
3 files changed, 23 insertions, 22 deletions
diff --git a/configure b/configure
index 0ed2658..874966f 100755
--- a/configure
+++ b/configure
@@ -3504,17 +3504,6 @@ $as_echo "yes" >&6; }
fi
fi
-# Disable libgrust when not using the rust language
-if test -d ${srcdir}/libgrust; then
- case ,${enable_languages}, in
- *,rust,*)
- ;;
- *)
- noconfigdirs="$noconfigdirs libgrust"
- ;;
- esac
-fi
-
# Disable Fortran for some systems.
case "${target}" in
mmix-*-*)
@@ -9287,6 +9276,17 @@ case ,${enable_languages}, in
;;
esac
+case ,${enable_languages}, in
+ *,rust,*)
+ case " ${noconfigdirs} " in
+ *\ target-libstdc++-v3\ *)
+ # Disable target libgrust if we're not building target libstdc++.
+ noconfigdirs="$noconfigdirs target-libgrust"
+ ;;
+ esac
+ ;;
+esac
+
# If gcc/ is not in the source tree then we'll not be building a
# target compiler, assume in that case we don't want to build any
# target libraries or tools.
diff --git a/configure.ac b/configure.ac
index dd9389a..4f34004 100644
--- a/configure.ac
+++ b/configure.ac
@@ -734,17 +734,6 @@ if test -d ${srcdir}/libphobos; then
fi
fi
-# Disable libgrust when not using the rust language
-if test -d ${srcdir}/libgrust; then
- case ,${enable_languages}, in
- *,rust,*)
- ;;
- *)
- noconfigdirs="$noconfigdirs libgrust"
- ;;
- esac
-fi
-
# Disable Fortran for some systems.
case "${target}" in
mmix-*-*)
@@ -2483,6 +2472,17 @@ case ,${enable_languages}, in
;;
esac
+case ,${enable_languages}, in
+ *,rust,*)
+ case " ${noconfigdirs} " in
+ *\ target-libstdc++-v3\ *)
+ # Disable target libgrust if we're not building target libstdc++.
+ noconfigdirs="$noconfigdirs target-libgrust"
+ ;;
+ esac
+ ;;
+esac
+
# If gcc/ is not in the source tree then we'll not be building a
# target compiler, assume in that case we don't want to build any
# target libraries or tools.
diff --git a/gcc/rust/config-lang.in b/gcc/rust/config-lang.in
index ccc27d4..6221ff4 100644
--- a/gcc/rust/config-lang.in
+++ b/gcc/rust/config-lang.in
@@ -30,6 +30,7 @@ compilers="crab1\$(exeext)"
build_by_default="no"
target_libs="target-libgrust"
+lang_dirs=libgrust
gtfiles="\
\$(srcdir)/rust/rust-lang.cc \$(srcdir)/rust/backend/rust-constexpr.cc \