Commits (3)
......@@ -297,7 +297,7 @@ def kernel(ctx, build, vary):
if not vary:
_ = _.append_setup_exec_raw('SETARCH_ARCH=$(uname -m)')
else:
_ = _.append_setup_exec_raw('SETARCH_ARCH=$(setarch --list)')
_ = _.append_setup_exec_raw('SETARCH_ARCH=$(for a in $(setarch --list); do setarch $a true && echo $a || true; done)')
# Perform realistic shuffling of architectures depending
# on the bitness of application.
# 64-bit binaries can NOT be executed on 32-bit CPU,
......@@ -309,7 +309,7 @@ def kernel(ctx, build, vary):
_ = _.append_setup_exec_raw('WORDSIZE={}'.format(struct.calcsize("P")*8))
_ = _.append_setup_exec_raw('if [ $WORDSIZE -eq 64 ]; then \
for _ARCH_TO_DROP in armh armv7b armv7l \
armv8b armv8l arm athlon ia64 i386 i486 \
armv8b armv8l arm athlon i386 i486 \
i586 i686 linux32 mips32 mips parisc32 \
parisc ppc32le ppc32 ppcle ppc s390 \
sparc32bash sparc32 sparc; \
......@@ -317,7 +317,7 @@ def kernel(ctx, build, vary):
DROP_ARCH="$DROP_ARCH -e ^$_ARCH_TO_DROP\$"; \
done; \
fi')
_ = _.append_setup_exec_raw('SETARCH_ARCH=$(echo "$SETARCH_ARCH" | grep $DROP_ARCH | shuf | head -n1)')
_ = _.append_setup_exec_raw('SETARCH_ARCH=$(echo "$SETARCH_ARCH" | grep $DROP_ARCH | shuf -n1)')
_ = _.append_setup_exec_raw('KERNEL_VERSION=$(uname -r)')
_ = _.append_setup_exec_raw('if [ ${KERNEL_VERSION#2.6} = $KERNEL_VERSION ]; then SETARCH_OPTS=--uname-2.6; fi')
if ctx.verbosity >= 1:
......