* [boehm-gc] Fix gnu11 fallout on SPARC
@ 2014-10-22 15:05 Rainer Orth
0 siblings, 0 replies; only message in thread
From: Rainer Orth @ 2014-10-22 15:05 UTC (permalink / raw)
To: gcc-patches; +Cc: java-patches
[-- Attachment #1: Type: text/plain, Size: 1832 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sparc-boehm-gc-gnu11-fallout.patch --]
[-- Type: text/x-patch, Size: 775 bytes --]
# 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)
/*
[-- Attachment #3: Type: text/plain, Size: 143 bytes --]
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-10-22 15:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-22 15:05 [boehm-gc] Fix gnu11 fallout on SPARC Rainer Orth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).