David Miller <da...@davemloft.net> writes:

> From: Rainer Orth <r...@cebitec.uni-bielefeld.de>
> Date: Mon, 11 Apr 2011 14:57:58 +0200
>
>> The follwing patch uses the easy way out and just tests ld_ver.  Tested
>> with make configure-gcc on sparc-sun-solaris2.11 with Sun as/ld, GNU
>> as/Sun ld, and GNU as/ld without change to gcc/auto-host.h and no linker
>> error.
>
> Just out of curiosity, do the Sun tools pass the GOTDATA_OP test?

It depends:

                as/ld   gas/ld  gas/gld
Solaris 8       no      no      yes
Solaris 9       no      no      yes
Solaris 10      yes     no      yes
Solaris 11      yes     yes     yes

On Solaris 8 and 9, as fails to assemble the testcase, with gas, ld
SEGVs when linking.

On Solaris 10, as assembles the test just fine, but ld cannot deal with
gas 2.21 output:

ld: fatal: relocation error: R_SPARC_GOTDATA_HIX22: file gotdata.o: symbol 
<unknown>: offset 0xff370163 is non-aligned
ld: fatal: relocation error: R_SPARC_GOTDATA_LOX10: file gotdata.o: symbol 
<unknown>: offset 0xff370167 is non-aligned
ld: fatal: file gotdata: creation interrupted: Error 0

On Solaris 11, all is fine.

I get the same results with an unmodifed tree and the following
simplified version of my patch.

Ok for mainline?

        Rainer


2011-04-09  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

        * configure.ac (gcc_cv_as_sparc_gotdata_op): Remove GNU ld check.
        * configure: Regenerate.

diff --git a/gcc/configure.ac b/gcc/configure.ac
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3305,17 +3305,13 @@ bar:
        ld    [[%l7 + %g1]], %g2, %gdop(foo)],
       [if test x$gcc_cv_ld != x \
        && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
-         if $gcc_cv_ld -v | grep GNU >/dev/null 2>&1; then
-           if test x$gcc_cv_objdump != x; then
-             if $gcc_cv_objdump -s -j .text conftest 2> /dev/null \
-                | grep ' 03000004 82186004 c405c001'> /dev/null 2>&1; then
+         if test x$gcc_cv_objdump != x; then
+           if $gcc_cv_objdump -s -j .text conftest 2> /dev/null \
+              | grep ' 03000004 82186004 c405c001'> /dev/null 2>&1; then
               gcc_cv_as_sparc_gotdata_op=no
-             else
+           else
               gcc_cv_as_sparc_gotdata_op=yes
-             fi
            fi
-         else
-          gcc_cv_as_sparc_gotdata_op=yes
          fi
        fi
        rm -f conftest],

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to