summaryrefslogtreecommitdiff
path: root/Mk/Scripts/qa.sh
diff options
context:
space:
mode:
Diffstat (limited to 'Mk/Scripts/qa.sh')
-rw-r--r--Mk/Scripts/qa.sh28
1 files changed, 27 insertions, 1 deletions
diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh
index 024fce7e8fa7..ea6128b9bf8b 100644
--- a/Mk/Scripts/qa.sh
+++ b/Mk/Scripts/qa.sh
@@ -797,9 +797,35 @@ perlcore() {
fi
}
+no_arch() {
+ [ -z "$NO_ARCH" ] && return
+ rc=0
+ while read f; do
+ [ -z "$f" ] && continue
+ if [ -n "$NO_ARCH_IGNORE" ]; then
+ skip=
+ for blacklist in $NO_ARCH_IGNORE; do
+ case $f in
+ *$blacklist) skip=1; break;;
+ esac
+ done
+ [ "$skip" ] && continue
+ fi
+ err "'${f#.}' is a architecture specific binary file and you have set NO_ARCH. Either remove NO_ARCH or add '$(basename $f)' to NO_ARCH_IGNORE."
+ rc=1
+ done <<-EOF
+ $(list_stagedir_elfs \
+ | file -F $'\1' -f - -N \
+ | grep -aE 'ELF .* [LM]SB .*, .*, version [0-9]+ \(FreeBSD\)' \
+ | cut -f 1 -d $'\1')
+ EOF
+ return $rc
+}
+
+
checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo"
checks="$checks suidfiles libtool libperl prefixvar baselibs terminfo"
-checks="$checks proxydeps sonames perlcore"
+checks="$checks proxydeps sonames perlcore no_arch"
ret=0
cd ${STAGEDIR}