Why do we create a broken symlink for include/bits/stamp-bits ?

Jonathan Wakely jwakely@redhat.com
Mon Oct 30 16:29:00 GMT 2017


On 25/10/17 13:18 +0100, Jonathan Wakely wrote:
>In include/Makefile the stamp-bits-sup target creates a symlink called
>stamp-bits:
>
>stamp-bits-sup: stamp-bits ${bits_sup_headers}
>	@-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null
>	#                        ^^^^^^^^^^^^
>	@$(STAMP) stamp-bits-sup
>
>Should this use "$(LN_S) ${bits_sup_headers} ." instead, so it only
>creates symlinks for the headers, not "stamp-bits" as well?
>
>The broken symlink isn't a big deal but causes errors like:
>
>libstdc++-v3$ grep -R foobar include/
>grep: include/bits/stamp-bits: Too many levels of symbolic links


I've committed this to fix it. Tested powerpc64le-linux.

Another way to fi it would have been "$(LN_S) $(filter-out $<,$?) ."
but I think what I've committed is easier to grok and less fragile.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 858 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20171030/ddc0466a/attachment.bin>


More information about the Libstdc++ mailing list