This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Revised2][PATCH] PR41260 link with -no_compact_unwind on?darwin10 and later
- From: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: mrs at apple dot com, peter at pogma dot com
- Date: Mon, 21 Sep 2009 22:03:49 -0400
- Subject: [Revised2][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) which 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.
Modified as recommended by Mike Stump to redefine LIB_SPEC
to pass -no_compact_unwind in a new gcc/config/darwin10.h file
included in config.gcc for darwin >=10. Bootstrap and regression
tested on x86_64-apple-darwin10.
Okay for gcc trunk?
Jack
2009-09-20 Jack Howarth <howarth@bromo.med.uc.edu>
PR middle-end/41260
* gcc/config.gcc: Use darwin9.h and darwin10.h on darwin10 and later.
* gcc/config/darwin10.h: Add file to pass -no_compact_unwind on
LIB_SPEC for darwin10 and later since it always uses the unwinder in
libSystem which is derived from the gcc 4.2.1 unwinder.
--- /dev/null 2009-09-21 18:08:46.000000000 -0400
+++ gcc/config/darwin10.h 2009-09-21 19:46:10.000000000 -0400
@@ -0,0 +1,5 @@
+/* Fix PR41260 by passing -no_compact_unwind on darwin10 and later until
+unwinder in libSystem is fixed to digest new epilog unwinding notes. */
+
+#undef LIB_SPEC
+#define LIB_SPEC "%{!static:-no_compact_unwind -lSystem}"
Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc (revision 151949)
+++ gcc/config.gcc (working copy)
@@ -400,9 +400,12 @@
*-*-darwin*)
tm_file="${tm_file} darwin.h"
case ${target} in
- *-*-darwin[912]*)
+ *-*-darwin9*)
tm_file="${tm_file} darwin9.h"
;;
+ *-*-darwin[12][0-9]*)
+ tm_file="${tm_file} darwin9.h darwin10.h"
+ ;;
esac
tm_file="${tm_file} ${cpu_type}/darwin.h"
tm_p_file="${tm_p_file} darwin-protos.h"