This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[boehm-gc] Fix gnu11 fallout on SPARC


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.

# HG changeset patch
# Parent 1f398ca16001e467a4d13fba76608e183ab2547b
Fix gnu11 fallout on SPARC

diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h
--- a/boehm-gc/include/gc.h
+++ b/boehm-gc/include/gc.h
@@ -1011,14 +1011,7 @@ GC_API void GC_register_has_static_roots
   * make that too hard.
   */
 #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); }
+#   define GC_INIT()
 #else
 # if defined(__CYGWIN32__) || defined (_AIX)
     /*
-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]