On 1/4/21 1:36 PM, Jeff Law wrote:

On 1/4/21 10:40 AM, Bill Schmidt via Gcc wrote:
Hi!  I'm attempting to do something that may not have been done
before, so I'm looking for advice, or a pointer to where, in fact, it
has been done before. :)

I'm automatically generating a back-end header file that declares some
structures that include trees, and a bunch of global variables that
are also trees.  I've marked everything up appropriately, but I also
need to teach the garbage collector that this file exists.

Most back-end files are automatically scanned by gengtype.  Per the
documentation, anything that isn't handled automatically needs to be
added to target_gtfiles in config.gcc.  However, I can't come up with
a syntax for describing a file in the gcc/ build subdirectory.  Some
places in config.gcc allow "./filename" as shorthand for "filename"
being in the current build directory, but that doesn't seem to work
for adding something to gtyp-input.list.

Any recommendations on what I should do next?  At the moment it looks
like I might have to hack on gengtype to invent a way to scan a file
in the build directory, but I have a mild amount of hope that someone
has solved this before.  Thanks for any help!
Yea, I don't see any indication this has ever been done before.  I'm a
bit surprised that ./<filename> doesn't work since gengtype runs from
the build directory and has to reference things in the source directory
and ./<whatever> would seem to naturally reference the build directory

Jeff

I've gotten this working, with a little hacking on gengtype needed.  I'll propose that patch next stage 1.

Bill

Reply via email to