Building a compiler that honors symbolic links.

Jonathan Wakely
Thu May 7 10:43:03 GMT 2020

On Thu, 7 May 2020 at 09:46, xaxazak xak via Gcc-help
<> wrote:
> When I manually build GCC (via SVN trunk) or LLVM (via GIT trunk) I
> use a symbolic link (/make/) to my development folder as part of the
> destination path.
> Both GCC and LLVM extract the “physical” target location of this
> symlink, so their default include paths etc use the physical location,
> which starts with (/media/<HOME>/<HDD>/...) instead of just
> (/make/...).
> This is annoying for a few reasons:
> 1. I’m capturing the header information (via -H), and I want to avoid
> having <HOME> and <HDD> included in this list.
> 2. <HDD> can change.
> I can choose to not use the default include paths (eg -nostdinc++
> etc), and just explicitly set them when I invoke clang, but that makes
> build setup a lot more complex.
> Is there any way I can build GCC (and LLVM / clang if you know) so
> that it remembers my symlinks instead of expanding them?

You'll have to provide more information. How are you configuring GCC?
What are the paths involved? What is the path you're talking about
used for? Is it where GCC is installed? --prefix? --with-sysroot?
Something else? What paths does gcc show if you add -v when compiling?

More information about the Gcc-help mailing list