Re: Why are libgcc.a and libgcc_eh.a compiled with -fvisibility=hidden?

2012-03-07 Thread Ian Lance Taylor
Eric Botcazou writes: >> True, but not, as far as I can see, an explanation for why the symbols >> are hidden. Hiding the symbols doesn't fix the problem of having >> multiple libgcc_eh on those platforms. > > Yes, it does, as it prevents libgcc_eh from being linked in shared libraries, > thus

Re: Why are libgcc.a and libgcc_eh.a compiled with -fvisibility=hidden?

2012-03-07 Thread Eric Botcazou
> True, but not, as far as I can see, an explanation for why the symbols > are hidden. Hiding the symbols doesn't fix the problem of having > multiple libgcc_eh on those platforms. Yes, it does, as it prevents libgcc_eh from being linked in shared libraries, thus forcing you to use libgcc_s.so,

Re: [RFC patch] spindep: add cross cache lines checking

2012-03-07 Thread Ingo Molnar
* Alex Shi wrote: > On Wed, 2012-03-07 at 14:39 +0100, Ingo Molnar wrote: > > * Alex Shi wrote: > > > > > > I think the check should be (__alignof__(lock) < > > > > __alignof__(rwlock_t)), otherwise it will still pass when > > > > you have structure with attribute((packed,aligned(2))) > > >

Re: Why are libgcc.a and libgcc_eh.a compiled with -fvisibility=hidden?

