[boehm-gc] Fix gnu11 fallout on SPARC

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Wed Oct 22 15:05:00 GMT 2014


A couple of boehm-gc testcases are FAILing on Solaris/SPARC due to the
recent gnu11 changes:

FAIL: boehm-gc.c/gctest.c -O2 (test for excess errors)
FAIL: boehm-gc.c/thread_leak_test.c -O2 (test for excess errors)
FAIL: boehm-gc.lib/staticrootslib.c -O2 (test for excess errors)

All of them are instances of same issue:


/vol/gcc/src/hg/trunk/local/boehm-gc/testsuite/../include/gc.h:1020:31: warning: type defaults to 'int' in declaration of 'end' [-Wimplicit-int]
 #   define GC_INIT() { extern end, etext; \
                               ^
     GC_INIT();
     ^
/vol/gcc/src/hg/trunk/local/boehm-gc/testsuite/../include/gc.h:1020:36: warning: type defaults to 'int' in declaration of 'etext' [-Wimplicit-int]
 #   define GC_INIT() { extern end, etext; \
                                    ^
     GC_INIT();
     ^

Given the comment in gc.h

#if (defined(sparc) || defined(__sparc)) && defined(sun)
    /*
     * If you are planning on putting
     * the collector in a SunOS 5 dynamic library, you need to call GC_INIT()
     * from the statically loaded program section.
     * This circumvents a Solaris 2.X (X<=4) linker bug.
     */
#   define GC_INIT() { extern end, etext; \
                       GC_noop(&end, &etext); }

and the fact that mainline only supports Solaris 10 and up, I think the
best course of action is to just remove the GC_INIT() expansion.  This
fixes the testsuite failures as tested with the appropriate runtest
invocation on sparc-sun-solaris2.11.  I intend to commit it to mainline
once another bootstrap has finished successfully.

Given that this code is no longer present in upstream boehm-gc, there's
no point in reporting it there.

	Rainer


2014-10-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* include/gc.h [(sparc || __sparc) && sun] (GC_INIT): Remove
	comment and definition.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sparc-boehm-gc-gnu11-fallout.patch
Type: text/x-patch
Size: 775 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20141022/a3567556/attachment.bin>
-------------- next part --------------

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


More information about the Java-patches mailing list