#!/bin/bash set -euo pipefail cp $PATCH_DIR/*.patch debian/patches/ cat << 'EOF' >> debian/patches/series fix_int128.patch fix_atomic.patch EOF patch --no-backup-if-mismatch -p1 <<'PATCH' --- a/debian/rules +++ b/debian/rules @@ -20,6 +20,11 @@ %: dh $@ +ifneq (,$(filter $(DEB_HOST_ARCH), armel m68k mips mipsel powerpc powerpcspe sh4)) +override_dh_auto_build: + dh_auto_build -- CXX="g++ -Wl,--no-as-needed -latomic -Wl,--as-needed" +endif + ### When overriding auto_test make sure DEB_BUILD_OPTIONS will be respected #override_dh_auto_test: #ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) PATCH