aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2018-07-26 06:22:54 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-07-27 21:53:44 -0400
commit79a85b55e39e65d6f20c753c4ae8bcd6f4cd7007 (patch)
treefc62bcfb609ada7ca5d81879afdd76341c29a71a
parent75ebcee7699739c0f6c63abcb9f5754538107c62 (diff)
builddeb: Add automatic support for sh{3,4}{,eb} architectures
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 <ben@decadent.org.uk> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rwxr-xr-xscripts/package/mkdebian13
1 files 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() {
63 ;; 63 ;;
64 openrisc) 64 openrisc)
65 debarch=or1k ;; 65 debarch=or1k ;;
66 *) 66 sh)
67 if is_enabled CPU_SH3; then
68 debarch=sh3$(if_enabled_echo CPU_BIG_ENDIAN eb)
69 elif is_enabled CPU_SH4; then
70 debarch=sh4$(if_enabled_echo CPU_BIG_ENDIAN eb)
71 fi
72 ;;
73 esac
74 if [ -z "$debarch" ]; then
67 debarch=$(dpkg-architecture -qDEB_HOST_ARCH) 75 debarch=$(dpkg-architecture -qDEB_HOST_ARCH)
68 echo "" >&2 76 echo "" >&2
69 echo "** ** ** WARNING ** ** **" >&2 77 echo "** ** ** WARNING ** ** **" >&2
@@ -73,8 +81,7 @@ set_debarch() {
73 echo "Falling back to the current host architecture ($debarch)." >&2 81 echo "Falling back to the current host architecture ($debarch)." >&2
74 echo "Please add support for $UTS_MACHINE to ${0} ..." >&2 82 echo "Please add support for $UTS_MACHINE to ${0} ..." >&2
75 echo "" >&2 83 echo "" >&2
76 ;; 84 fi
77 esac
78} 85}
79 86
80# Some variables and settings used throughout the script 87# Some variables and settings used throughout the script