Re: mingw svn trunk failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 19, 2006 at 05:32:24PM -0500, Bob Rossi wrote:
> On Tue, Dec 19, 2006 at 10:53:54AM -0500, Bob Rossi wrote:
> > Hi,
> > 
> > Is this the correct place to talk about problems compiling gcc on mingw?
> > 
> > If I checkout svn trunk, and do, 
> 
> I've reverted this patch,
>   http://gcc.gnu.org/viewcvs?view=rev&revision=119017
> and I am able to build svn trunk without a problem. It may not solve the
> problem I'm having (making gcc relocatable), but it does build.
> 
> Mark or Carlos, do you have any idea why this patch is giving me an
> assertion? What should I do?

As a workaround you can use this patch. After testing I will be sending
this to gcc-patches.

Cheers,
Carlos.
-- 
Carlos O'Donell
CodeSourcery
carlos@xxxxxxxxxxxxxxxx
(650) 331-3385 x716

Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(revision 120053)
+++ gcc/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2006-12-19  Carlos O'Donell  <carlos@xxxxxxxxxxxxxxxx>
+
+	* gcc/c-incpath.c (add_standard_paths): Only assert when a path is 
+	not relocatable and we are cross-compiling. 
+
 2006-12-19  Paolo Bonzini  <bonzini@xxxxxxx>
 
 	PR bootstrap/29544
Index: gcc/c-incpath.c
===================================================================
--- gcc/c-incpath.c	(revision 120053)
+++ gcc/c-incpath.c	(working copy)
@@ -169,11 +169,23 @@ add_standard_paths (const char *sysroot,
 	      /* If the compiler is relocated, and this is a configured 
 		 prefix relative path, then we use gcc_exec_prefix instead 
 		 of the configured prefix.  */
-	      gcc_assert (strncmp (p->fname, cpp_PREFIX,
-				     cpp_PREFIX_len) == 0);
-	      str = concat (gcc_exec_prefix, p->fname
-			      + cpp_PREFIX_len, NULL);
-	      str = update_path (str, p->component);
+	      if (strncmp (p->fname, cpp_PREFIX, cpp_PREFIX_len) == 0)
+		{
+		  str = concat (gcc_exec_prefix, p->fname
+				+ cpp_PREFIX_len, NULL);
+		  str = update_path (str, p->component);
+		}
+	      else
+		{
+#ifndef CROSS_COMPILE
+		  str = update_path (p->fname, p->component);
+#else
+		  /* When cross-compiling, we do not want to search host
+		     paths, so we should have no paths outside of both
+		     the sysroot and the relocated prefix.  */
+		  abort ();
+#endif
+		}
 	    }
 	  else
 	    str = update_path (p->fname, p->component);

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux