https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105487
--- Comment #9 from Paul Smith <psmith at gnu dot org> --- Just to note, there are similar needs for empty directories in the GCC installation itself; for example in a GCC install of a 64bit compiler without 32bit support this directory will be created by the installer: unknown/x86_64-unknown-linux-gnu/lib which will be empty. GCC searches paths that are relative to this directory, as in: unknown/bin/../lib/gcc/x86_64-unknown-linux-gnu/11.3.0/../../../../x86_64-unknown-linux-gnu/lib/../lib64/ Note how this uses x86_64-unknown-linux-gnu/lib/../lib64 so if that empty lib directory is not present, this path cannot be found and linking will fail. While it is true that the GCC install creates that empty directory, if you store the compiler in a facility that doesn't preserve empty directories (like git) they will disappear. Of course this can be worked around by creating a temp file in empty directories and since the empty directories ARE created as part of the compiler install this is not really a bug; it's just a slightly surprising annoyance that has to be kept in mind. It would be better (IMO) if GCC used resolved paths here as well.