aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-08-19 16:11:40 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2012-08-19 16:11:40 +0100
commitd246814197aec42665e80f71c66552fe4f9551e4 (patch)
tree11fcb6b4ab20ce0368a90b3c21ab8c9680ecbb1e
parentcf21551eac46a2494613eb3ef8d62699c6d9ab74 (diff)
downloadgcc-d246814197aec42665e80f71c66552fe4f9551e4.zip
gcc-d246814197aec42665e80f71c66552fe4f9551e4.tar.gz
gcc-d246814197aec42665e80f71c66552fe4f9551e4.tar.bz2
crtstuff.c (USE_PT_GNU_EH_FRAME): Define for systems using glibc even if inhibit_libc.
* crtstuff.c (USE_PT_GNU_EH_FRAME): Define for systems using glibc even if inhibit_libc. From-SVN: r190517
-rw-r--r--libgcc/ChangeLog5
-rw-r--r--libgcc/crtstuff.c16
2 files changed, 20 insertions, 1 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 3ec62d6..66d52d8 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-19 Joseph Myers <joseph@codesourcery.com>
+
+ * crtstuff.c (USE_PT_GNU_EH_FRAME): Define for systems using glibc
+ even if inhibit_libc.
+
2012-08-17 Julian Brown <julian@codesourcery.com>
* Makefile.in (LIB2_DIVMOD_EXCEPTION_FLAGS): Default to
diff --git a/libgcc/crtstuff.c b/libgcc/crtstuff.c
index 5d820fa..973956a 100644
--- a/libgcc/crtstuff.c
+++ b/libgcc/crtstuff.c
@@ -1,7 +1,7 @@
/* Specialized bits of code needed to support construction and
destruction of file-scope objects in C++ code.
Copyright (C) 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
- 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011
+ 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@monkeys.com).
@@ -113,6 +113,20 @@ call_ ## FUNC (void) \
# define USE_PT_GNU_EH_FRAME
# endif
#endif
+
+#if defined(OBJECT_FORMAT_ELF) \
+ && !defined(OBJECT_FORMAT_FLAT) \
+ && defined(HAVE_LD_EH_FRAME_HDR) \
+ && !defined(CRTSTUFFT_O) \
+ && defined(inhibit_libc) \
+ && (defined(__GLIBC__) || defined(__gnu_linux__) || defined(__GNU__))
+/* On systems using glibc, an inhibit_libc build of libgcc is only
+ part of a bootstrap process. Build the same crt*.o as would be
+ built with headers present, so that it is not necessary to build
+ glibc more than once for the bootstrap to converge. */
+# define USE_PT_GNU_EH_FRAME
+#endif
+
#if defined(EH_FRAME_SECTION_NAME) && !defined(USE_PT_GNU_EH_FRAME)
# define USE_EH_FRAME_REGISTRY
#endif