From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: gcc-patches@gcc.gnu.org
Cc: java-patches@gcc.gnu.org
Subject: [boehm-gc] Fix gnu11 fallout on SPARC
Date: Wed, 22 Oct 2014 15:05:00 -0000 [thread overview]
Message-ID: <yddlho8qh5a.fsf@lokon.CeBiTec.Uni-Bielefeld.DE> (raw)
[-- 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
reply other threads:[~2014-10-22 15:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yddlho8qh5a.fsf@lokon.CeBiTec.Uni-Bielefeld.DE \
--to=ro@cebitec.uni-bielefeld.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=java-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).