From 96fa88a3833be9125e49cd490479503c338b7414 Mon Sep 17 00:00:00 2001
From: Christian Svensson <blue@cmd.nu>
Date: Tue, 12 Feb 2013 00:25:01 +0100
Subject: [PATCH] Add or1k architecture.

	* config.guess (or1k:Linux:*:*): New.
	* config.sub (or1k): Likewise.
	* testsuite/config-guess.data: Test for or1k:Linux.
	* testsuite/config-sub.data: Tests for or1k-linux, or1k-elf.
---
 ChangeLog                   | 7 +++++++
 config.guess                | 3 +++
 config.sub                  | 5 ++++-
 testsuite/config-guess.data | 1 +
 testsuite/config-sub.data   | 2 ++
 5 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index c4c558e..83e224c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-02-11  Christian Svensson  <blue@cmd.nu>
+
+	* config.guess (or1k:Linux:*:*): New.
+	* config.sub (or1k): Likewise.
+	* testsuite/config-guess.data: Test for or1k:Linux.
+	* testsuite/config-sub.data: Tests for or1k-linux, or1k-elf.
+
 2013-02-04  Ben Elliston  <bje@gnu.org>
 
 	* config.guess: Contract the list of copyright years into the
diff --git a/config.guess b/config.guess
index 6ea3454..eb57916 100755
--- a/config.guess
+++ b/config.guess
@@ -956,6 +956,9 @@ EOF
     or32:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
+    or1k:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     padre:Linux:*:*)
 	echo sparc-unknown-linux-gnu
 	exit ;;
diff --git a/config.sub b/config.sub
index 80211d0..0d0d0ab 100755
--- a/config.sub
+++ b/config.sub
@@ -296,7 +296,7 @@ case $basic_machine in
 	| nios | nios2 | nios2eb | nios2el \
 	| ns16k | ns32k \
 	| open8 \
-	| or32 \
+	| or1k | or32 \
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle \
 	| pyramid \
@@ -1589,6 +1589,9 @@ case $basic_machine in
 	mips*-*)
 		os=-elf
 		;;
+	or1k-*)
+		os=-elf
+		;;
 	or32-*)
 		os=-coff
 		;;
diff --git a/testsuite/config-guess.data b/testsuite/config-guess.data
index 0d18ea6..12c6fbf 100644
--- a/testsuite/config-guess.data
+++ b/testsuite/config-guess.data
@@ -37,6 +37,7 @@ NSE-1	1.0			NONSTOP_KERNEL	ignored	nse-tandem-nsk1.0
 NSE-N	1.0			NONSTOP_KERNEL	ignored	nse-tandem-nsk1.0
 NSE-NN	1.0			NONSTOP_KERNEL	ignored	nse-tandem-nsk1.0
 or32	ignored			Linux		ignored	or32-unknown-linux-gnu
+or1k	ignored			Linux		ignored	or1k-unknown-linux-gnu
 padre	2.6.15			Linux		ignored	sparc-unknown-linux-gnu
 pc	1.0			ignored		ignored	i586-pc-msdosdjgpp
 PowerPC	4.2			LynxOS		ignored	powerpc-unknown-lynxos4.2
diff --git a/testsuite/config-sub.data b/testsuite/config-sub.data
index 379cda6..ba1e9df 100644
--- a/testsuite/config-sub.data
+++ b/testsuite/config-sub.data
@@ -148,6 +148,8 @@ open8-elf			open8-unknown-elf
 open8				open8-unknown-none
 openrisc-linux			or32-unknown-linux-gnu
 or32-linux			or32-unknown-linux-gnu
+or1k-linux			or1k-unknown-linux-gnu
+or1k-elf			or1k-unknown-elf
 os400				powerpc-ibm-os400
 parisc				hppa-unknown-linux-gnu
 pc98-freebsd			i386-pc-freebsd
-- 
1.8.1.2

