unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: Andy Wingo <wingo@igalia.com>
Cc: "guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: Re: avr-gcc
Date: Fri, 15 Apr 2016 14:44:39 +0200	[thread overview]
Message-ID: <874mb3rqh4.fsf@drakenvlieg.flower> (raw)
In-Reply-To: <87potrz1nh.fsf@igalia.com> (Andy Wingo's message of "Fri, 15 Apr 2016 11:01:22 +0200")

Andy Wingo writes:

>> The problem is our usage of C_INCLUDE_PATH.
>
> I don't understand this diagnosis.  If the paths were not in
> C_INCLUDE_PATH, they would be in CPATH.  Then you'd have the same
> problem.  No?

Let me try to choose my words more carefully.  The facts that gcc sets
C_INCLUDE_PATH and this native gcc setting this path to the native
headers, is added to the environment when cross building, and the
fact that C_INCLUDE_PATH does not get special treatment when
cross building, like CPATH

    -  add_env_var_paths ("CPATH", BRACKET);
    +  add_env_var_paths ("CROSS_CPATH", BRACKET);

makes that the cross-gcc picks up the wrong native headers unless
C_INCLUDE_PATH is unset.

> Or is there some special logic which is applying to CPATH which is not
> applying to C_INCLUDE_PATH?

Ah, yes; CPATH is not used when cross building, instead CROSS_CPATH is
used.

> Basically in Guix we should, IMO, always be working on C_INCLUDE_PATH
> and friends, and never on CPATH.

I'm guessing that could work; would could try to change the above patch
(in gcc-cross-environment-variables.patch) to handle C*_INCLUDE_PATH and
introduce CROSS_C*_INCLUDE_PATH.

I just wonder if there was another reason for cross builds to choose
CPATH/CROSS_CPATH instead of C_*INCLUDE_PATH.  Apart maybe from the
fact that we would need to handle all `*' where CPATH works for all
languages.

Greetings,
Jan

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

  reply	other threads:[~2016-04-15 12:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17 15:25 avr-gcc Ricardo Wurmus
2015-11-17 15:59 ` avr-gcc Ricardo Wurmus
2015-11-17 21:32 ` avr-gcc Ludovic Courtès
2015-11-18  3:53   ` avr-gcc Thompson, David
2015-11-18 11:03     ` avr-gcc Ludovic Courtès
2015-11-19  1:54       ` avr-gcc Thompson, David
2015-11-20 14:20         ` avr-gcc Ludovic Courtès
2016-04-12 18:21           ` avr-gcc Thompson, David
2016-04-12 20:14             ` avr-gcc Thompson, David
2016-04-13 20:42             ` avr-gcc Ludovic Courtès
2016-04-14  5:47               ` avr-gcc Jan Nieuwenhuizen
2016-04-14 16:47                 ` avr-gcc Ludovic Courtès
2016-04-15  8:09                   ` avr-gcc Jan Nieuwenhuizen
2016-04-15  9:01                     ` avr-gcc Andy Wingo
2016-04-15 12:44                       ` Jan Nieuwenhuizen [this message]
2016-04-15 13:13                         ` avr-gcc Andy Wingo
2016-04-15 21:06                           ` avr-gcc Ludovic Courtès
2016-04-15 21:10                     ` avr-gcc Ludovic Courtès
2016-04-16 19:55                       ` avr-gcc Jan Nieuwenhuizen

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=874mb3rqh4.fsf@drakenvlieg.flower \
    --to=janneke@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=wingo@igalia.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).