[RFA:] fix non-tls regression with "PATCH: libstdc++/include/profile bug fixes and cleanup"

Hans-Peter Nilsson hans-peter.nilsson@axis.com
Tue Jan 12 02:57:00 GMT 2010


> Date: Mon, 11 Jan 2010 18:38:31 -0800
> From: Benjamin Kosnik <bkoz@redhat.com>

> > Index: libstdc++-v3/testsuite/ext/profile/all.cc
> > ===================================================================
> > --- libstdc++-v3/testsuite/ext/profile/all.cc	(revision 155826)
> > +++ libstdc++-v3/testsuite/ext/profile/all.cc	(working copy)
> > @@ -1,4 +1,4 @@
> > -// { dg-options "-std=gnu++0x -O0 -D_GLIBCXX_PROFILE" }
> > +// { dg-options "-std=gnu++0x -O0 -D_GLIBCXX_PROFILE

(Looks like a cut line; for completeness:)
+// { dg-options "-std=gnu++0x -O0 -D_GLIBCXX_PROFILE -D_GLIBCXX_PROFILE_NO_THREADS" }

> 
> Am a bit surprised to see that there is not a dg-require-tls that can
> just be plugged in here. I think that's the better approach.

There is dg-require-effective-target tls_native (tls_runtime for
execute tests), but that wasn't my preferred approach, as it
would restrict the targets for the test where it wasn't
restricted before.  On the other hand, it doesn't test
compilability of the thread-stuff.

But, it sounds like that's your preferred approach as a
maintainer, so I'll commit that after sanity-checking at my
earliest convenience. ;)

Shall I add a separate nothread-all.cc with
-D_GLIBCXX_PROFILE_NO_THREADS that just includes all.cc without
target restrictions, as pre-approved?

brgds, H-P
PS: shouldn't the thread stuff instead just check __PTHREAD__ and/or __TLS__?
Whoops, they don't exist.  Hm.



More information about the Libstdc++ mailing list