This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PING^3] [PATCH] Remove CANADIAN, that break compilation for foreign target
- From: Petr Ovtchenkov <ptr at void-ptr dot info>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Jan 2018 21:36:51 +0300
- Subject: Re: [PING^3] [PATCH] Remove CANADIAN, that break compilation for foreign target
- Authentication-results: sourceware.org; auth=none
- References: <E1ducOT-0002W3-T8@void-ptr.info> <20170920134459.6f1b2bcf@void-ptr.info> <20171116205537.17680878@void-ptr.info> <20171219113743.69a153a0@void-ptr.info> <20180130101943.2c35f362@void-ptr.info> <20180130125421.GR3417@redhat.com>
On Tue, 30 Jan 2018 12:54:21 +0000
Jonathan Wakely <jwakely@redhat.com> wrote:
> On 30/01/18 10:19 +0300, Petr Ovtchenkov wrote:
> >On Tue, 19 Dec 2017 11:37:43 +0300
> >Petr Ovtchenkov <ptr@void-ptr.info> wrote:
> >
> >ping^3
>
>
> I don't fully understand the consequences (or need) for this patch.
>
> I asked some other people to look at it, and didn't get confirmation
> it's OK. So I'm reluctant to make the change. Especially this late in
> the GCC 8 cycle.
Hmm, almost two years for this words. Do you really think that
-I/usr/include may be correct in build of cross of some kind
(CANADIAN is just variant of cross)? Of cause, I don't consider
case with rolling target headers in /usr/include.
>
>
> >> On Thu, 16 Nov 2017 20:55:37 +0300
> >> Petr Ovtchenkov <ptr@void-ptr.info> wrote:
> >>
> >> > On Wed, 20 Sep 2017 13:44:59 +0300
> >> > Petr Ovtchenkov <ptr@void-ptr.info> wrote:
> >> >
> >> > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71212
> >> > >
> >> > > On Fri, 20 May 2016 16:10:50 +0300
> >> > > Petr Ovtchenkov <ptr@void-ptr.info> wrote:
> >> > >
> >> > > > Some old ad-hoc (adding -I/usr/include to compiler
> >> > > > flags) break compilation of libstdc++ for foreign
> >> > > > target architecture (due to compiler see includes
> >> > > > of native).
> >> >
> >> > Reference for terms:
> >> >
> >> > https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html
> >> >
> >> > Present of "CANADIAN=yes" lead to inclusion of
> >> > headers from build (-I/usr/include). "CANADIAN=yes" used _only_
> >> > to set "-I/usr/include".
> >> >
> >> > Inclusion of build headers in cross-compilation
> >> > process is not a mistake only in case of native (i.e. it is mistake
> >> > for cross, for canadian, for crossed native and for crossback),
> >> > but sometimes give "success".
> >> >
> >> > Note, that build/host/target may be different not only due to
> >> > different architectures, but due to different sysroots
> >> > (libc, kernel, binutils, etc.).
> >> >
> >> > CANADIAN is set to "yes" by code
> >> >
> >> > - # If Canadian cross, then don't pick up tools from the build directory.
> >> > - # Used only in GLIBCXX_EXPORT_INCLUDES.
> >> > - if test -n "$with_cross_host" &&
> >> > - test x"$build_alias" != x"$with_cross_host" &&
> >> > - test x"$build" != x"$target";
> >> > - then
> >> > - CANADIAN=yes
> >> > - else
> >> > - CANADIAN=no
> >> > - fi
> >> >
> >> > and it add "-I/usr/include" to compiler flags for building libstdc++.
> >> > This is wrong.
> >> >
> >> > Reference to patch:
> >> > https://gcc.gnu.org/ml/gcc-patches/2017-09/msg01332.html