Re: [PATCH 2/2] Introduce the gcc option --record-gcc-command-line

2019-11-08 Thread Segher Boessenkool
On Fri, Nov 08, 2019 at 12:05:19AM +0100, Egeyar Bagcioglu wrote: > On 11/7/19 7:57 PM, Segher Boessenkool wrote: > >>>Opening a file as "r" but then > >>>accessing it with "fread" is peculiar, too. > >>I am not sure what you mean here. Is it that you prefer "wb" and "rb" > >>instead of "w" and

Re: [PATCH 2/2] Introduce the gcc option --record-gcc-command-line

2019-11-07 Thread Egeyar Bagcioglu
On 11/7/19 7:57 PM, Segher Boessenkool wrote: Hi! On Thu, Nov 07, 2019 at 06:44:17PM +0100, Egeyar Bagcioglu wrote: On 11/7/19 9:03 AM, Segher Boessenkool wrote: + ASM_OUTPUT_ASCII(asm_out_file, cmdline, cmdline_length); +} + cmdline[0] = 0; + ASM_OUTPUT_ASCII(asm_out_file,

Re: [PATCH 2/2] Introduce the gcc option --record-gcc-command-line

2019-11-07 Thread Segher Boessenkool
Hi! On Thu, Nov 07, 2019 at 06:44:17PM +0100, Egeyar Bagcioglu wrote: > On 11/7/19 9:03 AM, Segher Boessenkool wrote: > >>+ ASM_OUTPUT_ASCII(asm_out_file, cmdline, cmdline_length); > >>+} > >>+ cmdline[0] = 0; > >>+ ASM_OUTPUT_ASCII(asm_out_file, cmdline, 1); > >>+ > >>+ /* The return

Re: [PATCH 2/2] Introduce the gcc option --record-gcc-command-line

2019-11-07 Thread Egeyar Bagcioglu
Hello again Segher! On 11/7/19 9:03 AM, Segher Boessenkool wrote: Hi! On Wed, Nov 06, 2019 at 06:21:34PM +0100, Egeyar Bagcioglu wrote: +static const char * +record_gcc_command_line_spec_function(int argc ATTRIBUTE_UNUSED, const char **argv) +{ + const char *filename = argv[0]; + FILE *out

Re: [PATCH 2/2] Introduce the gcc option --record-gcc-command-line

2019-11-07 Thread Segher Boessenkool
Hi! On Wed, Nov 06, 2019 at 06:21:34PM +0100, Egeyar Bagcioglu wrote: > +static const char * > +record_gcc_command_line_spec_function(int argc ATTRIBUTE_UNUSED, const char > **argv) > +{ > + const char *filename = argv[0]; > + FILE *out = fopen (filename, "w"); > + if (out) > +{ > +

[PATCH 2/2] Introduce the gcc option --record-gcc-command-line

2019-11-06 Thread Egeyar Bagcioglu
gcc/ChangeLog: 2019-10-21 Egeyar Bagcioglu * common.opt (--record-gcc-command-line): New option. * config/elfos.h (TARGET_ASM_RECORD_GCC_COMMAND_LINE): Define as elf_record_gcc_command_line. * doc/tm.texi: Regenerate. * doc/tm.texi.in