This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch, Darwin] Fix PR46904/PR46916
- From: IainS <developer at sandoe-acoustics dot co dot uk>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Mike Stump <mrs at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Fri, 17 Dec 2010 09:37:51 +0000
- Subject: [Patch, Darwin] Fix PR46904/PR46916
Hi,
This has now been regstrapped on *-darwin9 and x86_64-darwin10.
There are outstanding issues with -freorder-blocks-and-partition (on
Darwin, at least) which results in the fail of partition2.C on Darwin10.
IMO it would be better to fix these separately :
o -freorder-blocks-and-partition - seems to suppress the pubnames
section (Honza, any ideas?) - this causes a dsymutil fail.
o -freorder-blocks-and-partition - produces anonymous code atoms
(chunks introduced only by local labels) which produces linker
warnings, because it is not keen on adding line number info to
anonymous code chunks.
Unless people feel those issues should be resolved in this patch ....
OK for trunk?
Iain
gcc:
Iain Sandoe <iains...
Jan Hubicka <hubika...
PR middle-end/46916
PR c++/46904
* opts.c (finish_options): Enable -freorder-functions
when -freorder-blocks-and-partition is active.
* config/darwin.c (generating_for_darwin_version): New var.
(darwin_text_section): Remove.
(darwin_rodata_section): Do not check function section here.
(darwin_emit_unwind_label): Do not emit for Darwin >= 9.
Emit distinct labels for successive calls for the same decl.
(darwin_override_options): Set generating_for_darwin_version.
Suppress automatic asynchronous unwind tables for m32.
Switch off -freorder-blocks-and-partition when unwind tables
will be generated. Update to use generating_for_darwin_version.
(darwin_function_section): Check for cases that need to be placed
in coalesced sections.
* config/darwin-sections.def: Define hot, cold, startup and exit
sections
for both coalesced and regular code.
* config/darwin.h (USE_SELECT_SECTION_FOR_FUNCTIONS): Delete.
* config/darwin10.h (TARGET_ASM_EMIT_UNWIND_LABEL): Delete.
Attachment:
167963-darwin-func-sections.txt
Description: Text document