This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to use protoize ?
> From: Jim Wilson <wilson@tuliptree.org>
>
> Kaveh R. Ghazi wrote:
> > Would someone please help me with using protoize? (I want to be able
> > to run it as a test if I happen to change it as part of maintenance
> > patches.)
>
> In c-aux-info, in gen_aux_info_record, there is a comment that states
> that protoize only works for files in the current working directory, and
> hence it always emits "." for the directory.
>
> Protoize fails when it tries to convert a relative pathname for an
> include file to a full pathname. It ends up using the directory holding
> the source file instead of using the current working directory, and that
> gives a full pathname that is nonsense.
>
> See invocation_filename in protoize.c. c-aux-info emits ".", and
> process_aux_info_file converts this into the source file name. Later
> on, in referenced_file_is_newer, we call abspath with
> invocation_filename, and hence header file names which are relative to
> the objdir get treated as relative to the srcdir. It isn't clear to me
> if this has ever worked the way you want it to.
> --
> Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
Ah, I see. When I used it previously it was on files in the gcc dir.
Most of those have been converted to ISO C by now which is why I was
trying to use config/sparc/sparc.c.
I got protoize working by moving sparc.c into the gcc dir and running
protoize from there.
Thanks for you help,
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu