Michael Welsh Duggan via Gcc <gcc@gcc.gnu.org> writes:
> I am attempting to debug an issue in gcc (PR 110827, if curious). In > order to do this I have built a stage 1 compiler with debugging and > without optimization as discussed here: > > https://gcc.gnu.org/wiki/DebuggingGCC#Building_a_Debuggable_Compiler > > I would like run the compiler from its build location without installing > it, but I cannot determine how to have gcc look for its include files > and libraries from within its source and build trees. My first problem > was that it looked for for cc1plus in the wrong location; my next > problems involved include paths. > You can try something like: ./xgcc -B$(pwd) -I$(pwd) ... # (may need to add some more include directives in) I know someone was interested in adding a proper wrapper for this so it Just Worked. But for now, I'd really just... > Is it possible to do this without extensive command-line options, or > does this need to be installed? If the latter, what target do I use to > install the unoptimized stage 1 compiler? Is there a particular reason you can't install it to a temporary prefix, like ./configure --prefix=/opt/foo or even /tmp/foo?