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]

Re: 3.4 PATCH: Fix Solaris/x86 bootstrap failure (-Werror fallout)


 > > Now that -Werror is gone, I think the real problems should be fixed
 > > instead of being papered over.
 > 
 > Exactly: have non-Solaris 2 targets not use sol2.h and include
 > <sys/mman.h> again.  I'll see if I get to this.
 > 	Rainer

I still think it's less invasive to override TARGET_OS_CPP_BUILTINS
(for those that don't already) to remove "sun".  Then you can use the
patch below.

I'm trying to figure out which targets already do this and which need
to be fixed.


2003-11-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* config/sol2.h: Include <sys/mman.h> when appropriate.

diff -rup orig/egcc-CVS20031104/gcc/config/sol2.h egcc-CVS20031104/gcc/config/sol2.h
--- orig/egcc-CVS20031104/gcc/config/sol2.h	Wed Sep  3 20:01:07 2003
+++ egcc-CVS20031104/gcc/config/sol2.h	Wed Nov  5 08:21:15 2003
@@ -169,6 +169,12 @@ Boston, MA 02111-1307, USA.  */
  *
  */
 
+/* This declares mprotect (used in TRANSFER_FROM_TRAMPOLINE) for
+   libgcc2.c.  */
+#if defined (L_trampoline) && defined (__sun__)
+#include <sys/mman.h>
+#endif
+
 /* sys/mman.h is not present on some non-Solaris configurations
    that use sol2.h, so TRANSFER_FROM_TRAMPOLINE must use a magic
    number instead of the appropriate PROT_* flags.  */


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