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

Bug#1023554: glibc: Please build with "--disable-default-pie" on sh3 and sh4 to workaround glibc bug



Source: glibc
Version: 2.36-4
Severity: normal
User: debian-superh@lists.debian.org
Usertags: sh3 sh4
X-Debbugs-Cc: debian-superh@lists.debian.org,helmutg@debian.org

Hello!

Similar to sparc64, sh3 and sh4 are affected by the upstream bug #29575 [1]
which breaks static builds. This is visible on sh4 when the static busybox
binary is being linked which fails with [2]:

(...)
/usr/bin/ld: /usr/lib/gcc/sh4-linux-gnu/12/../../../sh4-linux-gnu/libc.a(kill.o)(.text+0x3a): unexpected instruction 0XA005 (expected 0xd0??: mov.l)
/usr/bin/ld: /usr/lib/gcc/sh4-linux-gnu/12/../../../sh4-linux-gnu/libc.a(kill.o)(.text+0x3c): unexpected instruction 0XE0FF (expected 0x0?12: stc)
/usr/bin/ld: /usr/lib/gcc/sh4-linux-gnu/12/../../../sh4-linux-gnu/libc.a(kill.o)(.text+0x3e): unexpected instruction 0X09 (expected 0x0?ce: mov.l)
/usr/bin/ld: /usr/lib/gcc/sh4-linux-gnu/12/../../../sh4-linux-gnu/libc.a(uname.o)(.text+0x3a): unexpected instruction 0XA005 (expected 0xd0??: mov.l)
/usr/bin/ld: /usr/lib/gcc/sh4-linux-gnu/12/../../../sh4-linux-gnu/libc.a(uname.o)(.text+0x3c): unexpected instruction 0XE0FF (expected 0x0?12: stc)
/usr/bin/ld: /usr/lib/gcc/sh4-linux-gnu/12/../../../sh4-linux-gnu/libc.a(uname.o)(.text+0x3e): unexpected instruction 0X09 (expected 0x0?ce: mov.l)
/usr/bin/ld: /usr/lib/gcc/sh4-linux-gnu/12/../../../sh4-linux-gnu/libc.a(alarm.o)(.text+0x3a): unexpected instruction 0XA005 (expected 0xd0??: mov.l)
/usr/bin/ld: /usr/lib/gcc/sh4-linux-gnu/12/../../../sh4-linux-gnu/libc.a(alarm.o)(.text+0x3c): unexpected instruction 0XE0FF (expected 0x0?12: stc)
/usr/bin/ld: /usr/lib/gcc/sh4-linux-gnu/12/../../../sh4-linux-gnu/libc.a(alarm.o)(.text+0x3e): unexpected instruction 0X09 (expected 0x0?ce: mov.l)
/usr/bin/ld: /usr/lib/gcc/sh4-linux-gnu/12/../../../sh4-linux-gnu/libc.a(vfork.o)(.text+0x26): unexpected instruction 0XA005 (expected 0xd0??: mov.l)
(...)

Adding

	extra_config_options = --disable-default-pie

to debian/sysdeps/sh4.mk fixed the problem for me. On sh3, the change should be
incorporated as well since sh3 is being bootstrapped regularly in Helmut Grohne's
rebootstrap project where this issue has shown as well.

Thanks,
Adrian

> [1] https://sourceware.org/bugzilla/show_bug.cgi?id=29575
> [2] https://buildd.debian.org/status/fetch.php?pkg=busybox&arch=sh4&ver=1%3A1.35.0-4&stamp=1667730661&raw=0

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Reply to: