Enable mudflaps for Solaris _IF_ gcc is configured to use GNU's ld .

Here is the final result:

# make check
...
                === libmudflap Summary ===
# of expected passes            1131
# of unexpected failures        293


I am running i386-pc-solaris2.11 (OpenSolaris 2008.11) and configured the
trunk like this:

# /usr/local/bin/gcc -v
Using built-in specs.
Target: i386-pc-solaris2.11
Configured with: ../gcc_trunk/configure
--enable-languages=ada,c,c++,fortran,java,objc,obj-c++ --enable-shared
--disable-static --enable-decimal-float --enable-nls --without-system-libunwind
--with-gnu-as --with-as=/usr/local/bin/as --with-gnu-ld
--with-ld=/usr/local/bin/ld
Thread model: posix
gcc version 4.4.0 20090104 (experimental) (GCC) 

# /usr/local/bin/ld -v
GNU ld (GNU Binutils) 2.19

# /usr/local/bin/as -v
GNU assembler version 2.19 (i386-pc-solaris2.11) using BFD version (GNU
Binutils) 2.19


I modified "gcc_build/i386-pc-solaris2.11/libmudflap/Makefile" to add
"-lsocket" to LIBS which allows most of the tests to work. This was not
necessary for any other testsuites, they worked as-is.

# LIBS = -ldl 
LIBS = -ldl -lsocket



Some of the "unexpected failures" are simple compilation errors in the
tests which, when fixed, will likely become "expected passes". Example:
...
output is:
/usr/share/src/gcc_trunk/libmudflap/testsuite/libmudflap.c/pass47-frag.c:10:
warning: mudflap cannot track unknown size extern '__ctype'
_or_
Excess errors:
/usr/share/src/gcc_trunk/libmudflap/testsuite/libmudflap.c/pass-stratcliff.c:261:
error: invalid operands to binary - (have 'int' and 'char *')
/usr/share/src/gcc_trunk/libmudflap/testsuite/libmudflap.c/pass-stratcliff.c:281:
error: invalid operands to binary - (have 'int' and 'char *')
/usr/share/src/gcc_trunk/libmudflap/testsuite/libmudflap.c/pass-stratcliff.c:309:
warning: comparison between pointer and integer
...

A few of the "unexpected failures" are only in the "execution test" and
are the result of a Segmentation Fault. For the most part it is working.


The root configure script needs to be modified to allow mudflaps on this
platform _IF_ gcc is configured to use GNU ld (usually it does not) and
there needs a bit of fixing in the Makefile of libmudflap's testsuite.

Thanks,
Rob


-- 
           Summary: gcc 4.4.0 20090104 - OpenSolaris can enable libmudflaps
                    (if gcc is configured to use GNU ld)
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: libmudflap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rob1weld at aol dot com
 GCC build triplet: i386-pc-solaris2.11
  GCC host triplet: i386-pc-solaris2.11
GCC target triplet: i386-pc-solaris2.11


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38738

Reply via email to