Discussion:
Bug#1017537: armel buildd misconfiguration (was Re: Bug#1017537: dietlibc: FTBFS on armel)
(too old to reply)
Thorsten Glaser
2022-08-22 01:10:01 UTC
Permalink
outlook 1017537 some armel buildds are misconfigured and lack SWP emulation
thanks

Dixi quod=E2=80=A6
# if __ARM_ARCH__ < 6
=09swp=09r0, r1, [r2]
# else
And this, after some research, is it. This is needed for armel, which
is v5. Apparently, Linux has SWP emulation for v7/v8 hosts, but at least
one buildd listed does not have this enabled, breaking the armel ABI.

Please ensure that only hosts with working SWP emulation run armel.

(Can I reassign this bugreport to the buildd? Does it have a virtual
package in debbugs?)

Until then, I guess I=E2=80=99ll keep giveback=E2=80=99ing dietlibc on arme=
l until
it builds=E2=80=A6

bye,
//mirabilos
--=20
<cnuke> den AGP stecker anfeilen, damit er in den slot aufm 440BX board pas=
st=E2=80=A6
oder netzteile, an die man auch den monitor angeschlossen hat und die dann =
f=C3=BCr
ein elektrisch aufgeladenes geh=C3=A4use gesorgt haben [=E2=80=A6] f=C3=BCr=
lacher gut auf jeder
LAN party =E2=94=82 <nvb> damals, als der pizzateig noch auf dem monior "ge=
gangen" ist
Arnd Bergmann
2022-08-24 12:10:01 UTC
Permalink
Post by Thorsten Glaser
outlook 1017537 some armel buildds are misconfigured and lack SWP emulation
thanks
Dixi quod…
# if __ARM_ARCH__ < 6
swp r0, r1, [r2]
# else
And this, after some research, is it. This is needed for armel, which
is v5. Apparently, Linux has SWP emulation for v7/v8 hosts, but at least
one buildd listed does not have this enabled, breaking the armel ABI.
Please ensure that only hosts with working SWP emulation run armel.
(Can I reassign this bugreport to the buildd? Does it have a virtual
package in debbugs?)
For reference, the instruction is not avaialable on Armv7 but is emulated
on 32-bit kernels whenever CONFIG_SWP_EMULATE is enabled,
this is defined as:

config SWP_EMULATE
bool "Emulate SWP/SWPB instructions" if !SMP
depends on CPU_V7
default y if SMP
select HAVE_PROC_CPU if PROC_FS

so this is enabled on all SMP-enabled kernels but can be disabled
on uniprocessor Armv7 builds, which would be broken here.

On 64-bit kernels, the same option is not enabled by default
in mainline kernels, so the kernel config needs to contain
CONFIG_COMPAT=y, ARMV8_DEPRECATED=y, and
CONFIG_SWP_EMULATION=y. This also has to be enabled
at runtime using the "abi.swp=1" sysctl, see
https://www.kernel.org/doc/Documentation/arm64/legacy_instructions.rst

Most likely, the buildd is running a default debian kernel and has
the compile-time options enabled, but has it disabled at runtime.

Can you find out if /proc/sys/abi/swp exists on the system, and
what its contents are? If it does not exist, fixing this requires
a change to the kernel configuration, if it exists but contains
'0', then running binaries with the swp instruction just requires
changing the local sysctl.conf for any armel buildd.

Loading...