glibc fails the preinst checks (specifically /usr/bin/cal segfaults on exit) when it is built with binutils-2.25.1. I confirmed that this behavior occurs with glibc 2.19-r1, 2.20-r2, and 2.21-r1, and that binutils-2.24-r3 is successful in building a working glibc. The segfault happens in __call_tls_dtors. The $URL contains a link to the equivalent Debian bug report. We should hard mask affected binutils versions on alpha.
have you tried 2.25 ? i'm pretty sure my chroot built & runs glibc-2.20 fine w/gcc-5.1.0 and binutils-2.25 ...
yeah, i've verified that 2.25.1 causes a bad build, but 2.25 works fine. should make bisecting faster.
i've reduced the glibc build down to two steps -- creation of libc_pic.os and the final libc.so link. switching between 2.25 & 2.25.1 shows the issue.
looks like it's due to this commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=53df40a43c968f4d97754226d62775d1fe665459 newer git also allows backends to disable the sorting: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=28dbcedc7b1282b93c3f25c4e42ae71b44e8e2a8 if we disable the sort for alpha, it fixes things. will have to take upstream to figure out whether we want to disable it for alpha all the time, or if an adjustment in glibc would help out.
moved upstream here: https://sourceware.org/bugzilla/show_bug.cgi?id=18867 we can let the binutils/glibc guys debate the right route to go.
Thanks a lot vapier. I wasn't intending for you do to the legwork, but I very much appreciate it!
i've cherry picked the upstream fixes into our 2.25.1-r1: http://sources.gentoo.org/gentoo/src/patchsets/binutils/2.25.1/50_all_binutils-2.25-stable-sort-for-ld-r-relocs.patch?rev=1.1 http://sources.gentoo.org/gentoo/src/patchsets/binutils/2.25.1/51_all_binutils-2.25-dont-sort-ld-r-output-relocs-on-alpha.patch?rev=1.1 http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=382d7466757de7f746e19d72844bfaa86de0a197