public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/38400] New: Acats faillures due to undefined pthread_setrunon_np
@ 2008-12-04 13:42 J dot J dot vanderHeijden at gmail dot com
2008-12-10 11:55 ` [Bug ada/38400] " laurent at guerby dot net
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: J dot J dot vanderHeijden at gmail dot com @ 2008-12-04 13:42 UTC (permalink / raw)
To: gcc-bugs
A whole lot of Acats tests fail for IRIX 6.2 (see
http://gcc.gnu.org/ml/gcc-testresults/2008-10/msg00710.html)
This is because the Ada runtime uses the non-portable IRIX6.5-only function
pthread_setrunon_np, as evident from this snippet of acats.log:
splitting
/build/gcc/gcc-4.3.2/obj-quick/gcc/testsuite/ada/acats/tests/a/a83a02b.ada
into:
a83a02b.adb
BUILD a83a02b.adb
gnatmake --GCC="/build/gcc/gcc-4.3.2/obj-quick/gcc/xgcc
-B/build/gcc/gcc-4.3.2/obj-quick/gcc/" -gnatws -O2
-I/build/gcc/gcc-4.3.2/obj-quick/gcc/testsuite/ada/acats/support a83a02b.adb
-largs --GCC="/build/gcc/gcc-4.3.2/obj-quick/gcc/xgcc
-B/build/gcc/gcc-4.3.2/obj-quick/gcc/"
/build/gcc/gcc-4.3.2/obj-quick/gcc/xgcc -c
-B/build/gcc/gcc-4.3.2/obj-quick/gcc/ -gnatws -O2
-I/build/gcc/gcc-4.3.2/obj-quick/gcc/testsuite/ada/acats/support a83a02b.adb
gnatbind -I/build/gcc/gcc-4.3.2/obj-quick/gcc/testsuite/ada/acats/support -x
a83a02b.ali
gnatlink a83a02b.ali --GCC=/build/gcc/gcc-4.3.2/obj-quick/gcc/xgcc
-B/build/gcc/gcc-4.3.2/obj-quick/gcc/
ld32: WARNING 84: /build/gcc/gcc-4.3.2/obj-quick/gcc/ada/rts/libgnarl.a is not
used for resolving any symbol.
ld32: ERROR 33: Unresolved data symbol "pthread_setrunon_np" -- 1st referenced
by /build/gcc/gcc-4.3.2/obj-quick/gcc/ada/rts/s-taprop.o.
Use linker option -v to see when and which objects, archives and dsos
are loaded.
ld32: INFO 152: Output file removed because of error.
collect2: ld returned 2 exit status
gnatlink: error when calling /build/gcc/gcc-4.3.2/obj-quick/gcc/xgcc
gnatmake: *** link failed.
FAIL: a83a02b
It would be nice to restrict the usage of pthread_setrunon_np to IRIX 6.5
--
Summary: Acats faillures due to undefined pthread_setrunon_np
Product: gcc
Version: 4.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: J dot J dot vanderHeijden at gmail dot com
GCC build triplet: mips-sgi-irix6.2
GCC host triplet: mips-sgi-irix6.2
GCC target triplet: mips-sgi-irix6.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38400
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug ada/38400] Acats faillures due to undefined pthread_setrunon_np
2008-12-04 13:42 [Bug ada/38400] New: Acats faillures due to undefined pthread_setrunon_np J dot J dot vanderHeijden at gmail dot com
@ 2008-12-10 11:55 ` laurent at guerby dot net
2008-12-11 11:09 ` J dot J dot vanderHeijden at gmail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: laurent at guerby dot net @ 2008-12-10 11:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from laurent at guerby dot net 2008-12-10 11:54 -------
The missing function is called only in one place, visibly to set thread
affinity:
gcc/ada/s-taprop-irix.adb
if Self_ID.Common.Task_Info /= null
and then Self_ID.Common.Task_Info.Scope = PTHREAD_SCOPE_SYSTEM
and then Self_ID.Common.Task_Info.Runon_CPU /= ANY_CPU
then
Result := pthread_setrunon_np
(To_Int (Self_ID.Common.Task_Info.Runon_CPU));
pragma Assert (Result = 0);
end if;
The simplest thing to do would be to add #ifdef to define this function in
gcc/ada/adaint.c as dummy returning zero when IRIX. I don't have access to an
IRIX system so I don't know what #ifdef are available (or may be configure
test):
Could you try to add in gcc/ada/adaint.c the following definition:
int pthread_setrunon_np (int cpu) { return 0; }
Then see if it fixes the ACATS failures, then try to find out #ifdef that
trigger only on IRIX 6.2.
Thanks in advance,
--
laurent at guerby dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |laurent at guerby dot net
Keywords| |link-failure
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38400
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug ada/38400] Acats faillures due to undefined pthread_setrunon_np
2008-12-04 13:42 [Bug ada/38400] New: Acats faillures due to undefined pthread_setrunon_np J dot J dot vanderHeijden at gmail dot com
2008-12-10 11:55 ` [Bug ada/38400] " laurent at guerby dot net
@ 2008-12-11 11:09 ` J dot J dot vanderHeijden at gmail dot com
2008-12-11 11:15 ` Arnaud Charlet
2008-12-11 11:16 ` charlet at adacore dot com
` (2 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: J dot J dot vanderHeijden at gmail dot com @ 2008-12-11 11:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from J dot J dot vanderHeijden at gmail dot com 2008-12-11 11:07 -------
Subject: Re: Acats faillures due to undefined pthread_setrunon_np
On Wed, Dec 10, 2008 at 12:54 PM, laurent at guerby dot net
<gcc-bugzilla@gcc.gnu.org> wrote:
>
>
> Could you try to add in gcc/ada/adaint.c the following definition:
>
> int pthread_setrunon_np (int cpu) { return 0; }
>
> Then see if it fixes the ACATS failures, then try to find out #ifdef that
> trigger only on IRIX 6.2.
>
> Thanks in advance,
Sounds like a plan.
The offending piece of code is pretty useless btw, even on IRIX 6.5.
The cpu# in question is always initialized in s-tasinf-irix.ads with
CPU_ANY so the end result is the same as when you wouldn't call
pthread_setrunon_np() at all. So my initial fix was to simply remove
this functionality entirely.
I'll have to dig up an old SGI running IRIX 6.2, yet fast enough to
finish the regression test. Usually I run 6.2 regression tests inside
a sandbox on a much faster SGI running IRIX 6.5, but this sandbox is
limited: it always fails anything linked to the pthreads library.
Jan-Jaap
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38400
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Bug ada/38400] Acats faillures due to undefined pthread_setrunon_np
2008-12-11 11:09 ` J dot J dot vanderHeijden at gmail dot com
@ 2008-12-11 11:15 ` Arnaud Charlet
0 siblings, 0 replies; 8+ messages in thread
From: Arnaud Charlet @ 2008-12-11 11:15 UTC (permalink / raw)
To: J dot J dot vanderHeijden at gmail dot com; +Cc: gcc-bugs
> The offending piece of code is pretty useless btw, even on IRIX 6.5.
> The cpu# in question is always initialized in s-tasinf-irix.ads with
> CPU_ANY so the end result is the same as when you wouldn't call
> pthread_setrunon_np() at all. So my initial fix was to simply remove
> this functionality entirely.
That's a misunderstanding of the code: Task_Info can be specified by the user
via pragma Task_Info.
What you're seeing in s-tasinf-irix.ads is just a default that the user
can change.
Arno
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug ada/38400] Acats faillures due to undefined pthread_setrunon_np
2008-12-04 13:42 [Bug ada/38400] New: Acats faillures due to undefined pthread_setrunon_np J dot J dot vanderHeijden at gmail dot com
2008-12-10 11:55 ` [Bug ada/38400] " laurent at guerby dot net
2008-12-11 11:09 ` J dot J dot vanderHeijden at gmail dot com
@ 2008-12-11 11:16 ` charlet at adacore dot com
2008-12-15 16:42 ` J dot J dot vanderHeijden at gmail dot com
2008-12-15 16:50 ` J dot J dot vanderHeijden at gmail dot com
4 siblings, 0 replies; 8+ messages in thread
From: charlet at adacore dot com @ 2008-12-11 11:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from charlet at adacore dot com 2008-12-11 11:15 -------
Subject: Re: Acats faillures due to undefined
pthread_setrunon_np
> The offending piece of code is pretty useless btw, even on IRIX 6.5.
> The cpu# in question is always initialized in s-tasinf-irix.ads with
> CPU_ANY so the end result is the same as when you wouldn't call
> pthread_setrunon_np() at all. So my initial fix was to simply remove
> this functionality entirely.
That's a misunderstanding of the code: Task_Info can be specified by the user
via pragma Task_Info.
What you're seeing in s-tasinf-irix.ads is just a default that the user
can change.
Arno
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38400
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug ada/38400] Acats faillures due to undefined pthread_setrunon_np
2008-12-04 13:42 [Bug ada/38400] New: Acats faillures due to undefined pthread_setrunon_np J dot J dot vanderHeijden at gmail dot com
` (2 preceding siblings ...)
2008-12-11 11:16 ` charlet at adacore dot com
@ 2008-12-15 16:42 ` J dot J dot vanderHeijden at gmail dot com
2008-12-15 16:50 ` J dot J dot vanderHeijden at gmail dot com
4 siblings, 0 replies; 8+ messages in thread
From: J dot J dot vanderHeijden at gmail dot com @ 2008-12-15 16:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from J dot J dot vanderHeijden at gmail dot com 2008-12-15 16:41 -------
Created an attachment (id=16911)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16911&action=view)
IRIX-6.2 only dummy implementation of pthread_setrunon_np()
This patch adds an empty implementation of pthread_setrunon_np() on IRIX 6.2.
Since Ada threading seems to operate independent of GCC's
'enable-threads=posix' I've chosen the existence of SGI_INITIAL_PT_SPROC as a
trigger to #include <pthreads.h> and thus prevent breakage on IRIX 5.x (which
doesn't have pthreads at all).
Testsuite results follow
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38400
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug ada/38400] Acats faillures due to undefined pthread_setrunon_np
2008-12-04 13:42 [Bug ada/38400] New: Acats faillures due to undefined pthread_setrunon_np J dot J dot vanderHeijden at gmail dot com
` (3 preceding siblings ...)
2008-12-15 16:42 ` J dot J dot vanderHeijden at gmail dot com
@ 2008-12-15 16:50 ` J dot J dot vanderHeijden at gmail dot com
4 siblings, 0 replies; 8+ messages in thread
From: J dot J dot vanderHeijden at gmail dot com @ 2008-12-15 16:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from J dot J dot vanderHeijden at gmail dot com 2008-12-15 16:48 -------
Test results: http://gcc.gnu.org/ml/gcc-testresults/2008-12/msg01459.html
Please approve.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38400
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <bug-38400-4@http.gcc.gnu.org/bugzilla/>]
end of thread, other threads:[~2011-07-19 14:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-04 13:42 [Bug ada/38400] New: Acats faillures due to undefined pthread_setrunon_np J dot J dot vanderHeijden at gmail dot com
2008-12-10 11:55 ` [Bug ada/38400] " laurent at guerby dot net
2008-12-11 11:09 ` J dot J dot vanderHeijden at gmail dot com
2008-12-11 11:15 ` Arnaud Charlet
2008-12-11 11:16 ` charlet at adacore dot com
2008-12-15 16:42 ` J dot J dot vanderHeijden at gmail dot com
2008-12-15 16:50 ` J dot J dot vanderHeijden at gmail dot com
[not found] <bug-38400-4@http.gcc.gnu.org/bugzilla/>
2011-07-19 14:49 ` ro at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).