Skip to content

Commit

Permalink
builddeb: Add automatic support for sh{3,4}{,eb} architectures
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bwhacks authored and masahir0y committed Jul 28, 2018
1 parent 75ebcee commit 79a85b5
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions scripts/package/mkdebian
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 79a85b5

Please sign in to comment.