Building a compiler that honors symbolic links.

xaxazak xak xaxazak@gmail.com
Thu May 7 08:44:37 GMT 2020


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?


(NOTE: Also asked for LLVM, here:
https://llvm.discourse.group/t/maintaining-symlinks-when-installing/955)


Thanks,
Simon.


More information about the Gcc-help mailing list