This is the mail archive of the gcc-patches@gcc.gnu.org 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: [3.4 patch?] -save-temps still produces different .s and .o


On Jan 20, 2004, Per Bothner <per@bothner.com> wrote:

> It "fixes" the cpp output to be more-or-less the historical,
> adding support for Alex's -fworking-directory mechanism.

Thank you very much.  This indeed brings us back to the same status we
had when -fworking-directory was introduced, which is good.

Unfortunately, even after your patch, we still emit an initial .file
directive naming the .i file when compiling with -save-temps, which is
bad.  The assembler generates a different object file because of this,
which means bootstrap still fails.  Just to be clear: it's not a
regression you have introduced, we already had this problem when
-fworking-directory was introduced, and I didn't have a chance to try
to fix it.  I'll look a bit more into how to overcome this problem.

> I think this should go into the 3.4 branch as well as mainline.
> However, I'd appreciate it if people did some more testing on it.

Will do.  I've just tried a bootstrap, after applying the patch to
mainline (needed some patch conflict resolution), and found out it
wouldn't bootstrap because this hunk:

> +      /* Set this here so the client can change the option if it wishes,
> +	 and after stacking the main file so we don't trace the main file.  */
> +      cpp_get_line_maps (parse_in)->trace_includes
> +	= cpp_opts->print_include_names;

attempts to modify a read-only data structure, which triggers a
warning.  That plus -Werror means bootstrap fails.

I commented this out just to make sure bootstrap completed otherwise,
and it did.  Yay!  Now on to the 3.4 branch.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Happy GNU Year!                     oliva@{lsd.ic.unicamp.br, gnu.org}
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist                Professional serial bug killer


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