Skip to content
Snippets Groups Projects
Commit 79a85b55 authored by Ben Hutchings's avatar Ben Hutchings Committed by Masahiro Yamada
Browse files

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: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 75ebcee7
No related branches found
No related tags found
No related merge requests found
...@@ -63,7 +63,15 @@ set_debarch() { ...@@ -63,7 +63,15 @@ set_debarch() {
;; ;;
openrisc) openrisc)
debarch=or1k ;; 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) debarch=$(dpkg-architecture -qDEB_HOST_ARCH)
echo "" >&2 echo "" >&2
echo "** ** ** WARNING ** ** **" >&2 echo "** ** ** WARNING ** ** **" >&2
...@@ -73,8 +81,7 @@ set_debarch() { ...@@ -73,8 +81,7 @@ set_debarch() {
echo "Falling back to the current host architecture ($debarch)." >&2 echo "Falling back to the current host architecture ($debarch)." >&2
echo "Please add support for $UTS_MACHINE to ${0} ..." >&2 echo "Please add support for $UTS_MACHINE to ${0} ..." >&2
echo "" >&2 echo "" >&2
;; fi
esac
} }
# Some variables and settings used throughout the script # Some variables and settings used throughout the script
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment