#!/bin/bash set -euo pipefail cp $PATCH_DIR/*.diff debian/patches/mips/ patch --no-backup-if-mismatch -p1 <<'PATCH' --- a/debian/patches/series +++ b/debian/patches/series @@ -65,6 +65,7 @@ m68k/local-reloc.diff mips/submitted-rld_map.diff +mips/brcm-memcpy.diff powerpc/local-powerpc8xx-dcbz.diff --- a/debian/debhelper.in/libc.preinst +++ b/debian/debhelper.in/libc.preinst @@ -61,6 +61,11 @@ # sanity checking for the appropriate kernel on each architecture. kernel_ver=`uname -r` case ${DPKG_MAINTSCRIPT_ARCH} in + mips|mipsel) + # Drop older kernels with required RWE stack + kernel_ver_min=4.8 + kernel_ver_rec=4.8 + ;; *) # The GNU libc requires a >= 3.2 kernel, found in wheezy kernel_ver_min=3.2 --- a/debian/sysdeps/linux.mk +++ b/debian/sysdeps/linux.mk @@ -4,6 +4,11 @@ MIN_KERNEL_SUPPORTED := 3.2 libc = libc6 +# Disable RWE stack build need for older linux +ifneq (,$(filter $(DEB_HOST_ARCH),mips mipsel)) + libc_MIN_KERNEL_SUPPORTED := 4.8 +endif + # Do not build pt_chown on this platform pt_chown = no # Expect pldd on this platform PATCH