8sa1-binutils-gdb/gdb/arch
Tom de Vries 38f8aa06d9 [gdb/build] Fix missing implicit constructor call with gcc 4.8
When building gdb on x86_64-linux with --enable-targets riscv64-suse-linux, I
run into:
...
src/gdb/arch/riscv.c:112:45:   required from here
/usr/include/c++/4.8/bits/hashtable_policy.h:195:39: error: no matching \
  function for call to 'std::pair<const riscv_gdbarch_features, const \
  std::unique_ptr<target_desc, target_desc_deleter> >::pair(const \
  riscv_gdbarch_features&, target_desc*&)'
  : _M_v(std::forward<_Args>(__args)...) { }
                                       ^
...
for this code in riscv_lookup_target_description:
...
  /* Add to the cache.  */
  riscv_tdesc_cache.emplace (features, tdesc);
...

Work around this compiler problem (filed as PR gcc/96537), similar to how that
was done in commit 6d0cf4464e "Fix build with gcc-4.8.x":
...
-  riscv_tdesc_cache.emplace (features, tdesc);
+  riscv_tdesc_cache.emplace (features, target_desc_up (tdesc));
...
That is, call the target_desc_up constructor explictly instead of implicitly.

Also, work around a similar issue in get_thread_arch_aspace_regcache.

Build on x86_64-linux with --enable-targets riscv64-suse-linux, and
reg-tested.

gdb/ChangeLog:

2020-08-08  Tom de Vries  <tdevries@suse.de>

	PR build/26344
	* arch/riscv.c (riscv_lookup_target_description): Use an explicit
	constructor.
	* regcache.c (get_thread_arch_aspace_regcache): Same.
2020-08-08 23:34:19 +02:00
..
aarch32.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
aarch32.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
aarch64-insn.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
aarch64-insn.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
aarch64.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
aarch64.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
amd64.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
amd64.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
arc.c arc: Migrate to new target features 2020-03-16 22:53:10 +01:00
arc.h arc: Migrate to new target features 2020-03-16 22:53:10 +01:00
arm-get-next-pcs.c gnulib: import count-one-bits module and use it 2020-02-14 14:41:07 -05:00
arm-get-next-pcs.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
arm-linux.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
arm-linux.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
arm.c gnulib: import count-one-bits module and use it 2020-02-14 14:41:07 -05:00
arm.h gnulib: import count-one-bits module and use it 2020-02-14 14:41:07 -05:00
i386.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
i386.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
ppc-linux-common.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
ppc-linux-common.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
ppc-linux-tdesc.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
riscv.c [gdb/build] Fix missing implicit constructor call with gcc 4.8 2020-08-08 23:34:19 +02:00
riscv.h gdb/riscv: Update API for looking up target descriptions 2020-02-19 01:24:37 +00:00
tic6x.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
tic6x.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
xtensa.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00