This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: Add -frecord-gcc-switches command line switch

Nick Clifton wrote:
> Hi Mark,
>> I like this patch.  I have some nits, but I'll review & approve a
>> revised version.
> Thanks for the patch review.  A revised version is attached which
> addresses all of the issues that you raised.

> Is this revised version OK to apply ?

Thanks for the revisions.

I see one more thing that I want to clarify before approving the patch:

+	    fputs ("\t.ascii \"", asm_out_file);
+	  varasm_print_gcc_option (name);
+	  fputs ("\\0\"\n", asm_out_file);

Can we use ASM_OUTPUT_ASCII here instead?  It looks like that might
handle the escaping, quoting, embedded NUL issues that you're dealing
with here, and make elf_record_gcc_switches work on any ELF platforms
that use something other than .ascii for strings.  It looks to me like
something like this:

  ASM_OUTPUT_ASCII (asm_out_file, name, strlen (name) + 1);

would work.  (The +1 is so that we encode the trailing NUL.)


Mark Mitchell
(650) 331-3385 x713

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]