package/uclibc: fix mips uclibc toolchain with gcc 10
authorRomain Naour <romain.naour@gmail.com>
Fri, 8 May 2020 17:31:52 +0000 (19:31 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 9 May 2020 10:15:33 +0000 (12:15 +0200)
commitba870e315762df1c5ccea0926cbea8d10fdd95e4
treeb707b9c50b0b85c5bf272c01baf86eb963ad35fd
parent7f59e2c01a78c99c933df49ee681cdd3e11f4b07
package/uclibc: fix mips uclibc toolchain with gcc 10

>From [1]
"GCC 10 (PR 91233) won't silently allow registers that are not architecturally
available to be present in the clobber list anymore, resulting in build failure
for mips*r6 targets in form of:
...
.../sysdep.h:146:2: error: the register ‘lo’ cannot be clobbered in ‘asm’ for the current target
  146 |  __asm__ volatile (      \
      |  ^~~~~~~

This is because base R6 ISA doesn't define hi and lo registers w/o DSP extension.
This patch provides the alternative definitions of __SYSCALL_CLOBBERS for r6
targets that won't include those registers."

Fixes:
https://gitlab.com/kubu93/buildroot/-/jobs/543923030

Note:
The kernel 5.4.35 fail to build later due to a similar issue while
building lib/vdso/gettimeofday.c [2]. The issue is still present in kernel
5.7-rc4.

[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=020b2a97bb15f807c0482f0faee2184ed05bcad8
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/mips/include/asm/vdso/gettimeofday.h?h=v5.7-rc4#n38

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/uclibc/0001-mips-Do-not-include-hi-and-lo-in-__SYSCALL_CLOBBERS-.patch [new file with mode: 0644]