>>>>> "Joseph" == Joseph S Myers <jos...@codesourcery.com> writes:
Tom> This patch adds the plugin to the gcc tree and updates the Tom> top-level configury. Following up on your review. Joseph> I don't see anything obvious that would disable the plugin if Joseph> plugins are unsupported (e.g. on Windows host) or disabled Joseph> (--disable-plugin). Probably the relevant support from Joseph> gcc/configure.ac needs to go somewhere it can be used at Joseph> toplevel. I've moved some relevant code to a new .m4 file in config and used it from the plugin itself. This seemed simpler than dealing with it at the top level. The plugin also self-disables if its configury needs are not met. Tom> + self->args.push_back ("gcc"); Joseph> seems wrong - at least you should use the appropriate compiler Joseph> name after transformation for cross compilers / Joseph> --program-transform-name. Though really the *versioned* driver Joseph> $(target_noncanonical)-gcc-$(version) is the right one to use, This turned out to be a pain :-) There are two basic problems. First, gdb gets the names of its architectures from BFD, which doesn't always use the same naming scheme as the GNU configury triplets. It does generally use the same names, but for x86 targets it differs quite a bit. Second, the configury triplets can vary in annoying ways that don't really affect correct operation. For example, "i586-" versus "i686-" (there is a difference, but I think ignorable given the compiler flags in the debuginfo, and anyway I suspect not discoverable by gdb); or "-unknown-" versus "-pc-" (completely irrelevant AFAIK); or even "x86_64-redhat-linux" versus "x86_64-unknown-linux-gnu" (seemingly gratuitous). In the end I added some code to gdb and to libcc1.so to construct a regexp matching plausible results and then search $PATH for matches. Which seems rather gross, but workable in reasonable scenarios. I didn't try to apply the program transform name. I suppose I could apply it to the final "gcc" component of the name, though, without much trouble. I'll fix this up tomorrow. Let me know if you have any issue with the above. Barring that, I will be resubmitting the series soon, most likely this week. thanks, Tom