Status of cross-building the C++ branch

Ben Longbons <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CA+XNFZOCt1ShS3mbJqCwdSi9zoV5-zQOXmSWJ6QY4C7TcSoMFA@mail.gmail.com>
Build environment:

(If you need any help reproducing this, I'm o11c on FreeNode and
usually idle on #gdb, though my bouncer is going down for maintenance
this weekend)

* Host OS: Debian testing (stretch) amd64 (not important except that
it's running systemd)
* Container manager: systemd-nspawn 227, in non-boot mode (but
debootstrap put a full system so it is bootable, you just can't run a
command automatically in that case, unless they've fixed the bug in
`machinectl shell` yet - this may vary depending on where you got your
systemd from)
* Container OS:
** For amd64 and i386, normal toolchain (gcc 4.9) from Debian Jessie
** For x32, normal toolchain (gcc 5) from Debian-Ports Sid
** For cross arches, the arch was added via `dpkg --add-architecture`
and the emdebian toolchain was used (gcc 4.9).
*** For mips, the provided toolchain was outdated and uninstallable,
so it was rebuilt from source
*** For s390x, the toolchain was not provided, but this was a trivial change.
**** See the *binary* package cross-gcc-dev to create a new source
package for the cross compiler, then build it.
**** See the *source* package cross-binutils to create a new binary
package for the cross, or use the one from sid.
**** Use `dpkg-buildpackage -us -uc` to build a Debian package.
* Git:
** Remote: git://github.com/palves/gdb.git
** Branch: palves/cxx-conversion-attempt-part-2-no-fpermissive
** Commit: 86ce09a70326a221b49755a589bf3622a667b265


Configure arguments:

--build=build=x86_64-linux-gnu
--host= (see list below)
--enable-build-with-cxx
--enable-targets=all

--disable-binutils
--disable-elfcpp
--disable-gas
--disable-gold
--disable-gprof
--disable-ld

Triples:

x86_64-linux-gnu
i586-linux-gnu
x86_64-linux-gnux32

aarch64-linux-gnu
arm-linux-gnueabi
arm-linux-gnueabihf
mips-linux-gnu
mipsel-linux-gnu
powerpc-linux-gnu
powerpc64le-linux-gnu
s390x-linux-gnu

Results:

All 3 native architectures passed; all 8 foreign architectures failed
with few errors.

I first ran `make -j4 -k` so that as much as possible would be built,
then `make -j1 -k` and recorded stdout and stderr to the same file.

The full errors are at
https://gist.github.com/o11c/61a02a3a999b952d5710 but I have taken the
repeated the main errors below.

arm64:
gdb/nat/aarch64-linux-hw-point.c:564:64: error: 'count' cannot appear
in a constant-expression

armel and armhf:
opcodes/sh64-dis.c:462: undefined reference to `sh64_get_contents_type'
opcodes/sh64-dis.c:476: undefined reference to `sh64_get_contents_type'

mips and mipsel:
sim/mips/micromips.igen:49: undefined reference to
`micromips_instruction_decode'

powerpc and ppc64el:
gdb/ppc-linux-nat.c:1730:40: error: invalid conversion from 'int' to
'target_hw_bp_type' [-fpermissive]
gdb/ppc-linux-nat.c:1758:40: error: invalid conversion from 'int' to
'target_hw_bp_type' [-fpermissive]

gdb/remote-sim.c:155:27: error: invalid conversion from 'void*' to
'SIM_DESC {aka sim_state*}' [-fpermissive]
gdb/remote-sim.c:157:55: error: invalid conversion from 'void*' to
'sim_inferior_data*' [-fpermissive]
gdb/remote-sim.c:175:48: error: invalid conversion from 'void*' to
'sim_inferior_data*' [-fpermissive]
gdb/remote-sim.c:260:40: error: invalid conversion from 'void*' to
'sim_inferior_data*' [-fpermissive]
gdb/remote-sim.c:770:34: error: invalid conversion from 'void*' to
'sim_inferior_data*' [-fpermissive]
gdb/remote-sim.c:852:28: error: invalid conversion from 'void*' to
'resume_data*' [-fpermissive]
gdb/remote-sim.c:1037:22: error: invalid conversion from 'int' to
'gdb_signal' [-fpermissive]
gdb/remote-sim.c:1043:25: error: invalid conversion from 'int' to
'gdb_signal' [-fpermissive]
gdb/remote-sim.c:1201:72: error: invalid conversion from 'void*' to
'sim_inferior_data*' [-fpermissive]
gdb/remote-sim.c:1234:71: error: invalid conversion from 'void*' to
'sim_inferior_data*' [-fpermissive]

s390x:

gdb/../include/libiberty.h:711:38: error: invalid conversion from
'void*' to 'gdb_byte* {aka unsigned char*}' [-fpermissive]


Note that I have not attempted to cross-build master yet to see if any
of these errors are there too, and I'm not sure exactly whether any
features disable themselves during a cross build.

-Ben

-Ben
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.