Hello,
Since Buildroot 2021.02 [1] an upstream gcc commit is reverted to allow booting
the qemu_sparc_ss10_defconfig. The revert must be applied for gcc 8.4, 9.3 and
10.2 and any newer version.
upstream gcc commit:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0a83f1a441d7aaadecb368c237b6e…
The commit has been introduced to fix the following bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92095
The regression has been reported to gcc [2] but the gcc change may affect the
ldso code or how the GOT register is handled with fPIC in uClibc-ng.
This part of the code seems fPIC friendly, it can be worse with the new default
BR2_PIC_PIE option. So I would drop the sparc support while adding gcc 11 to
avoid carrying non upstream patch forever in gcc package.
There is no problem for the sparc64 with a glibc toolchain (sparc64 for
uClibc-ng is not currently available in Buildroot)
Help welcome.
Best regards,
Romain
[1]
https://git.buildroot.net/buildroot/commit/?id=4d16e6f5324f0285f51bfbb5a350…
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98784
This is the 4th iteration of the patch.
Changes wrt v3:
* add #ifdef __PIC__ test in ldso startup code, to be sure, even though I'm pretty sure this piece of code is always built as PIC.
Changes wrt v2:
* more precise description of the problem.
* only set r30 in PIC+secureplt case as it seems indeed to be the only case which causes problem. Secureplt without PIC does not need r30.
* don't rely on uclibc being already built: now we check for secure-plt by doing $(CC) --verbose and searching for the ./configure parameters of GCC for "--enable-secureplt".
Yann Sionneau (1):
powerpc: fix PIE/PIC builds with newer gcc/binutils which use
secureplt by default
Rules.mak | 3 ++-
ldso/ldso/powerpc/dl-startup.h | 3 +++
libc/sysdeps/linux/powerpc/crt1.S | 4 ++++
3 files changed, 9 insertions(+), 1 deletion(-)
--
2.25.1