Re: [PATCH v2 7/9] compile: New 'compile print'

Jan Kratochvil
2015-04-08T20:33:33Z

On Wed, 08 Apr 2015 22:11:58 +0200, Paul_Koning@dell.com wrote:
> A related question: what controls the compiler switches sent to the compiler
> for this operation? In some cases, specific switches may be needed to
> produce the correct flavor of code generation, say -msoft-float or
> -mabi=xyz.

gdbarch_gcc_target_options()
DW_AT_producer - -grecord-gcc-switches - gcc default if DWARF is present
Some GDB overrides like -O0 -gdwarf-4 -fPIE etc.

The specific switched you mention should get applied by DW_AT_producer.
Some basic ones may be provided already by gdbarch_gcc_target_options().

Jan