diff options
Diffstat (limited to 'gcc/configure')
-rwxr-xr-x | gcc/configure | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/configure b/gcc/configure index 1696595..776b062 100755 --- a/gcc/configure +++ b/gcc/configure @@ -27864,6 +27864,35 @@ if test $gcc_cv_as_tls = yes; then fi fi +case $target_os in + win32 | pe | cygwin* | mingw32*) + if test $set_have_as_tls = yes; then + # Hack to check whether ld breaks on @secrel32 for Windows + if test $in_tree_ld = yes; then + if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 44 -o "$gcc_cv_gld_major_version" -gt 2; then + : # ld support for @secrel32 was fixed in this version + else + as_fn_error $? "ld version is known to have broken secrel32 relocations, configure without --enable-tls or with --disable-tls to remove this error. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80881 for more information." "$LINENO" 5 + fi + elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x; then + echo '.text' > conftest.s + echo 'foo: nop' >> conftest.s + echo '.data' >> conftest.s + echo '.secrel32 foo' >> conftest.s + if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 && $gcc_cv_ld -o conftest.exe conftest.o > /dev/null; then + if $gcc_cv_objdump -h conftest.exe | grep '\.reloc\>' > /dev/null; then + as_fn_error $? "ld has broken secrel32 relocations, configure without --enable-tls or with --disable-tls to remove this error. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80881 for more information." "$LINENO" 5 + fi + else + as_fn_error $? "Error occurred while checking for broken secrel32 relocations. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80881 for more information." "$LINENO" 5 + fi + rm -f conftest.s conftest.o conftest.exe + else + as_fn_error $? "Cannot check for broken secrel32 relocations to determine --enable-tls support. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80881 for more information." "$LINENO" 5 + fi + fi + ;; +esac if test $set_have_as_tls = yes ; then $as_echo "#define HAVE_AS_TLS 1" >>confdefs.h |