This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Thu, Jun 14, 2007 at 04:44:14PM -0700, H. J. Lu wrote: > On Thu, Jun 14, 2007 at 04:31:50PM -0700, David Daney wrote: > > > > That doesn't make any sense. Why would you be checking if the build > > compiler supports certain features when configuring libgcc? > > > > Please read my patch again. For native build, it uses > GCC_CHECK_TLS in gcc to check if the target supports TLS at > run-time since the native compiler is used for GCC_CHECK_TLS. > Even if the build compiler doesn't support TLS, it won't be a > problem. The stage 2 and stage 3 libgcc will still use TLS if > the stage 2 and stage 3 compilers do supprot TLS at run-time. > > For cross build, it uses GCC_CHECK_TLS in libgcc to check if > the target supports TLS since CC_FOR_TARGET is used for building > libgcc which is a target library. Since you can't do run-time > check with a cross compiler, GCC_CHECK_TLS will just do compile > time check. In that case, it will just trust users. > > Please read config/tls.m4 and my patch very carefully. They are > kind of tricky. There are a few issues: 1. libbid includes "auto-host.h" to get ENABLE_DECIMAL_BID_FORMAT because ENABLE_DECIMAL_BID_FORMAT isn't marked as a target template. 2. HAVE_TLS in gcc set by GCC_CHECK_TLS should a target template and should be set only when the compile to be built is a native compiler for the native target. Otherwise, it may be wrong for target. 3. When Makefile in libgcc defines HAVE_TLS for cross compiler, it will be undefined in auto-host.h in gcc. We can use USE_TLS in libgcc and libbid can check both HAVE_TLS and USE_TLS. I am enclosing 2 patchs, one for gcc and one for libbid, to address those issues. Thanks. H.J.
Attachment:
gcc-tls-3.patch
Description: Text document
Attachment:
libbid-thread-5.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |