Don't pass -m32 to libcc1 on arm-linux
When I run gdb.compile/ tests on arm-linux, I get the following fails, (gdb) compile code -- ;^M arm-none-linux-gnueabihf-gcc: error: unrecognized command line option '-m32'; did you mean '-mbe32'?^M Compilation failed.^M (gdb) compile code (void) param^M arm-none-linux-gnueabihf-gcc: error: unrecognized command line option '-m32'; did you mean '-mbe32'?^M Compilation failed.^M (gdb) FAIL: gdb.compile/compile-ops.exp: compile code (void) param This patch fixes it by implementing gcc_target_options gdbarch method for arm-linux to override option "-m32". gdb: 2018-01-19 Yao Qi <yao.qi@linaro.org> * arm-linux-tdep.c (arm_linux_gcc_target_options): New function. (arm_linux_init_abi): Install it.
This commit is contained in:
parent
dea445b940
commit
88af8ea80b
@ -1,3 +1,8 @@
|
||||
2018-01-19 Yao Qi <yao.qi@linaro.org>
|
||||
|
||||
* arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
|
||||
(arm_linux_init_abi): Install it.
|
||||
|
||||
2018-01-19 Yao Qi <yao.qi@linaro.org>
|
||||
|
||||
* osabi.c (gdb_osabi_names): Extend the regexp for
|
||||
|
@ -1712,6 +1712,15 @@ arm_linux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
|
||||
return find_solib_trampoline_target (frame, pc);
|
||||
}
|
||||
|
||||
/* Implement the gcc_target_options gdbarch method. */
|
||||
|
||||
static char *
|
||||
arm_linux_gcc_target_options (struct gdbarch *gdbarch)
|
||||
{
|
||||
/* GCC doesn't know "-m32". */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
arm_linux_init_abi (struct gdbarch_info info,
|
||||
struct gdbarch *gdbarch)
|
||||
@ -1992,6 +2001,8 @@ arm_linux_init_abi (struct gdbarch_info info,
|
||||
arm_linux_record_tdep.arg5 = ARM_A1_REGNUM + 4;
|
||||
arm_linux_record_tdep.arg6 = ARM_A1_REGNUM + 5;
|
||||
arm_linux_record_tdep.arg7 = ARM_A1_REGNUM + 6;
|
||||
|
||||
set_gdbarch_gcc_target_options (gdbarch, arm_linux_gcc_target_options);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user