aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/package/builddeb
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/package/builddeb')
-rwxr-xr-xscripts/package/builddeb7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index b03dd56a4782..c4c580f547ef 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -130,8 +130,13 @@ if is_enabled CONFIG_MODULES; then
fi
if [ "$ARCH" != "um" ]; then
- $MAKE -f $srctree/Makefile headers_check
+ $MAKE -f $srctree/Makefile headers
$MAKE -f $srctree/Makefile headers_install INSTALL_HDR_PATH="$libc_headers_dir/usr"
+ # move asm headers to /usr/include/<libc-machine>/asm to match the structure
+ # used by Debian-based distros (to support multi-arch)
+ host_arch=$(dpkg-architecture -a$(cat debian/arch) -qDEB_HOST_MULTIARCH)
+ mkdir $libc_headers_dir/usr/include/$host_arch
+ mv $libc_headers_dir/usr/include/asm $libc_headers_dir/usr/include/$host_arch/
fi
# Install the maintainer scripts