2012-03-07 Thread Ian Lance Taylor
Eric Botcazou writes: >> So ... is there a valid reason for this, or is this just an accident >> of history? AFICT, this behavior dates back to 2007 as of r120429 >> (http://gcc.gnu.org/viewcvs/trunk/libgcc/static-object.mk?view=markup&pathr >>ev=120429). > > At least on some platforms, you cann

Restricting with Multilib

2012-03-07 Thread Mohamed Shafi
Hi, For the target that i am porting needs a cpu command line option i.e it doesn't have a default option. Currently it takes 3 variant, say cpu1, cpu2, cpu3. So when i enable multilib option MULTILIB_OPTIONS = mcpu=1/mcpu=2/mcpu=3 I get the following libgcc variants: cpu1/libgcc cpu2/libgcc c

Re: Why are libgcc.a and libgcc_eh.a compiled with -fvisibility=hidden?

2012-03-07 Thread Eric Botcazou
> So ... is there a valid reason for this, or is this just an accident > of history? AFICT, this behavior dates back to 2007 as of r120429 > (http://gcc.gnu.org/viewcvs/trunk/libgcc/static-object.mk?view=markup&pathr >ev=120429). At least on some platforms, you cannot have more than one libgcc_eh

Re: Why are libgcc.a and libgcc_eh.a compiled with -fvisibility=hidden?

2012-03-07 Thread Ian Lance Taylor
Ollie Wild writes: > So ... is there a valid reason for this, or is this just an accident > of history? AFICT, this behavior dates back to 2007 as of r120429 > (http://gcc.gnu.org/viewcvs/trunk/libgcc/static-object.mk?view=markup&pathrev=120429). No, that's not right. That change just moves th

Re: questions about dependence analysis in CG

2012-03-07 Thread Ian Lance Taylor
Peng Zhao writes: > 1. what is the purpose of the reg_note and ds_t? The reg-note lives in the RTL. ds_t is the same information represented as a bitflag. E.g., see how the bits are accumulated in a ds_t variable in ask_dependency_caches. > Where can I find information about memory dependence

Re: [RFC patch] spindep: add cross cache lines checking

2012-03-07 Thread Alex Shi
> > 1, it is alignof bug for default gcc on my fc15 and Ubuntu 11.10 etc? > > > > struct sub { > > int raw_lock; > > char a; > > }; > > struct foo { > > struct sub z; > > int slk; > > char y; > > }__attribute__((packed)); > > > > struct foo f1; > > > > __

Why are libgcc.a and libgcc_eh.a compiled with -fvisibility=hidden?

2012-03-07 Thread Ollie Wild
For reasons outside the scope of this discussion, we're experimenting with statically linking libgcc.a and libgcc_eh.a into dynamically linked applications which depend on libc but no other dynamic libraries. To make this work, libc needs to access a few functions for stack unwinding inside pthrea

Re: [RFC patch] spindep: add cross cache lines checking

2012-03-07 Thread Alex Shi
On Wed, 2012-03-07 at 14:39 +0100, Ingo Molnar wrote: > * Alex Shi wrote: > > > > I think the check should be (__alignof__(lock) < > > > __alignof__(rwlock_t)), otherwise it will still pass when > > > you have structure with attribute((packed,aligned(2))) > > > > reasonable! > > > > >> 1, it

Re: gcc-4.3-20120304 is now available

2012-03-07 Thread Gerald Pfeifer
On Sun, 4 Mar 2012, gccad...@gcc.gnu.org wrote: > Snapshot gcc-4.3-20120304 is now available on > ftp://gcc.gnu.org/pub/gcc/snapshots/4.3-20120304/ What happened here? Some collateral damage while getting the GCC 4.7 branch set up? Gerald

Re: GCC 4.7.0 and C++ atomics

2012-03-07 Thread Richard Henderson
On 03/07/12 10:44, Andrew MacLeod wrote: > rth, you are familiar with how this part is suppose to hook up properly... > > I traced the code in expand_mem_thread_fence, and the sync_synchronize is > being emiited by: > > else if (synchronize_libfunc != NULL_RTX) > emit_library_call (synch

Re: GCC 4.7.0 and C++ atomics

2012-03-07 Thread Joel Sherrill
On 03/07/2012 12:44 PM, Andrew MacLeod wrote: On 03/07/2012 10:11 AM, Sebastian Huber wrote: Hello, I run the GCC testsuite for GCC 4.7.0 20120307 http://gcc.gnu.org/ml/gcc-testresults/2012-03/msg00782.html I got a lot of errors like this: FAIL: g++.dg/simulate-thread/atomics-1.C -O0 -g

Re: GCC 4.7.0 and C++ atomics

2012-03-07 Thread Andrew MacLeod
On 03/07/2012 10:11 AM, Sebastian Huber wrote: Hello, I run the GCC testsuite for GCC 4.7.0 20120307 http://gcc.gnu.org/ml/gcc-testresults/2012-03/msg00782.html I got a lot of errors like this: FAIL: g++.dg/simulate-thread/atomics-1.C -O0 -g (test for excess errors) 148796 Excess errors

questions about dependence analysis in CG

2012-03-07 Thread Peng Zhao
Hello, I am a little confused by the code in sched-deps.c. 1. what is the purpose of the reg_note and ds_t? I see the function dk_to_ds, and the comment in sched-int.h, "Dependence on instruction can be of multiple types (e.g. true and output). This fields enhance REG_NOTE_KIND informatio

Re: User directed Function Multiversioning (MV) via Function Overloading

2012-03-07 Thread Andi Kleen
Richard Guenther writes: > > I don't like specifying 'arch' at all. Instead you _always_ want architecture > feature tests, not architecture tests. Because, does amdfam10 also cover > bdver1? [it can't! bdver1 does no longer have 3dnow! but that's entirely > surprising for a user] There's stil

Re: GCC 4.7.0 Release Candidate available from gcc.gnu.org

2012-03-07 Thread Marc Glisse
On Wed, 7 Mar 2012, NightStrike wrote: Building gmp/mpfr/mpc in tree fails in the configure-stage1-mpc step with the current version of mpfr version 3.1.0, out since last October, and mpc, version 0.9, out since Feb of 2011. I'm guessing the sources moved or something. http://gcc.gnu.org/bugz

GCC 4.7.0 and C++ atomics

2012-03-07 Thread Sebastian Huber
Hello, I run the GCC testsuite for GCC 4.7.0 20120307 http://gcc.gnu.org/ml/gcc-testresults/2012-03/msg00782.html I got a lot of errors like this: FAIL: g++.dg/simulate-thread/atomics-1.C -O0 -g (test for excess errors) 148796 Excess errors: 148797 /home/sh/rtems-testing/gcc/b-arm-gcc/arm

Re: GCC 4.7.0 Release Candidate available from gcc.gnu.org

2012-03-07 Thread NightStrike
On Fri, Mar 2, 2012 at 8:44 AM, Richard Guenther wrote: > > GCC 4.7.0 Release Candidate available from gcc.gnu.org > > The first release candidate for GCC 4.7.0 is available from > >  ftp://gcc.gnu.org/pub/gcc/snapshots/4.7.0-RC-20120302 > > and shortly its mirrors.  It has been generated from SVN

Re: [RFC patch] spindep: add cross cache lines checking

2012-03-07 Thread Ingo Molnar
* Alex Shi wrote: > > I think the check should be (__alignof__(lock) < > > __alignof__(rwlock_t)), otherwise it will still pass when > > you have structure with attribute((packed,aligned(2))) > > reasonable! > > >> 1, it is alignof bug for default gcc on my fc15 and Ubuntu 11.10 etc? > >> >

Re: [RFC patch] spindep: add cross cache lines checking

2012-03-07 Thread Alex Shi
> I think the check should be (__alignof__(lock) < __alignof__(rwlock_t)), > otherwise it will still pass when you have structure with > attribute((packed,aligned(2))) reasonable! > >> 1, it is alignof bug for default gcc on my fc15 and Ubuntu 11.10 etc? >> >> struct sub { >> int raw

Re: [RFC patch] spindep: add cross cache lines checking

2012-03-07 Thread Arnd Bergmann
On Wednesday 07 March 2012, Alex Shi wrote: > Understand. thx. So is the following checking that your wanted? > === > diff --git a/include/linux/rwlock.h b/include/linux/rwlock.h > index bc2994e..64828a3 100644 > --- a/include/linux/rwlock.h > +++ b/include/linux/rwlock.h > @@ -21,10 +21,12 @@ >

Re: User directed Function Multiversioning (MV) via Function Overloading

2012-03-07 Thread Richard Guenther
On Wed, Mar 7, 2012 at 1:42 AM, Sriraman Tallam wrote: > Hi, > > User directed Function Multiversioning (MV) via Function Overloading > === > > I have created a set of patches to add support for user directed > function MV via function overloading. T

Re: [RFC patch] spindep: add cross cache lines checking

2012-03-07 Thread Alex Shi
On Tue, 2012-03-06 at 09:32 +, Arnd Bergmann wrote: > On Tuesday 06 March 2012, Alex Shi wrote: > > I have one concern and one questions here: > > concern: maybe the lock is in a well designed 'packed' struct, and it is > > safe for cross lines issue. but __alignof__ will return 1; > > > > str