On 06 March 2007 20:12, Paulo J. Matos wrote:

> On 3/6/07, Dave Korn <[EMAIL PROTECTED]> wrote:
>> On 06 March 2007 18:22, Paulo J. Matos wrote:
>> 
>> 
>>> i686-pc-linux-gnu-ar: symbol-tables.o: No such file or directory
>>> 
>>> And in fact there is no symbol-tables.o but I saw it being compiled so
>>> I wonder where it has gone to.
>>> 
>>> 
>>> Any suggestions ??
>> 
>>   1.  Always pipe the build output to a file so you can review it after the
>> build and see what went wrong.
>> 
> 
> Yes, so? What help would that be right now?

  You would be able to look again at the command-line that was invoked when
you "saw it being compiled" and see what the -o option said.  You could also
see if there were any errors when it was compiled.
 
>>   2.  Learn about the unix 'find' command.
>> 
> 
> I know about the find command! Why should I need it here? To do "find
> . -name symbol-tables.o" ? I told you, there's no such file.

  You also told me you "saw it being compiled", from which I inferred that it
/was/ compiled, from which I inferred that there had to be an output file
somewhere.  The only way I could reconcile those two seemingly-contradictory
statements was to assume that you must not have looked for it in the place
where it actually ended up.

  Of course, it's possible that it was compiled one minute and automagically
deleted the next.  If you had had that log file, you'd be able to see *that*
too.

>>   3.  Don't use a subdirectory, none of the other passes do that,
>> subdirectories are for separate languages.  Think of it like this: a
>> compile taking place in a subdirectory of the gcc build dir can reference
>> the core gcc .o files built in the parent dir, but the core gcc build in
>> the parent dir can't reference files in a sub-dir.  (This isn't strictly
>> true, I'm sure there's a way to make it work, but all the existing build
>> machinery works this way round and it's probably easiest to keep to the
>> same scheme). 
>> 
> 
> So, any auxiliar files to the pass should be in the same directory as
> the pass itself.

  Well, that is how every other pass has been implemented.

> Or do you advise me to have _all_ the code in the
> pass file?

  No, I advise that when adding a pass, regardless of whether the code can fit
in a single file or is large enough to need to use several separate files,
it's consistent to put all the files that implement the pass in the main 'gcc'
source directory.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

Reply via email to