Message ID | yddaa88xigf.fsf@manam.CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
On 11/07/2011 03:47 AM, Rainer Orth wrote: > While the configure triplet has i386 as target_cpu, the port defaults > to --with-arch=pentiumpro (Solaris 8/9) or pentium4 (Solaris 10+). > I've changed configure.tgt to accept i386 as well, but this needs to > be dealt with in a more general way. Besides, this should fail > e.g. with an error or something, not with a missing header. You're right about that. > Solaris/SPARC is going to have a similar issue: the default configure > triplet is sparc-sun-solaris2*, still it defaults to v8plus, so cas is > available. I haven't tried a bootstrap yet, though. Of course there's a bit more porting work to do for a new cpu. E.g. implementing the sjlj.S file. We should make sure that the bootstrap succeeds though, disabling the library when porting work hasn't been done. > * config/x86/cacheline.h doesn't assemble with Sun as: > > Assembler: cacheline.cc > "/var/tmp//ccM9aGuv.s", line 148 : Syntax error > Near line: " jnz,pn 0b" > make[2]: *** [cacheline.lo] Error 1 Ug. I hate conditionalizing these things. > * libitm.map cannot work with Sun ld due to its use of wildcards. In > fact, the whole symbol versioning support was copied from libgomp > before gcc gained symbol versioning for Sun ld. Fortunately, this > still works for now, but should be fixed before GCC 4.7.0 is released. Ok, we can take care of this post-merge. Thanks for the review of the configury as well. > * configure.tgt: Handle i386 like i[456]86. > * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't > take address. > * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD || > !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable. Ok for branch. r~
On Mon, 7 Nov 2011, Richard Henderson wrote: > We should make sure that the bootstrap succeeds though, > disabling the library when porting work hasn't been done. For disabling libraries, I've suggested that toplevel configure should source a file from the subdirectory that says whether a target is supported (maybe sets various libitm_* shell variables relating to the configuration for that target including libitm_supported or similar to say whether it's supported at all). Such a file might also be sourced by libitm configure. The idea is to get toplevel configure out of the business of listing targets that do or do not support particular languages or libraries, instead keeping that information with the libraries themselves (and so not needing merging between the gcc and src repositories). You can do this incrementally, one subdirectory at a time.
Richard Henderson <rth@redhat.com> writes: >> Solaris/SPARC is going to have a similar issue: the default configure >> triplet is sparc-sun-solaris2*, still it defaults to v8plus, so cas is >> available. I haven't tried a bootstrap yet, though. > > Of course there's a bit more porting work to do for a new cpu. > E.g. implementing the sjlj.S file. I see. Currently, it seems you have to go by example. For the SPARC case, this seems to be something for Eric and/or David to try. > We should make sure that the bootstrap succeeds though, > disabling the library when porting work hasn't been done. Indeed :-) I wanted to give Tru64 UNIX a try, but am currently running into an ICE building stage1 libstdc++: /var/gcc/regression/trunk/5.1b-gcc/build/alpha-dec-osf5.1b/libstdc++-v3/include/bits/ptr_traits.h:158:12: internal compiler error: in dbxout_type, at dbxout.c:2372 Have to check out what's going on here first. >> * config/x86/cacheline.h doesn't assemble with Sun as: >> >> Assembler: cacheline.cc >> "/var/tmp//ccM9aGuv.s", line 148 : Syntax error >> Near line: " jnz,pn 0b" >> make[2]: *** [cacheline.lo] Error 1 > > Ug. I hate conditionalizing these things. It should be doable to follow the libffi lead to deal with sjls.S with Sun as without .cfi* support on x86. >> * libitm.map cannot work with Sun ld due to its use of wildcards. In >> fact, the whole symbol versioning support was copied from libgomp >> before gcc gained symbol versioning for Sun ld. Fortunately, this >> still works for now, but should be fixed before GCC 4.7.0 is released. > > Ok, we can take care of this post-merge. Indeed. I'll give it a try if I get around to it. >> * configure.tgt: Handle i386 like i[456]86. >> * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't >> take address. >> * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD || >> !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable. > > Ok for branch. I didn't manage to apply it in time before the merge. Still ok for mainline, I assume? I've just completed a C++-only bootstrap on i386-pc-solaris2.11, the only new failures compared to my test last weekend being FAIL: libitm.c/clone-1.c execution test for both 32 and 64-bit. Thanks. Rainer
On 11/08/2011 06:51 AM, Rainer Orth wrote: >>> >> * configure.tgt: Handle i386 like i[456]86. >>> >> * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't >>> >> take address. >>> >> * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD || >>> >> !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable. >> > >> > Ok for branch. > I didn't manage to apply it in time before the merge. Still ok for > mainline, I assume? I've just completed a C++-only bootstrap on > i386-pc-solaris2.11, the only new failures compared to my test last > weekend being Yes of course. r~
diff --git a/libitm/config/generic/tls.cc b/libitm/config/generic/tls.cc --- a/libitm/config/generic/tls.cc +++ b/libitm/config/generic/tls.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Free Software Foundation, Inc. +/* Copyright (C) 2010, 2011 Free Software Foundation, Inc. Contributed by Richard Henderson <rth@redhat.com>. This file is part of the GNU Transactional Memory Library (libitm). @@ -26,6 +26,10 @@ namespace GTM HIDDEN { +#if !defined(HAVE_ARCH_GTM_THREAD) || !defined(HAVE_ARCH_GTM_THREAD_DISP) +__thread gtm_thread_tls _gtm_thr_tls; +#endif + // Filter out any updates that overlap the libitm stack, as defined by // TOP (entry point to library) and BOT (below current function). This // definition should be fine for all stack-grows-down architectures. diff --git a/libitm/config/generic/tls.h b/libitm/config/generic/tls.h --- a/libitm/config/generic/tls.h +++ b/libitm/config/generic/tls.h @@ -49,7 +49,7 @@ extern __thread gtm_thread_tls _gtm_thr_ #ifndef HAVE_ARCH_GTM_THREAD // If the target does not provide optimized access to the thread-local // data, simply access the TLS variable defined above. -static inline gtm_thread *gtm_thr() { return &_gtm_thr_tls.thr; } +static inline gtm_thread *gtm_thr() { return _gtm_thr_tls.thr; } static inline void set_gtm_thr(gtm_thread *x) { _gtm_thr_tls.thr = x; } #endif diff --git a/libitm/configure.tgt b/libitm/configure.tgt --- a/libitm/configure.tgt +++ b/libitm/configure.tgt @@ -52,7 +52,7 @@ case "${target_cpu}" in powerpc*) ARCH=powerpc ;; s390*) ARCH=s390 ;; - i[456]86) + i[3456]86) case " ${CC} ${CFLAGS} " in *" -m64 "*) ;;