Skip to content

Commit

Permalink
builddeb: Change architecture detection fallback to use dpkg-architec…
Browse files Browse the repository at this point in the history
…ture

We currently use dpkg --print-architecture, which reports the
architecture of the build machine.  We can make a better guess
than this by asking dpkg-architecture what the host architecture,
i.e. the default architecture for building packages, is.  This is
sensitive to environment variables such as CC and DEB_HOST_ARCH,
which should already be set in a cross-build environment.

Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
bwhacks authored and masahir0y committed Jul 28, 2018
1 parent f2abcc1 commit 091d30a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/package/mkdebian
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ set_debarch() {
fi
;;
*)
debarch=$(dpkg --print-architecture)
debarch=$(dpkg-architecture -qDEB_HOST_ARCH)
echo "" >&2
echo "** ** ** WARNING ** ** **" >&2
echo "" >&2
echo "Your architecture doesn't have its equivalent" >&2
echo "Debian userspace architecture defined!" >&2
echo "Falling back to using your current userspace instead!" >&2
echo "Falling back to the current host architecture ($debarch)." >&2
echo "Please add support for $UTS_MACHINE to ${0} ..." >&2
echo "" >&2
;;
Expand Down

0 comments on commit 091d30a

Please sign in to comment.