public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@codesourcery.com>
To: Bob Rossi <bob_rossi@cox.net>
Cc: gcc-help@gcc.gnu.org, mark@codesourcery.com
Subject: Re: mingw svn trunk failure
Date: Tue, 19 Dec 2006 23:47:00 -0000	[thread overview]
Message-ID: <20061219234746.GX14845@lios> (raw)
In-Reply-To: <20061219223224.GA3022@cox.net>

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@codesourcery.com
(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@codesourcery.com>
+
+	* 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@gnu.org>
 
 	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);

  parent reply	other threads:[~2006-12-19 23:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-19 15:54 Bob Rossi
2006-12-19 22:32 ` Bob Rossi
2006-12-19 22:50   ` Carlos O'Donell
2006-12-19 22:59     ` Bob Rossi
2006-12-19 23:58       ` Carlos O'Donell
2006-12-20  0:24         ` Bob Rossi
2006-12-20  1:23           ` Carlos O'Donell
2006-12-20  1:56         ` Bob Rossi
2006-12-20  2:33           ` Carlos O'Donell
2006-12-19 23:47   ` Carlos O'Donell [this message]
2006-12-20  0:29   ` Bob Rossi
2006-12-20  1:45     ` Carlos O'Donell
2006-12-20  4:53       ` Bob Rossi
2006-12-20 17:24         ` Carlos O'Donell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061219234746.GX14845@lios \
    --to=carlos@codesourcery.com \
    --cc=bob_rossi@cox.net \
    --cc=gcc-help@gcc.gnu.org \
    --cc=mark@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).