From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-embedded+bounces-2812-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1LV6DZ-0002CI-T0
	for garchives@archives.gentoo.org; Thu, 05 Feb 2009 15:32:42 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id A41DCE0654;
	Thu,  5 Feb 2009 15:32:39 +0000 (UTC)
Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.246])
	by pigeon.gentoo.org (Postfix) with ESMTP id 75EACE0654
	for <gentoo-embedded@lists.gentoo.org>; Thu,  5 Feb 2009 15:32:39 +0000 (UTC)
Received: by an-out-0708.google.com with SMTP id c2so120024anc.1
        for <gentoo-embedded@lists.gentoo.org>; Thu, 05 Feb 2009 07:32:39 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:in-reply-to:references
         :date:message-id:subject:from:to:content-type
         :content-transfer-encoding;
        bh=RDhO59YZxhNneFABKPyCxbYjGdN6QprlttbpA/Ur6M8=;
        b=h+4GotWYfBt7OEhI57xrUfHhKNFFUHco4NmrgX9beQX8GLAS0dcS5d8MTaJnyFHDkU
         Gfyg79ykwJe8clRviTZaO4AhZmwSlMvj2BMTROi+CM3Sgf26LZ09lTw3Z9UBv1CBEKlS
         biUu9jUeIuWy4sspC0jBEnToiCmrTudNYsIys=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type:content-transfer-encoding;
        b=HH6rLpqJC/WBr75atPy5xymykGcf17nLG4fW5YkrWlxMDnCPnLq91LlixsaXvRiUIB
         1WgoYVimYC7qFqTR4nFPovoMkxbWhbKMZS3wg2NK5R5h8CkT+3333SJHs7QYcOZAF9ze
         Zq0haNmzrgG47SdhIgOAfIIFQgit6/dr6E2k4=
Precedence: bulk
List-Post: <mailto:gentoo-embedded@lists.gentoo.org>
List-Help: <mailto:gentoo-embedded+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-embedded+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-embedded+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-embedded.gentoo.org>
X-BeenThere: gentoo-embedded@lists.gentoo.org
Reply-to: gentoo-embedded@lists.gentoo.org
MIME-Version: 1.0
Received: by 10.100.214.15 with SMTP id m15mr240176ang.44.1233847959074; Thu, 
	05 Feb 2009 07:32:39 -0800 (PST)
In-Reply-To: <1222017153.9939.82.camel@media>
References: <1222017153.9939.82.camel@media>
Date: Thu, 5 Feb 2009 10:32:39 -0500
Message-ID: <3ea34a000902050732g62a4926ft60ca2369501063c7@mail.gmail.com>
Subject: Re: [gentoo-embedded] Auto Repair Cross Includes?
From: Christopher Friedt <chrisfriedt@gmail.com>
To: gentoo-embedded@lists.gentoo.org
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Archives-Salt: 6308fffd-b60d-41cf-b071-b21545391cce
X-Archives-Hash: 779bb5de3602ebfbb7ebbbf1d47be055

Hi Ned,

I like the patch - there are probably many cases where a package does
not cross compile properly when include paths are not fixed. In those
cases, it would be necessary to patch the source on an
ebuild-by-ebuild basis. This would eliminate the need to fix the files
at an ebuild level with a relatively inexpensive check.

Mike has a couple of good points too - unless it's necessary to use
thee function from outside gcc or whatever library it ends up in, it
may as well be marked static. Path vs name ? I think path. Regarding
arbitrary non-standard include paths that could generate false
positives, i have no comment.

Regarding path normalization ( "//" => "/" ) - in my opinion, if gcc
doesn't already do it, then forget about it - otherwise one would be
obliged to fix it for the rest of gcc, no? Keep it short and simple.

Depending on the level of community feedback you want, I could help
test for a while, or you could just include it in an unstable ~ gcc
version and see how the universe reacts to it :)

Regards,

Chris

On Sun, Sep 21, 2008 at 12:12 PM, Ned Ludd <solar@gentoo.org> wrote:
> I've been toying with an idea after seeing a patch which would abort()
> when it detected host includes for cross compiles. I did not like the
> idea of aborting as it prevented me from building pkgs that had the same
> headers in $ROOT as /. I did like the fact there was a little QA I could
> slip in there. After thinking about it a while. I said fsck the QA and
> just fixed the problem. Here is what I came up with for gcc-4.2.4..
>
> While in my testing I'm finding this works beautifully. However I'd like
> some input from others on what they think of such an idea.
> Good/Bad/Other?
>
> Basic goal detect ^/usr/include and rewrite it to $ROOT/usr/include if
> using a cross compiler and ROOT is set.
>
>
> -solar
>
>