This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Rework the handling of assembler sections
- From: Richard Sandiford <richard at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: echristo at apple dot com
- Date: Wed, 07 Dec 2005 09:21:51 +0000
- Subject: Re: Rework the handling of assembler sections
- References: <87mzjrjs0u.fsf@talisman.home> <43951050.3070608@codesourcery.com> <874q5lz6ac.fsf@talisman.home>
Richard Sandiford <richard@codesourcery.com> writes:
> Definitely. Folks, please do shout if I've broken something, and I'll
> try to fix it ASAP. Please shout if you don't like something about the
> interface too.
Well, that was quick. Eric C reported that libgcc2.c no longer built
on darwin. (That's not sort of thing that the assembly-comparison
testing I did would catch, sorry.)
I've installed the patch below as obvious after Eric confirmed it
fixed the problem. Thanks to Eric for the quick report and for
staying up to test the patch. ;)
Richard
* config/darwin.h: Guard section variables with #ifndef IN_LIBGCC2.
Index: gcc/config/darwin.h
===================================================================
--- gcc/config/darwin.h (revision 108152)
+++ gcc/config/darwin.h (working copy)
@@ -610,9 +610,11 @@ #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FI
#define MAX_OFILE_ALIGNMENT 0x8000
/* Declare the section variables. */
+#ifndef IN_LIBGCC2
#define DEF_SECTION(NAME, FLAGS, DIRECTIVE, OBJC) extern section *NAME;
#include "darwin-sections.def"
#undef DEF_SECTION
+#endif
#undef TARGET_ASM_SELECT_SECTION
#define TARGET_ASM_SELECT_SECTION machopic_select_section