[PATCH 02/57] Support scanning of build-time GC roots in gengtype

Bill Schmidt wschmidt@linux.ibm.com
Mon Jun 7 15:38:43 GMT 2021

On 6/7/21 8:36 AM, Richard Biener wrote:
> Some maybe obvious issue - what about DOS-style path hosts?
> You seem to build ../ strings to point to parent dirs...  I'm not sure
> what we do elsewhere - I suppose we arrange for appropriate
> -I command line arguments?
Well, actually it's just using "./" to identify the build directory, 
though I see what you mean about potential Linux bias. There is 
precedent for this syntax identifying the build directory in config.gcc 
for target macro files:

#  tm_file              A list of target macro files, if different from
#                       "$cpu_type/$cpu_type.h". Usually it's constructed
#                       per target in a way like this:
#                       tm_file="${tm_file} dbxelf.h elfos.h 
#                       Note that the preferred order is:
#                       - specific target header 
#                       - generic headers like dbxelf.h elfos.h, etc.
#                       - specializing target headers like 
#                       This helps to keep OS specific stuff out of the CPU
#                       defining header ${cpu_type}/${cpu_type.h}.
#                       It is possible to include automatically-generated
#                       build-directory files by prefixing them with "./".
#                       All other files should relative to $srcdir/config.

...so I thought I would try to be consistent with this change. In patch 
0025 I use this as follows:

--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -491,6 +491,7 @@ powerpc*-*-*)
         extra_options="${extra_options} g.opt fused-madd.opt 
+       target_gtfiles="$target_gtfiles ./rs6000-builtins.h"

I'm open to trying to do something different if you think that's 

Thanks for your help with this!


More information about the Gcc-patches mailing list