This happened while building on MacOS 10.11.6, where g++ is actually Apple LLVM version 8.0.0 (clang-800.0.42.1). Configuration was all fine, and part of the build also went well. However, partway into building, this results in: make[3]: Leaving directory '/Volumes/untitled/openadk/toolchain_build_beaglebone-black_uclibc-ng_cortex_a8_hard_eabihf_arm/w-gdb-8.2.1-1/gdb-8.2.1-obj/gdb' CXX stap-probe.o /Volumes/untitled/openadk/toolchain_build_beaglebone-black_uclibc-ng_cortex_a8_hard_eabihf_arm/w-gdb-8.2.1-1/gdb-8.2.1/gdb/stap-probe.c:122:29: error: default initialization of an object of const type 'const stap_static_probe_ops' without a user-provided default constructor const stap_static_probe_ops stap_static_probe_ops; ^ {} 1 error generated. Makefile:1619: recipe for target 'stap-probe.o' failed I think that it is up to the configuration step to take care of evaluating whether the compiler is new enough to accept this construct, and fail otherwise. Details about the error itself: https://stackoverflow.com/questions/7411515/why-does-c-require-a-user-provided-default-constructor-to-default-construct-a
I sent a patch.
The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4212d5091457541bd7e7eff0591805ef7b7333e3 commit 4212d5091457541bd7e7eff0591805ef7b7333e3 Author: Tom Tromey <tromey@adacore.com> Date: Thu Dec 19 11:35:22 2019 -0700 Add constructor to stap_static_probe_ops PR build/24937 concerns an error given by the clang provided by a particular version of macOS. In particular, it reports error: default initialization of an object of const type 'const stap_static_probe_ops' without a user-provided default constructor Although (at least according to sources I found online) this was resolved as a bug in the standard, it seemed simple enough to work around this. Given that this is a trivial build fix, I think it should go on the gdb 9 branch as well. gdb/ChangeLog 2020-01-07 Tom Tromey <tromey@adacore.com> PR build/24937: * stap-probe.c (class stap_static_probe_ops): Add constructor. Change-Id: I18f180c17850f420e9b66afc67f9cb3d8dceb0b3
The gdb-9-branch branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3c473fad8f153feee08dce0d79f0b1119a7be2a6 commit 3c473fad8f153feee08dce0d79f0b1119a7be2a6 Author: Tom Tromey <tromey@adacore.com> Date: Thu Dec 19 11:35:22 2019 -0700 Add constructor to stap_static_probe_ops PR build/24937 concerns an error given by the clang provided by a particular version of macOS. In particular, it reports error: default initialization of an object of const type 'const stap_static_probe_ops' without a user-provided default constructor Although (at least according to sources I found online) this was resolved as a bug in the standard, it seemed simple enough to work around this. Given that this is a trivial build fix, I think it should go on the gdb 9 branch as well. 2020-01-07 Tom Tromey <tromey@adacore.com> PR build/24937: * stap-probe.c (class stap_static_probe_ops): Add constructor. Change-Id: I18f180c17850f420e9b66afc67f9cb3d8dceb0b3
I worked around this by adding the constructor.