[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532 Eric Botcazou changed: What|Removed |Added CC||aaro.koskinen at iki dot fi --- Comment #13 from Eric Botcazou --- *** Bug 67899 has been marked as a duplicate of this bug. ***
[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532 --- Comment #11 from Eric Botcazou --- Author: ebotcazou Date: Thu Jun 29 18:26:45 2017 New Revision: 249807 URL: https://gcc.gnu.org/viewcvs?rev=249807&root=gcc&view=rev Log: Backport from mainline 2017-01-10 James Clarke PR sanitizer/78992 * sanitizer_common/sanitizer_platform_limits_posix.h (struct __sanitizer_sigaction): Cherry-pick upstream r291561. 2016-11-30 Maxim Ostapenko PR sanitizer/78532 * sanitizer_common/sanitizer_platform_limits_posix.h (__sanitizer_sigaction): Adjust for sparc targets and various Glibc versions. Modified: branches/gcc-6-branch/libsanitizer/ChangeLog branches/gcc-6-branch/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532 --- Comment #12 from Eric Botcazou --- Author: ebotcazou Date: Thu Jun 29 18:57:47 2017 New Revision: 249808 URL: https://gcc.gnu.org/viewcvs?rev=249808&root=gcc&view=rev Log: Backport from mainline 2017-01-10 James Clarke PR sanitizer/78992 * sanitizer_common/sanitizer_platform_limits_posix.h (struct __sanitizer_sigaction): Cherry-pick upstream r291561. 2016-11-30 Maxim Ostapenko PR sanitizer/78532 * sanitizer_common/sanitizer_platform_limits_posix.h (__sanitizer_sigaction): Adjust for sparc targets and various Glibc versions. Modified: branches/gcc-5-branch/libsanitizer/ChangeLog branches/gcc-5-branch/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532 Maxim Ostapenko changed: What|Removed |Added CC||m.ostapenko at samsung dot com --- Comment #1 from Maxim Ostapenko --- Could you provide more details: Glibc and kernel headers version?
[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532 --- Comment #2 from Matthias Klose --- glibc 2.24 and linux 4.8.7.
[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532 --- Comment #3 from Maxim Ostapenko --- (In reply to Matthias Klose from comment #2) > glibc 2.24 and linux 4.8.7. Could you also share how you configure Glibc? Do you use native or cross build? I'm asking because Glibc 2.24 fails to build for me with: sparc64-linux-gcc -shared -static-libgcc -Wl,-O1 -Wl,-z,defs -Wl,-dynamic-linker=/opt/cross/sparc//sparc64-linux/lib/ld-linux.so.2 -B/home/max/build/sparc/glibc/csu/ -Wl,--version-script=/home/max/build/sparc/glibc/libresolv.map -Wl,-soname=libresolv.so.2 -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -L/home/max/build/sparc/glibc -L/home/max/build/sparc/glibc/math -L/home/max/build/sparc/glibc/elf -L/home/max/build/sparc/glibc/dlfcn -L/home/max/build/sparc/glibc/nss -L/home/max/build/sparc/glibc/nis -L/home/max/build/sparc/glibc/rt -L/home/max/build/sparc/glibc/resolv -L/home/max/build/sparc/glibc/crypt -L/home/max/build/sparc/glibc/mathvec -L/home/max/build/sparc/glibc/nptl -Wl,-rpath-link=/home/max/build/sparc/glibc:/home/max/build/sparc/glibc/math:/home/max/build/sparc/glibc/elf:/home/max/build/sparc/glibc/dlfcn:/home/max/build/sparc/glibc/nss:/home/max/build/sparc/glibc/nis:/home/max/build/sparc/glibc/rt:/home/max/build/sparc/glibc/resolv:/home/max/build/sparc/glibc/crypt:/home/max/build/sparc/glibc/mathvec:/home/max/build/sparc/glibc/nptl -o /home/max/build/sparc/glibc/resolv/libresolv.so -T /home/max/build/sparc/glibc/shlib.lds /home/max/build/sparc/glibc/csu/abi-note.o -Wl,--whole-archive /home/max/build/sparc/glibc/resolv/libresolv_pic.a -Wl,--no-whole-archive -Wl,--start-group /home/max/build/sparc/glibc/libc.so /home/max/build/sparc/glibc/libc_nonshared.a -Wl,--as-needed /home/max/build/sparc/glibc/elf/ld.so -Wl,--no-as-needed -Wl,--end-group /home/max/build/sparc/glibc/resolv/libresolv_pic.a(ns_print.os): In function `__GI_ns_sprintrrf': /home/max/src/glibc/resolv/ns_print.c:99: undefined reference to `__stack_chk_guard' /home/max/src/glibc/resolv/ns_print.c:99: undefined reference to `__stack_chk_guard' /home/max/src/glibc/resolv/ns_print.c:99: undefined reference to `__stack_chk_guard' /home/max/src/glibc/resolv/ns_print.c:728: undefined reference to `__stack_chk_guard' /home/max/src/glibc/resolv/ns_print.c:728: undefined reference to `__stack_chk_guard'
[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532 --- Comment #4 from Matthias Klose --- using the glibc build from Debian unstable, build logs at https://buildd.debian.org/status/package.php?p=glibc see https://buildd.debian.org/status/logs.php?pkg=glibc&arch=sparc64 for the last successful build.
[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532 --- Comment #5 from joseph at codesourcery dot com --- On Tue, 29 Nov 2016, m.ostapenko at samsung dot com wrote: > /home/max/src/glibc/resolv/ns_print.c:99: undefined reference to > `__stack_chk_guard' You get this if glibc and GCC have mismatched stack checking configuration. To avoid that, use the --with-glibc-version= option when configuring a bootstrap GCC to be used to build glibc. Mainline glibc's build-many-glibcs.py knows how to configure GCC and glibc for building many different configurations. It uses --disable-libsanitizer, but if libsanitizer is meant to work for all glibc configurations you could try removing it (adding it back for the initial bootstrap GCC only) and seeing what libsanitizer problems it shows up.
[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532 --- Comment #6 from Maxim Ostapenko --- (In reply to jos...@codesourcery.com from comment #5) > On Tue, 29 Nov 2016, m.ostapenko at samsung dot com wrote: > > > /home/max/src/glibc/resolv/ns_print.c:99: undefined reference to > > `__stack_chk_guard' > > You get this if glibc and GCC have mismatched stack checking > configuration. To avoid that, use the --with-glibc-version= > option when configuring a bootstrap GCC to be used to build glibc. > > Mainline glibc's build-many-glibcs.py knows how to configure GCC and glibc > for building many different configurations. It uses > --disable-libsanitizer, but if libsanitizer is meant to work for all glibc > configurations you could try removing it (adding it back for the initial > bootstrap GCC only) and seeing what libsanitizer problems it shows up. Joseph, thank you for clarification. Anyway, the failure is confirmed. I suspect it was caused by this commit in Glibc: ommit a059d359d86130b5fa74e04a978c8523a0293f77 Author: David S. Miller Date: Tue Apr 22 17:47:12 2014 -0700 Fix sigaction conform test failures on sparc. * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h (struct sigaction): New struct member __glibc_reserved0, change type of sa_flags to int. diff --git a/ChangeLog b/ChangeLog index c3fa6e5..9319a31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-04-22 David S. Miller + + * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h + (struct sigaction): New struct member __glibc_reserved0, change + type of sa_flags to int. + 2014-04-22 Yufeng Zhang * stdlib/longlong.h (count_leading_zeros, count_trailing_zeros) diff --git a/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h b/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h index eaccf97..7a0ca7e 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h @@ -43,7 +43,8 @@ struct sigaction __sigset_t sa_mask; /* Special flags. */ -unsigned long sa_flags; +int __glibc_reserved0; +int sa_flags; /* Not used by Linux/Sparc yet. */ void (*sa_restorer) (void); First Glibc release I see the patch in is 2.20.
[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532 --- Comment #7 from Maxim Ostapenko --- Created attachment 40197 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40197&action=edit Fix Right. Attached patch fixes build error (perhaps all sparc stuff should go upstream, because I think we already have too many local fixes?).
[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532 --- Comment #8 from chefmax at gcc dot gnu.org --- Author: chefmax Date: Wed Nov 30 12:31:07 2016 New Revision: 243014 URL: https://gcc.gnu.org/viewcvs?rev=243014&root=gcc&view=rev Log: PR sanitizer/78532 * sanitizer_common/sanitizer_platform_limits_posix.h (__sanitizer_sigaction): Adjust for sparc targets and various Glibc versions. Modified: trunk/libsanitizer/ChangeLog trunk/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532 --- Comment #9 from chefmax at gcc dot gnu.org --- Author: chefmax Date: Wed Nov 30 12:32:55 2016 New Revision: 243016 URL: https://gcc.gnu.org/viewcvs?rev=243016&root=gcc&view=rev Log: Add PR sanitizer/78532 patch to libsanitizer/LOCAL_PATCHES. Modified: trunk/libsanitizer/ChangeLog trunk/libsanitizer/LOCAL_PATCHES
[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #10 from Jakub Jelinek --- Hopefuly fixed.
[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |7.0