testsuite: Add tls_link effective target

Some tests have 'dg-do link' but currently require 'tls' which is a
compile-only check.

In some configurations of arm-none-eabi, the 'tls' effective-target
can be successful although these tests fail to link with
undefined reference to `__aeabi_read_tp'

This patch as a new tls_link effective target which makes sure we can
build an executable.

gcc/testsuite/ChangeLog:

	* lib/target-supports.exp (check_effective_target_tls_link): New.
	* g++.dg/tls/pr102496-1.C: Require tls_link.
	* g++.dg/tls/pr77285-1.C: Likewise.

gcc/ChangeLog:

	* doc/sourcebuild.texi (tls_link): Add documentation.

(cherry picked from commit 8287861f7ca7418cd924ea2491c743c72ddb55dd)
4 files changed