Re: Hard links created when installing gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 14 Jul 2024, 00:54 Jack Pugmire via Gcc-help, <gcc-help@xxxxxxxxxxx>
wrote:

> Installing gcc with `make install` on x86_64 Linux creates files
> "prefix/bin/c++" and "prefix/bin/g++" that are hard linked together.
>
> It is more convenient for me to make "prefix/bin/c++" a symbolic link to
> g++ instead.
>

You can do that yourself post-install, if required.



> I have two questions:
> - Could doing this break any common processes that interact with g++, e.g.
> detection by CMake or Bazel?
> - Why does `make install` create hard links (a/o/t symbolic links) in the
> first place? Maybe not all platforms have symbolic links, but x86_64 Linux
> always does as far as I know.
>
> On many systems, there is a file "/usr/bin/cc" that is a symbolic link to
> gcc (or another C compiler), and this appears to work fine.


That's created by the distro, not by the GCC installation.

It also seems
> bad to create hard links like that,


Why?

so maybe the GCC build files could be
> updated to change this behavior. I could probably do it myself if it would
> be helpful.
>
> Or maybe there's a good reason for the hard link! Please let me know if
> this is the case.
>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux