This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
avoid crt3 for darwin kext multilibs
- From: Mike Stump <mrs at apple dot com>
- To: "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 27 Feb 2007 12:51:05 -0800
- Subject: avoid crt3 for darwin kext multilibs
Here is one is part of a series to allow a kext multilib...
Checked in to mainline and 4.2.
2007-02-27 Mike Stump <mrs@apple.com>
* config/darwin-crt3.c: Avoid compilation when compiling for a
kext multilib.
Doing diffs in config/darwin-crt3.c.~1~:
--- config/darwin-crt3.c.~1~ 2006-11-16 23:24:39.000000000 -0800
+++ config/darwin-crt3.c 2007-02-27 12:23:51.000000000 -0800
@@ -27,6 +27,9 @@ along with GCC; see the file COPYING. I
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
+/* Don't do anything if we are compiling for a kext multilib. */
+#ifdef __PIC__
+
/* It is incorrect to include config.h here, because this file is
being
compiled for the target, and hence definitions concerning only
the host
do not apply. */
@@ -530,3 +533,5 @@ atexit (atexit_callback func)
r.has_arg = 0;
return atexit_common (&r, &__dso_handle);
}
+
+#endif /* __PIC__ */
--------------