This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Check TLS for libgcc
Is this patch OK to install?
H.J.
On Wed, Jun 20, 2007 at 09:45:13AM -0700, H. J. Lu wrote:
> On Wed, Jun 20, 2007 at 05:01:54PM +0200, Paolo Bonzini wrote:
> >
> > >BTW, when --disable-bootstrap is used, the build compiler will be
> > >checked. If one supports TLS and the other doesn't, you will get
> > >a different BID library. Is this a problem we have to resolve?
> >
> > Yes, that's what I meant by "will not work if --disable-bootstrap is
> > used". I suggest that you just modify libgcc/config.host to list hosts
> > with TLS (I will leave to other people, such as Jakub and Daniel, to
> > judge whether your solution is technically correct, as opposed to "just
> > working").
> >
>
> Here is a patch. Tested on Linux/ia32 and Linux/x86-64.
>
>
> H.J.
> ----
> 2007-06-20 H.J. Lu <hongjiu.lu@intel.com>
>
> * config.host (tmake_file): Add t-tls for i[34567]86-*-linux*
> and x86_64-*-linux*.
>
> * config/t-tls: New file.
>
> --- libgcc/config.host.tls 2007-06-14 05:12:39.000000000 -0700
> +++ libgcc/config.host 2007-06-20 09:40:07.000000000 -0700
> @@ -654,3 +654,9 @@ m32c-*-elf*)
> exit 1
> ;;
> esac
> +
> +case ${host} in
> +i[34567]86-*-linux* | x86_64-*-linux*)
> + tmake_file="${tmake_file} t-tls"
> + ;;
> +esac
> --- libgcc/config/t-tls.tls 2007-06-20 09:36:54.000000000 -0700
> +++ libgcc/config/t-tls 2007-06-20 09:37:30.000000000 -0700
> @@ -0,0 +1,2 @@
> +# Use thread-local storage
> +gcc_compile_bare += -DUSE_TLS