https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102353
Bug ID: 102353
Summary: powerpc64le-linux-gnu build failure when build != host
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: sandra at gcc dot gnu.org
CC: wschmidt at linux dot ibm.com
Target Milestone: ---
Host: powerpc64le-linux-gnu
Target: powerpc64le-linux-gnu
Build: x86_64-linux-gnu
I'm trying to build gcc for powerpc64le-linux-gnu host and target from
x86_64-linux-gnu host using scripts that have been known to work within the
last month or so. I'm seeing multiple linker errors like
ld: rs6000-gen-builtins.o: Relocations in generic ELF (EM: 21)
followed by
ld: rs6000-gen-builtins.o: error adding symbols: file in wrong format
And indeed, looking at config/rs6000/t-rs6000, this seems to be broken:
rs6000-gen-builtins.o: $(srcdir)/config/rs6000/rs6000-gen-builtins.c
$(COMPILE) $<
$(POSTCOMPILE)
rbtree.o: $(srcdir)/config/rs6000/rbtree.c
$(COMPILE) $<
$(POSTCOMPILE)
rs6000-gen-builtins: rs6000-gen-builtins.o rbtree.o
$(LINKER_FOR_BUILD) $(BUILD_LINKERFLAGS) $(BUILD_LDFLAGS) -o $@ \
$(filter-out $(BUILD_LIBDEPS), $^) $(BUILD_LIBS)
The two .o files are being built with the *host* compiler, and we're trying to
link them with the *build* linker. ???