This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: remove the "tile" architecture from glibc

On 01/02/2018 11:49, Joseph Myers wrote:
> On Thu, 1 Feb 2018, Adhemerval Zanella wrote:
>> Trying to build/run glibc testsuite against sh4 own toolchain I am facing
>> an build issue for some tests:
>> ---
>> gcc -nostdlib -nostartfiles -o /home/azanella/glibc/glibc-git-build/assert/tst-assert-c++    -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both /home/azanella/glibc/glibc-git-build/csu/crt1.o /home/azanella/glibc/glibc-git-build/csu/crti.o `gcc  --print-file-name=crtbegin.o` /home/azanella/glibc/glibc-git-build/assert/tst-assert-c++.o /home/azanella/glibc/glibc-git-build/support/libsupport_nonshared.a -lstdc++ -Wl,-dynamic-linker=/lib/ -Wl,-rpath-link=/home/azanella/glibc/glibc-git-build:/home/azanella/glibc/glibc-git-build/math:/home/azanella/glibc/glibc-git-build/elf:/home/azanella/glibc/glibc-git-build/dlfcn:/home/azanella/glibc/glibc-git-build/nss:/home/azanella/glibc/glibc-git-build/nis:/home/azanella/glibc/glibc-git-build/rt:/home/azanella/glibc/glibc-git-build/resolv:/home/azanella/glibc/glibc-git-build/crypt:/home/azanella/glibc/glibc-git-build/mathvec:/home/azanella/glibc/glibc-git-build/support:/home/azanella/glibc/glibc-git-build/nptl /home/azanella/glibc/glibc-git-build/ /home/azanella/glibc/glibc-git-build/libc_nonshared.a -Wl,--as-needed /home/azanella/glibc/glibc-git-build/elf/ -Wl,--no-as-needed -lgcc -Wl,--as-needed -lgcc_s  -Wl,--no-as-needed `gcc  --print-file-name=crtend.o` /home/azanella/glibc/glibc-git-build/csu/crtn.o
>> /usr/lib/gcc/sh4-linux-gnu/7/ undefined reference to `__fpscr_values@GLIBC_2.2'
>> collect2: error: ld returned 1 exit status
> I think some distributions have a local glibc patch related to 
> __fpscr_values, so a newly built glibc may be ABI-incompatible with 
> binaries built against such a patched glibc.  (The use of __fpscr_values 
> is fundamentally flawed, but that was supposed to be fixed for GCC 5 - see 
> <> and its duplicate 
> <>.)

I do think it is the case, checking the debian package addendum from libc6-dev [1]
I noted it indeed adds this patch:

$ cat local-fpcscr_values.diff
--- a/sysdeps/unix/sysv/linux/sh/sysdep.S
+++ b/sysdeps/unix/sysv/linux/sh/sysdep.S
@@ -30,3 +30,14 @@

 #define __syscall_error __syscall_error_1
 #include <sysdeps/unix/sh/sysdep.S>
+       .data
+       .align 3
+       .globl ___fpscr_values
+       .type ___fpscr_values, @object
+       .size ___fpscr_values, 8
+       .long 0
+       .long 0x80000
+weak_alias (___fpscr_values, __fpscr_values)
--- a/sysdeps/unix/sysv/linux/sh/Versions
+++ b/sysdeps/unix/sysv/linux/sh/Versions
@@ -2,6 +2,7 @@
   GLIBC_2.2 {
     # functions used in other libraries
     __xstat64; __fxstat64; __lxstat64;
+    __fpscr_values;
     # a*
--- a/sysdeps/unix/sysv/linux/sh/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/libc.abilist
@@ -267,6 +267,7 @@
 GLIBC_2.2 __flbf F
 GLIBC_2.2 __fork F
 GLIBC_2.2 __fpending F
+GLIBC_2.2 __fpscr_values D 0x8
 GLIBC_2.2 __fpu_control D 0x4
 GLIBC_2.2 __fpurge F
 GLIBC_2.2 __freadable F

I will check glibc with patch applied and try to rebuild a canadian cross to check
against a baseline toolchain.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]