gcc-4.0.2/gcc/configure, line 13879: sh-*-* | sh[34]-*-*) ... tls_first_major=2 tls_first_minor=13 tls_as_opt=--fatal-warnings ;;
note that this case doesn't consider the possibilities of sh[34]eb for big-endian architectures and so fails to set the variable tls_first_major, among others. this causes all kinds of grief further down in that script, line 13956: if test -z "$tls_first_major"; then : # If we don't have a check, assume no support. else echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6 ... note that, since $tls_first_major is unset, there is no check for thread-local storage support in the big-endian case, even if you've configured for NPTL support. at a minimum, that case should add the pattern "sh[34]eb-*-*" and perhaps several more variations, but i don't know all of those possibilities. at the very least, i would add that pattern above to fix the case of building for big-endian and NPTL on sh3 and sh4. -- Summary: gcc/configure doesn't handle all possible SH architectures Product: gcc Version: 4.0.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rpjday at mindspring dot com GCC host triplet: i686-unknown-linux GCC target triplet: sh3eb-unknown-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836