All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stafford Horne <shorne@gmail.com>
To: fengguang.wu@intel.com
Cc: linux-kernel@vger.kernel.org, Stafford Horne <shorne@gmail.com>
Subject: [PATCH] make.cross: Update openrisc toolchain to fix builds
Date: Sun, 19 Feb 2017 17:14:36 +0900	[thread overview]
Message-ID: <20170219081436.9165-1-shorne@gmail.com> (raw)

The latest openrisc kernel patchs in linux-next are failing to build due
to old toolchains at the crosstool website.

Update to point the the toolchain binaries released the OpenRISC team.

Signed-off-by: Stafford Horne <shorne@gmail.com>
---
 sbin/make.cross | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/sbin/make.cross b/sbin/make.cross
index c450b4a..7f802b1 100755
--- a/sbin/make.cross
+++ b/sbin/make.cross
@@ -104,12 +104,31 @@ install_linaro()
 	sudo mv $dir  $GCC_INSTALL_PATH/gcc-$cross_gcc_version/$gcc_arch
 }
 
+install_openrisc()
+{
+	local URL='https://github.com/openrisc/or1k-gcc/releases/download/or1k-5.4.0-20170218'
+	local file='or1k-linux-5.4.0-20170218.tar.xz'
+
+	download_extract "$URL/$file"
+
+	local dir="$GCC_INSTALL_PATH/${gcc_arch}"
+	local cross_gcc_version=(${dir}/bin/${gcc_arch}-gcc-*.*.*)
+	local cross_gcc_version=${cross_gcc_version##*-}
+
+	echo mkdir -p $GCC_INSTALL_PATH/gcc-$cross_gcc_version
+	sudo mkdir -p $GCC_INSTALL_PATH/gcc-$cross_gcc_version
+	echo mv $dir  $GCC_INSTALL_PATH/gcc-$cross_gcc_version/$gcc_arch
+	sudo mv $dir  $GCC_INSTALL_PATH/gcc-$cross_gcc_version/$gcc_arch
+}
+
 install_cross_compiler()
 {
 	install_packages
 
 	if [[ $gcc_arch =~ 'aarch64' ]]; then
 		install_linaro
+	elif [[ $gcc_arch =~ 'or1k' ]]; then
+		install_openrisc
 	else
 		install_crosstool
 	fi
@@ -150,7 +169,7 @@ setup_crosstool()
 			fi
 			;;
 		openrisc)
-			gcc_arch=or32-linux
+			gcc_arch=or1k-linux
 			;;
 		s390)
 			gcc_arch=s390x-linux
-- 
2.9.3

             reply	other threads:[~2017-02-19  8:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-19  8:14 Stafford Horne [this message]
2017-02-19  8:50 ` [PATCH] make.cross: Update openrisc toolchain to fix builds Fengguang Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170219081436.9165-1-shorne@gmail.com \
    --to=shorne@gmail.com \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.