fix cross build

2012-05-20 Thread Nathan Sidwell
In building a ppc cross compiler using a freshly built native compiler, I encountered an ICE in iterative_hash_expr compiling c-lex.c. I extracted the attached testcase, showing the problem is with statement expressions. Investigation showed I_H_E seeing BLOCK and BIND_EXPR nodes, which is was

Re: fix cross build

2012-05-21 Thread Richard Guenther
On Sun, May 20, 2012 at 7:24 PM, Nathan Sidwell wrote: > In building a ppc cross compiler using a freshly built native compiler, I > encountered an ICE in iterative_hash_expr compiling c-lex.c.  I extracted > the attached testcase, showing the problem is with statement expressions. > Investigation

Re: fix cross build

2012-05-22 Thread Nathan Sidwell
On 05/21/12 11:03, Richard Guenther wrote: Hmm - I think this papers over the issue that the CONSTRUCTOR is not properly gimplified - it still contains a TARGET_EXPR which is not valid GIMPLE. Why is that TARGET_EXPR not gimplified? As far as I can make out, it just doesn't look inside the con

Re: fix cross build

2012-05-22 Thread Richard Guenther
On Tue, May 22, 2012 at 3:24 PM, Nathan Sidwell wrote: > On 05/21/12 11:03, Richard Guenther wrote: > >> Hmm - I think this papers over the issue that the CONSTRUCTOR is not >> properly gimplified - it still contains a TARGET_EXPR which is not valid >> GIMPLE. >> Why is that TARGET_EXPR not gimpli

Re: fix cross build

2012-05-22 Thread Nathan Sidwell
On 05/22/12 15:12, Richard Guenther wrote: thanks! But I wonder why CONSTRUCTORs do not inherit TREE_SIDE_EFFECTS properly ... yeah, that would seem to be the error. Looking ...

Re: fix cross build

2012-05-23 Thread Nathan Sidwell
On 05/22/12 15:12, Richard Guenther wrote: But I wonder why CONSTRUCTORs do not inherit TREE_SIDE_EFFECTS properly ... the attached patch fixes the ICE and causes no regressions on i686-pc-linux-gnu. ok? nathan 2012-05-23 Nathan Sidwell * tree.c (build_constructor): Propagate TREE_SIDE_

Re: fix cross build

2012-05-24 Thread Richard Guenther
On Wed, May 23, 2012 at 7:58 PM, Nathan Sidwell wrote: > On 05/22/12 15:12, Richard Guenther wrote: > >> But I wonder why CONSTRUCTORs do not inherit TREE_SIDE_EFFECTS >> properly ... > > > the attached patch fixes the ICE and causes no regressions on > i686-pc-linux-gnu. > > ok? Looks ok to me.

Re: fix cross build

2012-05-27 Thread Nathan Sidwell
On 05/24/12 09:03, Richard Guenther wrote: If you don't hear from somebody else in 24h the patch is ok as-is (can you do some grepping whether there are callers of build_constructor that set TREE_SIDE_EFFECTS on it afterwards?) I committed the patch. grepping C & C++ sources didn't show calle

[patch] fix cross build on powerpc*-*-freebsd

2012-09-28 Thread Andreas Tobler
Hi, I didn't test building a cross compiler when I committed the port for powerpc64-*-freebsd. And now I struggled myself when I wanted to build an amd64-freebsd -> powerpc64-freebsd cross compiler. With the below patch I'm able to do so. Ok for trunk and 4.7 once I completed the test suite

PATCH: Fix cross build for CXX_FOR_BUILD != CXX

2015-10-23 Thread H.J. Lu
On Fri, Oct 23, 2015 at 7:23 AM, Marcus Shawcroft wrote: > On 23 October 2015 at 13:34, H.J. Lu wrote: >> On Fri, Oct 23, 2015 at 4:54 AM, Marcus Shawcroft >> wrote: >>> Hi, >>> >>> This patch breaks the distinction between build and host. For example >>> consider a configure along these lines:

Re: [patch] fix cross build on powerpc*-*-freebsd

2012-09-28 Thread Ian Lance Taylor
On Fri, Sep 28, 2012 at 4:30 AM, Andreas Tobler wrote: > > 2012-09-28 Andreas Tobler > > * config.gcc: Replace 'host' with 'target' when configuring for > powerpc64*-*-freebsd. Counts as obvious. OK in any case. Thanks. Ian

Re: [patch] fix cross build on powerpc*-*-freebsd

2012-09-28 Thread Andreas Tobler
On 28.09.12 17:21, Ian Lance Taylor wrote: On Fri, Sep 28, 2012 at 4:30 AM, Andreas Tobler wrote: 2012-09-28 Andreas Tobler * config.gcc: Replace 'host' with 'target' when configuring for powerpc64*-*-freebsd. Counts as obvious. OK in any case. Thanks. Thank you Ian

Re: PATCH: Fix cross build for CXX_FOR_BUILD != CXX

2015-10-29 Thread Richard Earnshaw
On 23/10/15 16:41, H.J. Lu wrote: > On Fri, Oct 23, 2015 at 7:23 AM, Marcus Shawcroft > wrote: >> On 23 October 2015 at 13:34, H.J. Lu wrote: >>> On Fri, Oct 23, 2015 at 4:54 AM, Marcus Shawcroft >>> wrote: Hi, This patch breaks the distinction between build and host. For example

Re: PATCH: Fix cross build for CXX_FOR_BUILD != CXX

2015-10-29 Thread H.J. Lu
On Thu, Oct 29, 2015 at 5:05 AM, Richard Earnshaw wrote: > On 23/10/15 16:41, H.J. Lu wrote: >> On Fri, Oct 23, 2015 at 7:23 AM, Marcus Shawcroft >> wrote: >>> On 23 October 2015 at 13:34, H.J. Lu wrote: On Fri, Oct 23, 2015 at 4:54 AM, Marcus Shawcroft wrote: > Hi, > > Th

[Patch] gcc/configure.ac: Fix cross build by using $(CFLAGS-$@) [PR100598]

2021-05-14 Thread Tobias Burnus
?].) Tobias - Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf gcc/configure.ac: Fix cross build by using $(CFLAGS-$@) [PR100598] BUILD_CFLAGS is set by configure; by default

Re: [Patch] gcc/configure.ac: Fix cross build by using $(CFLAGS-$@) [PR100598]

2021-05-18 Thread Richard Biener via Gcc-patches
On Fri, May 14, 2021 at 8:44 PM Tobias Burnus wrote: > > Fixes the build fail: > ../../gcc/genversion.c:37:20: error: ‘BASEVER’ was not declared in this scope > char basever[] = BASEVER; > when doing a cross compilation. > > Cf. patch for details. > OK for mainline? OK. Richard. > (The runs

[Bootstrap] *PING* Re: [Patch] gcc/configure.ac: Fix cross build by using $(CFLAGS-$@) [PR100598]

2021-05-17 Thread Tobias Burnus
Early *PING* for this bootstrap issue; in the PR, it affected a Linux to mingw64 cross build. Here, it affects x86-64 → PowerPC Linux builds, which builds with the patch applied. On 14.05.21 16:19, Tobias Burnus wrote: Fixes the build fail: ../../gcc/genversion.c:37:20: error: ‘BASEVER’ was not