Rust: Don't depend on unused 'target-libffi', 'target-libbacktrace' (was: [PATCH Rust front-end v2 32/37] gccrs: Add config-lang.in)

Message ID 87o7po797z.fsf@euler.schwinge.homeip.net
State Committed
Headers
Series Rust: Don't depend on unused 'target-libffi', 'target-libbacktrace' (was: [PATCH Rust front-end v2 32/37] gccrs: Add config-lang.in) |

Commit Message

Thomas Schwinge Feb. 20, 2023, 1:33 p.m. UTC
  Hi!

On 2022-08-24T12:59:51+0100, herron.philip@googlemail.com wrote:
> From: Philip Herron <philip.herron@embecosm.com>
>
> This was a copy paste from gccgo front-end, we do not use any of the
> target_libs yet but we will need these when we support the libpanic crate.

> --- /dev/null
> +++ b/gcc/rust/config-lang.in

> +target_libs="target-libffi target-libbacktrace"

(By the way, this setting of 'target_libs' was not present in the v1
<https://inbox.sourceware.org/gcc-patches/20220727134040.843750-2-philip.herron@embecosm.com>
"[PATCH Rust front-end v1 1/4] Add skeleton Rust front-end folder".)

So there's the issue that not all GCC target configurations support
building those libraries.  Given that they're indeed unused, is it be OK
to push the attached
"Rust: Don't depend on unused 'target-libffi', 'target-libbacktrace'"?
(..., and once we get to the point where we'd like to use libffi and/or
libbacktrace, then think about how to handle those GCC target
configurations.)


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
  

Patch

From 5d85939a3e3ebcfcf3f2ac9d3f2e01cbb1736578 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Mon, 20 Feb 2023 13:01:50 +0100
Subject: [PATCH] Rust: Don't depend on unused 'target-libffi',
 'target-libbacktrace'

For example:

    configure: error: "libffi has not been ported to nvptx-unknown-none."

Follow-up to commit a75f038c069cc3a23b214854bedf04321fe88bc5
"gccrs: Add config-lang.in", which said:

> This was a copy/paste from gccgo front-end. We do not use any of the
> target_libs yet, [...]

	gcc/rust/
	* config-lang.in (target_libs): Remove.
---
 gcc/rust/config-lang.in | 2 --
 1 file changed, 2 deletions(-)

diff --git a/gcc/rust/config-lang.in b/gcc/rust/config-lang.in
index 89055be5cd4..aac66c9b962 100644
--- a/gcc/rust/config-lang.in
+++ b/gcc/rust/config-lang.in
@@ -29,6 +29,4 @@  compilers="rust1\$(exeext)"
 
 build_by_default="no"
 
-target_libs="target-libffi target-libbacktrace"
-
 gtfiles="\$(srcdir)/rust/rust-lang.cc"
-- 
2.25.1