This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PR41260 link with -no_compact_unwind on darwin10 and later


   The exception handling tests failing on darwin10 since r147995
are due to the new dwarf unwinding information being added
to describe the function epilog. This breaks the unwinding
under darwin10 since the unwinder used is always from libSystem
(based on that from libgcc in gcc 4.2.1) that doesn't expect
this additional information. The attached patch takes the second
option of passing -no_compact_unwind onto the linkage for darwin10
or later. This eliminates all of the regressions from r147995...

http://gcc.gnu.org/ml/gcc-testresults/2009-09/msg01761.html

and more. While we might be able to use the alternate approach
of suppressing the additional dwarf unwinding information, I fear
that there are other incompatibilities left in the compact 
unwinding when it is generated by FSF gcc 4.5 but run with an
unwinder based on gcc 4.2.1. Hence the additional regressions
disappearing when -no_compact_unwind is used.
    There still is the question of whether this change should
be extended to all darwin and not just darwin10 or later? The
current patch fixes darwin10 but binaries built with gcc 4.5
on darwin9 and run under darwin10 will still have the offending
dwarf unwinding information present.
       Okay for gcc trunk?
             Jack


2009-09-20  Jack Howarth  <howarth@bromo.med.uc.edu>

	PR middle-end/41260
	* gcc/config/darwin.h: Pass -no_compact_unwind to linker
	on darwin10 and later since it always uses the unwinder in
	libSystem which is derived from the gcc 4.2.1 unwinder.


Index: gcc/config/darwin.h
===================================================================
--- gcc/config/darwin.h	(revision 151908)
+++ gcc/config/darwin.h	(working copy)
@@ -372,7 +372,9 @@
 
 /* Machine dependent libraries.  */
 
-#define LIB_SPEC "%{!static:-lSystem}"
+#define LIB_SPEC "%{!static:\
+       %:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind)  \
+       -lSystem}"
 
 /* Support -mmacosx-version-min by supplying different (stub) libgcc_s.dylib
    libraries to link against, and by not linking against libgcc_s on


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]