From e0578fdad7880e2a3542da0c614a0f05f1d77d67 Mon Sep 17 00:00:00 2001 From: Peter Michael Green Date: Sat, 25 Apr 2020 04:53:22 +0000 Subject: [PATCH] Use the compiler itself instead of dpkg to figure out DEB_BUILD_RUST_TYPE. --- debian/architecture.mk | 2 +- debian/changelog | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/architecture.mk b/debian/architecture.mk index 9224354594..fb41c65698 100644 --- a/debian/architecture.mk +++ b/debian/architecture.mk @@ -14,4 +14,4 @@ ifeq ($(DEB_TARGET_RUST_TYPE),-unknown-) DEB_TARGET_RUST_TYPE = $(DEB_HOST_RUST_TYPE) endif -DEB_BUILD_RUST_TYPE = $(shell dpkg -L rustc | grep '/usr/lib/rustlib/' | head -n 1 | cut -d '/' -f 5) +DEB_BUILD_RUST_TYPE = $(shell RUSTC_BOOTSTRAP=1 rustc -Z unstable-options --print target-spec-json | python3 -c 'import json,sys;obj=json.load(sys.stdin);print(obj["llvm-target"])') diff --git a/debian/changelog b/debian/changelog index 51df1abf1e..3451a9624c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,8 +6,10 @@ rustc (1.42.0+dfsg1-1+rpi1) bullseye-staging; urgency=medium * Disable testsuite. [changes introduced in 1.37.0+dfsg1-1+rpi1 by Peter Michael Green] * Set DEB_BUILD_RUST_TYPE based on the compiler that is actually installed. + [changes introduced in 1.42.0+dfsg1-1+rpi1 by Peter Michael Green] + * Use the compiler itself rather than dpkg to detect DEB_BUILD_RUST_TYPE - -- Raspbian forward porter Sun, 19 Apr 2020 08:07:33 +0000 + -- Peter Michael Green Sat, 25 Apr 2020 04:53:04 +0000 rustc (1.42.0+dfsg1-1) unstable; urgency=medium -- 2.30.2