From patchwork Thu Jul 26 10:22:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Hutchings X-Patchwork-Id: 10545561 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0078214E2 for ; Thu, 26 Jul 2018 10:22:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2A1A27CEA for ; Thu, 26 Jul 2018 10:22:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D70F1285CC; Thu, 26 Jul 2018 10:22:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,T_TVD_MIME_EPI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D73127CEA for ; Thu, 26 Jul 2018 10:22:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729354AbeGZLjF (ORCPT ); Thu, 26 Jul 2018 07:39:05 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:59875 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729103AbeGZLjF (ORCPT ); Thu, 26 Jul 2018 07:39:05 -0400 Received: from ben by shadbolt.decadent.org.uk with local (Exim 4.84_2) (envelope-from ) id 1fidQ6-0004v6-1W; Thu, 26 Jul 2018 11:22:54 +0100 Date: Thu, 26 Jul 2018 11:22:54 +0100 From: Ben Hutchings To: linux-kbuild@vger.kernel.org Cc: debian-kernel@lists.debian.org Message-ID: <20180726102253.GF14131@decadent.org.uk> References: <20180726101934.GT14131@decadent.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180726101934.GT14131@decadent.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ben@decadent.org.uk Subject: [PATCH 12/12] builddeb: Add automatic support for sh{3,4}{,eb} architectures X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on shadbolt.decadent.org.uk) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Different generations of the SH architecture are not very compatible, so there are/were separate Debian ports for SH3 and SH4. Move the fallback out of the "case" statement, so that it will also be used in case we find some SH architecture version without a known mapping. Signed-off-by: Ben Hutchings --- scripts/package/mkdebian | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index 3ef2fd0c5086..663a7f343b42 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -63,7 +63,15 @@ set_debarch() { ;; openrisc) debarch=or1k ;; - *) + sh) + if is_enabled CPU_SH3; then + debarch=sh3$(if_enabled_echo CPU_BIG_ENDIAN eb) + elif is_enabled CPU_SH4; then + debarch=sh4$(if_enabled_echo CPU_BIG_ENDIAN eb) + fi + ;; + esac + if [ -z "$debarch" ]; then debarch=$(dpkg-architecture -qDEB_HOST_ARCH) echo "" >&2 echo "** ** ** WARNING ** ** **" >&2 @@ -73,8 +81,7 @@ set_debarch() { echo "Falling back to the current host architecture ($debarch)." >&2 echo "Please add support for $UTS_MACHINE to ${0} ..." >&2 echo "" >&2 - ;; - esac + fi } # Some variables and settings used throughout the script