[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

alpha toolchain broken for static builds in bookworm?



Hi,

While updating QEMU's debian-all-test-cross docker image to bookworm I
found "check-tcg" broke for alpha. The docker image is essentially a
slim debian image with minimal qemu build deps and all the cross
compilers Debian packages that support a QEMU guest.

Digging into the failure it was pretty early on in start-up code:

  (gdb) x/5i $pc
  => 0x12003e370 <__ctype_init+48>:       ldq     t0,0(t0)
     0x12003e374 <__ctype_init+52>:       ldq     t4,56(t0)
     0x12003e378 <__ctype_init+56>:       ldq     t2,64(t0)
     0x12003e37c <__ctype_init+60>:       ldq     t0,80(t0)
     0x12003e380 <__ctype_init+64>:       lda     t4,256(t4)
  (gdb) p/x $t0
  $1 = 0x0

which looks like TLS is very broken on static builds. Chatting with
Peter and Adhemerval pointed me to:

  https://lists.debian.org/debian-alpha/2023/01/msg00020.html

which has been merged into glibc. However I can't work out if its in the
bookwork packages. I suspect not because I ran a test where I bumped
debian-all-test-cross to trixie (which ships 2.37-3cross1) and alpha
passes check-tcg. However I'm not sure how to navigate the
cross-toolchain-base-ports-62 to work out if the fix is in. The upstream
doesn't have any stable release tags beyond glibc-2.36.

In the release/2.36/master branch the fix is:

  d5aaece8a3 elf: Fix GL(dl_phdr) and GL(dl_phnum) for static builds [BZ #29864]

So to summarise:

  - what does Debian's 2.36-8cross1 map to on the release branch?
  - if it doesn't include the above commit can we get a newer release
    with a fix?

Thanks,

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


Reply to: