public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/17443] New: --enable-threads=single is ignored for sparc-sun-solaris2.8
@ 2004-09-12 19:58 spencer at infointeractive dot com
  2004-09-12 22:13 ` [Bug target/17443] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: spencer at infointeractive dot com @ 2004-09-12 19:58 UTC (permalink / raw)
  To: gcc-bugs

When configuring gcc/g++ version 4.0.0 20040912 with --enable-threads=single 
targeted to sparc-sun-solaris2.8 (cross hosted on i686-pc-linux-gnu), the flag 
is preserved and accepted, but ignored, and the resulting compiler has threads 
support (including within libstdc++, which is what I was interested in).  I 
confirmed this by running __gthread_active_p() from gdb and found it to (exist 
and) return 1.

Using --enable-threads=no instead _does_ work.  This seems to due to a mismatch 
between gcc/configure.in and gcc/config.gcc:

>From configure.in:

# Check if a valid thread package
case ${enable_threads} in
  "" | no)
    # No threads
    target_thread_file='single'
    ;;
  yes)
    # default
    target_thread_file='single'
    ;;
  aix | dce | gnat | irix | posix | rtems | \
  single | solaris | vxworks | win32 )
    target_thread_file=${enable_threads}
    ;;
  *)
    echo "${enable_threads} is an unknown thread package" 1>&2
    exit 1
    ;;
esac

if test x${thread_file} = x; then
  # No thread file set by target-specific clauses in config.gcc,
  # so use file chosen by default logic above
  thread_file=${target_thread_file}
fi

>From the sparc-*-solaris2* entry of config.gcc:

        case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
          no:*:*) ;;
          *:yes:* ) thread_file=posix ;;
          yes:*:* | *:*:yes ) thread_file=solaris ;;
        esac

Note how config.gcc does not account for "single" being equal to "no".  In 
configure.in, "single" appears to be the canonical indicator of "no threads 
support", while in config.gcc, "no" is used.

Unfortunately I have to run, so I can't patch and test this theory.

Some single-threaded software incurs significant performance penalities from 
having threads support enabled in the toolchain.

See <http://gcc.gnu.org/ml/libstdc++/2004-09/msg00030.html> for a not-quite 
related posting about libstdc++ allocator performance that led me to find this 
issue.

-- 
           Summary: --enable-threads=single is ignored for sparc-sun-
                    solaris2.8
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: spencer at infointeractive dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: sparc-sun-solaris2.8


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17443


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/17443] --enable-threads=single is ignored for sparc-sun-solaris2.8
  2004-09-12 19:58 [Bug bootstrap/17443] New: --enable-threads=single is ignored for sparc-sun-solaris2.8 spencer at infointeractive dot com
@ 2004-09-12 22:13 ` pinskia at gcc dot gnu dot org
  2004-09-13  8:23 ` [Bug target/17443] --enable-threads=single is ignored ebotcazou at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-12 22:13 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|bootstrap                   |target


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17443


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/17443] --enable-threads=single is ignored
  2004-09-12 19:58 [Bug bootstrap/17443] New: --enable-threads=single is ignored for sparc-sun-solaris2.8 spencer at infointeractive dot com
  2004-09-12 22:13 ` [Bug target/17443] " pinskia at gcc dot gnu dot org
@ 2004-09-13  8:23 ` ebotcazou at gcc dot gnu dot org
  2004-10-01 12:33 ` ebotcazou at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-09-13  8:23 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org
            Summary|--enable-threads=single is  |--enable-threads=single is
                   |ignored for sparc-sun-      |ignored
                   |solaris2.8                  |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17443


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/17443] --enable-threads=single is ignored
  2004-09-12 19:58 [Bug bootstrap/17443] New: --enable-threads=single is ignored for sparc-sun-solaris2.8 spencer at infointeractive dot com
  2004-09-12 22:13 ` [Bug target/17443] " pinskia at gcc dot gnu dot org
  2004-09-13  8:23 ` [Bug target/17443] --enable-threads=single is ignored ebotcazou at gcc dot gnu dot org
@ 2004-10-01 12:33 ` ebotcazou at gcc dot gnu dot org
  2004-10-01 12:35 ` ebotcazou at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-10-01 12:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-10-01 12:33 -------
Confirmed (sparc-sun-solaris2.6).


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-10-01 12:33:50
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17443


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/17443] --enable-threads=single is ignored
  2004-09-12 19:58 [Bug bootstrap/17443] New: --enable-threads=single is ignored for sparc-sun-solaris2.8 spencer at infointeractive dot com
                   ` (2 preceding siblings ...)
  2004-10-01 12:33 ` ebotcazou at gcc dot gnu dot org
@ 2004-10-01 12:35 ` ebotcazou at gcc dot gnu dot org
  2004-10-01 13:03 ` ebotcazou at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-10-01 12:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-10-01 12:35 -------
Fixing.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |ebotcazou at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17443


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/17443] --enable-threads=single is ignored
  2004-09-12 19:58 [Bug bootstrap/17443] New: --enable-threads=single is ignored for sparc-sun-solaris2.8 spencer at infointeractive dot com
                   ` (3 preceding siblings ...)
  2004-10-01 12:35 ` ebotcazou at gcc dot gnu dot org
@ 2004-10-01 13:03 ` ebotcazou at gcc dot gnu dot org
  2004-10-03  8:00 ` cvs-commit at gcc dot gnu dot org
  2004-10-03  8:02 ` ebotcazou at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-10-01 13:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-10-01 13:03 -------
The problem was introduced with:

2004-04-06  Nathanael Nerode  <neroden@gcc.gnu.org>

	* config.gcc: Stop changing enable_threads midstream.
	Replace uses of enable_threads_flag with enable_threads.
	* configure.ac: Replace uses of enable_threads_flag with
	enable_threads.  Improve autoconf quotation in one place.
	* configure: Regenerate.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17443


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/17443] --enable-threads=single is ignored
  2004-09-12 19:58 [Bug bootstrap/17443] New: --enable-threads=single is ignored for sparc-sun-solaris2.8 spencer at infointeractive dot com
                   ` (4 preceding siblings ...)
  2004-10-01 13:03 ` ebotcazou at gcc dot gnu dot org
@ 2004-10-03  8:00 ` cvs-commit at gcc dot gnu dot org
  2004-10-03  8:02 ` ebotcazou at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-03  8:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-10-03 08:00 -------
Subject: Bug 17443

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	ebotcazou@gcc.gnu.org	2004-10-03 08:00:44

Modified files:
	gcc            : ChangeLog config.gcc 

Log message:
	PR target/17443
	* config.gcc (i?86-*-solaris2*): Restore correct logic
	for --enable-threads option.
	(sparc64-*-solaris2*): Likewise.
	(sparc-*-solaris2*): Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5727&r2=2.5728
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config.gcc.diff?cvsroot=gcc&r1=1.492&r2=1.493



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17443


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/17443] --enable-threads=single is ignored
  2004-09-12 19:58 [Bug bootstrap/17443] New: --enable-threads=single is ignored for sparc-sun-solaris2.8 spencer at infointeractive dot com
                   ` (5 preceding siblings ...)
  2004-10-03  8:00 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-03  8:02 ` ebotcazou at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-10-03  8:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-10-03 08:02 -------
See http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00175.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17443


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-10-03  8:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-12 19:58 [Bug bootstrap/17443] New: --enable-threads=single is ignored for sparc-sun-solaris2.8 spencer at infointeractive dot com
2004-09-12 22:13 ` [Bug target/17443] " pinskia at gcc dot gnu dot org
2004-09-13  8:23 ` [Bug target/17443] --enable-threads=single is ignored ebotcazou at gcc dot gnu dot org
2004-10-01 12:33 ` ebotcazou at gcc dot gnu dot org
2004-10-01 12:35 ` ebotcazou at gcc dot gnu dot org
2004-10-01 13:03 ` ebotcazou at gcc dot gnu dot org
2004-10-03  8:00 ` cvs-commit at gcc dot gnu dot org
2004-10-03  8:02 ` ebotcazou at gcc dot gnu dot 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).