--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: gcc-7: Native gdc cross-builds fail
- From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
- Date: Tue, 01 Aug 2017 15:39:41 +0200
- Message-id: <150159478155.2757.1734229493183101963.reportbug@stretch64.physik.fu-berlin.de>
Source: gcc-7
Version: 7.1.0-11
Severity: normal
Tags: patch
Hi!
Trying to do a cross-native build for m68k with gdc enabled fails with:
g++ -o d/impcvgen d/impcnvgen.dmdgen.o
/usr/bin/ld: d/idgen.dmdgen.o: Relocations in generic ELF (EM: 4)
/usr/bin/ld: d/idgen.dmdgen.o: Relocations in generic ELF (EM: 4)
/usr/bin/ld: d/idgen.dmdgen.o: Relocations in generic ELF (EM: 4)
/usr/bin/ld: d/idgen.dmdgen.o: Relocations in generic ELF (EM: 4)
/usr/bin/ld: d/idgen.dmdgen.o: Relocations in generic ELF (EM: 4)
/usr/bin/ld: d/idgen.dmdgen.o: Relocations in generic ELF (EM: 4)
/usr/bin/ld: d/idgen.dmdgen.o: Relocations in generic ELF (EM: 4)
/usr/bin/ld: d/idgen.dmdgen.o: Relocations in generic ELF (EM: 4)
d/idgen.dmdgen.o: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
../../src/gcc/d/Make-lang.in:254: recipe for target 'd/idgen' failed
I'm currently working around this issue by adding the following
changes to debian/rules.defs:
--- debian/rules.defs.orig 2017-08-01 15:35:52.999394076 +0200
+++ debian/rules.defs 2017-08-01 15:27:13.531269664 +0200
@@ -869,6 +869,9 @@
ifeq ($(DEB_STAGE)-$(filter libphobos, $(with_rtlibs)),rtlibs-)
with_d := disabled for rtlibs stage
endif
+ifeq (,$(filter $(build_type), build-cross build-native))
+ with_d += no
+endif
with_d := $(call envfilt, d, , , $(with_d))
#with_d := not yet built for GCC 7
I'm attaching the patch just in case. I will also test whether this
affects other architectures for cross-native builds.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
--- debian/rules.defs.orig 2017-08-01 15:35:52.999394076 +0200
+++ debian/rules.defs 2017-08-01 15:27:13.531269664 +0200
@@ -869,6 +869,9 @@
ifeq ($(DEB_STAGE)-$(filter libphobos, $(with_rtlibs)),rtlibs-)
with_d := disabled for rtlibs stage
endif
+ifeq (,$(filter $(build_type), build-cross build-native))
+ with_d += no
+endif
with_d := $(call envfilt, d, , , $(with_d))
#with_d := not yet built for GCC 7
--- End Message ---