[Bug target/102353] powerpc64le-linux-gnu build failure when build != host

2021-09-16 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102353

Tobias Burnus  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Tobias Burnus  ---
Should be FIXED :-)

@Bill: Thanks for testing the native build!

[Bug target/102353] powerpc64le-linux-gnu build failure when build != host

2021-09-16 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102353

--- Comment #7 from CVS Commits  ---
The master branch has been updated by Tobias Burnus :

https://gcc.gnu.org/g:acd7e7b33fd576b336ca0bf5ec51f77b32ba51cc

commit r12-3581-gacd7e7b33fd576b336ca0bf5ec51f77b32ba51cc
Author: Tobias Burnus 
Date:   Thu Sep 16 18:35:34 2021 +0200

PowerPC: Fix rs6000-gen-builtins with build != host [PR102353]

This mimics what the main Makefile.in does: compile the generator
files under build (with Makefile.in's 'build/%.o' rule for compilation).
It also adds $(RUN_GEN) to optionally run it with valgrind and
the $(build_exeext) suffix.

Before, the .o files were compiled with $(COMPILE), causing link
error with $(LINKER_FOR_BUILD) for build != host.

gcc/
PR target/102353
* config/rs6000/t-rs6000 (build/rs6000-gen-builtins.o,
build/rbtree.o):
Added 'build/' to target, use build/%.o rule.
(build/rs6000-gen-builtins$(build_exeext)): Add 'build/' and
'$(build_exeext)' to target and 'build/' for the *.o files.
(rs6000-builtins.c): Update for those changes; run
rs6000-gen-builtins
with $(RUN_GEN).

[Bug target/102353] powerpc64le-linux-gnu build failure when build != host

2021-09-16 Thread wschmidt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102353

--- Comment #6 from Bill Schmidt  ---
Thanks, Tobias!  I'm sorry for getting this exactly backwards...

Your patch looks good.  I am doing a quick host=target=build bootstrap and will
respond on-list when it'sdone.

[Bug target/102353] powerpc64le-linux-gnu build failure when build != host

2021-09-16 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102353

Tobias Burnus  changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu.org

--- Comment #5 from Tobias Burnus  ---
As crossref:

* r12-3098-g34ad198138f7a64355c92090e1db260ee135495d caused the regression
  "rs6000: Incorporate new builtins code into the build machinery"

* Submitted patch by me at:
  https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579553.html

[Bug target/102353] powerpc64le-linux-gnu build failure when build != host

2021-09-15 Thread sandra at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102353

--- Comment #4 from sandra at gcc dot gnu.org ---
I think rs6000-gen-builtins is supposed to be a build binary, not a host
binary?  I'm seeing this at the end of my build log with that patch.

./rs6000-gen-builtins /path/to/gcc/config/rs6000/rs6000-builtin-new.def \
/path/to/gcc/config/rs6000/rs6000-overload.def rs6000-builtins.h \
rs6000-builtins.c rs6000-vecdefines.h
/path/to/bin/bash: ./rs6000-gen-builtins: cannot execute binary file: Exec
format error
/path/to/gcc/config/rs6000/t-rs6000:67: recipe for target 'rs6000-builtins.c'
failed

[Bug target/102353] powerpc64le-linux-gnu build failure when build != host

2021-09-15 Thread wschmidt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102353

--- Comment #3 from Bill Schmidt  ---
Hi Sandra,

Does the following work for your cross?

diff --git a/gcc/config/rs6000/t-rs6000 b/gcc/config/rs6000/t-rs6000
index 92766d8ea25..738d4cf9493 100644
--- a/gcc/config/rs6000/t-rs6000
+++ b/gcc/config/rs6000/t-rs6000
@@ -53,8 +53,7 @@ rbtree.o: $(srcdir)/config/rs6000/rbtree.c
$(POSTCOMPILE)

 rs6000-gen-builtins: rs6000-gen-builtins.o rbtree.o
-   $(LINKER_FOR_BUILD) $(BUILD_LINKERFLAGS) $(BUILD_LDFLAGS) -o $@ \
-   $(filter-out $(BUILD_LIBDEPS), $^) $(BUILD_LIBS)
+   $(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $< rbtree.o -o $@

 # TODO: Whenever GNU make 4.3 is the minimum required, we should use
 # grouped targets on this:

Thanks!
Bill

[Bug target/102353] powerpc64le-linux-gnu build failure when build != host

2021-09-15 Thread wschmidt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102353

Bill Schmidt  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |wschmidt at gcc dot 
gnu.org
 Ever confirmed|0   |1
 CC||wschmidt at gcc dot gnu.org
   Last reconfirmed||2021-09-15
 Status|UNCONFIRMED |NEW

--- Comment #2 from Bill Schmidt  ---
Ah, sorry for the silly mistake.  Mine.

[Bug target/102353] powerpc64le-linux-gnu build failure when build != host

2021-09-15 Thread sandra at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102353

--- Comment #1 from sandra at gcc dot gnu.org ---
Ooops, I meant x86_64-linux-gnu build, not host.  :-(