public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/11313] New: #pragma weak and static inline functions
@ 2003-06-24 20:44 georgaj at navcanada dot ca
  2003-07-24 12:47 ` [Bug libstdc++/11313] [3.3 only] " pinskia at physics dot uc dot edu
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: georgaj at navcanada dot ca @ 2003-06-24 20:44 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: #pragma weak and static inline functions
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: georgaj at navcanada dot ca
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: hppa64-hp-hpux11.00
  GCC host triplet: hppa64-hp-hpux11.00
GCC target triplet: hppa64-hp-hpux11.00

When bootstrapping with pthread support, the compiler complains that 
pthread_create() must be public in order to be declared as a weak symbol using 
#pragma weak. The problem is that the sys/pthread.h that comes with HPUX11.00 
has the following code in it:

	static int pthread_create( 
				  pthread_t *tid, 
				  const pthread_attr_t *attr,
                                  void *(*start_routine)(void *), 
				  void *arg)
	    { return(__pthread_create_system(tid, attr, start_routine, arg)); }

This function just redirects to the "real" pthread creation function.

Removing the static modifier gets rid of the visibility error, but then the 
compiler complains that the weak declaration must precede the function 
definition.

Hack: I commented out the "#pragma weak" line for pthread_create() in 
gthr-posix.h, but I'm not sure what the consequences of this are.

I'm kind of missing the point of these pragmas. Are they there so gcc, 
configured for pthread support, will bootstrap whether or not the host actually 
has pthread support?


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

* [Bug libstdc++/11313] [3.3 only] #pragma weak and static inline functions
  2003-06-24 20:44 [Bug bootstrap/11313] New: #pragma weak and static inline functions georgaj at navcanada dot ca
@ 2003-07-24 12:47 ` pinskia at physics dot uc dot edu
  2003-07-24 18:20 ` geoffk at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-24 12:47 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |geoffk at apple dot com
             Status|UNCONFIRMED                 |NEW
          Component|bootstrap                   |libstdc++
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-07-24 12:47:44
               date|                            |
            Summary|#pragma weak and static     |[3.3 only] #pragma weak and
                   |inline functions            |static inline functions
   Target Milestone|3.4                         |3.3.2


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-24 12:47 -------
I think this is fixed on the mainline by:
2003-07-22  Geoffrey Keating

        * c-decl.c (start_decl): Don't call maybe_apply_pragma_weak here.
        (finish_decl): Call maybe_apply_pragma_weak here.
        (grokdeclarator): Check that DECL_ASSEMBLER_NAME isn't set before
        TREE_PUBLIC and TREE_STATIC are decided.
        (start_function): Move call to maybe_apply_pragma_weak.  Check that
        DECL_ASSEMBLER_NAME isn't set too early.

Keating would you mind asking for 3.3.2 inclusion?


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

* [Bug libstdc++/11313] [3.3 only] #pragma weak and static inline functions
  2003-06-24 20:44 [Bug bootstrap/11313] New: #pragma weak and static inline functions georgaj at navcanada dot ca
  2003-07-24 12:47 ` [Bug libstdc++/11313] [3.3 only] " pinskia at physics dot uc dot edu
@ 2003-07-24 18:20 ` geoffk at gcc dot gnu dot org
  2003-07-29 17:57 ` [Bug middle-end/11313] " geoffk at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2003-07-24 18:20 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


geoffk at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2003-07-24 12:47:44         |2003-07-24 18:20:57
               date|                            |


------- Additional Comments From geoffk at gcc dot gnu dot org  2003-07-24 18:20 -------
Yes, I'll try to get the relevant bit of the patch into 3.3.


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

* [Bug middle-end/11313] [3.3 only] #pragma weak and static inline functions
  2003-06-24 20:44 [Bug bootstrap/11313] New: #pragma weak and static inline functions georgaj at navcanada dot ca
  2003-07-24 12:47 ` [Bug libstdc++/11313] [3.3 only] " pinskia at physics dot uc dot edu
  2003-07-24 18:20 ` geoffk at gcc dot gnu dot org
@ 2003-07-29 17:57 ` geoffk at gcc dot gnu dot org
  2003-08-01 20:47 ` cvs-commit at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2003-07-29 17:57 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From geoffk at gcc dot gnu dot org  2003-07-29 17:57 -------
Actually, it was this change:

        * c-pragma.c (maybe_apply_pragma_weak): Don't get DECL_ASSEMBLER_NAME
        when it's not needed.


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

* [Bug middle-end/11313] [3.3 only] #pragma weak and static inline functions
  2003-06-24 20:44 [Bug bootstrap/11313] New: #pragma weak and static inline functions georgaj at navcanada dot ca
                   ` (2 preceding siblings ...)
  2003-07-29 17:57 ` [Bug middle-end/11313] " geoffk at gcc dot gnu dot org
@ 2003-08-01 20:47 ` cvs-commit at gcc dot gnu dot org
  2003-08-01 20:53 ` geoffk at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-08-01 20:47 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-08-01 20:47 -------
Subject: Bug 11313

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	geoffk@gcc.gnu.org	2003-08-01 20:47:37

Modified files:
	gcc            : ChangeLog c-pragma.c 

Log message:
	PR 11313
	* c-pragma.c (maybe_apply_pragma_weak): Don't get DECL_ASSEMBLER_NAME
	when it's not needed.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.687&r2=1.16114.2.688
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-pragma.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.54.14.1&r2=1.54.14.2


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

* [Bug middle-end/11313] [3.3 only] #pragma weak and static inline functions
  2003-06-24 20:44 [Bug bootstrap/11313] New: #pragma weak and static inline functions georgaj at navcanada dot ca
                   ` (3 preceding siblings ...)
  2003-08-01 20:47 ` cvs-commit at gcc dot gnu dot org
@ 2003-08-01 20:53 ` geoffk at gcc dot gnu dot org
  2003-08-12 20:12 ` [Bug middle-end/11313] " georgaj at navcanada dot ca
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2003-08-01 20:53 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


geoffk at gcc dot gnu dot org changed:

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


------- Additional Comments From geoffk at gcc dot gnu dot org  2003-08-01 20:53 -------
Mark let me put the fix into 3.3.1!


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

* [Bug middle-end/11313] #pragma weak and static inline functions
  2003-06-24 20:44 [Bug bootstrap/11313] New: #pragma weak and static inline functions georgaj at navcanada dot ca
                   ` (4 preceding siblings ...)
  2003-08-01 20:53 ` geoffk at gcc dot gnu dot org
@ 2003-08-12 20:12 ` georgaj at navcanada dot ca
  2003-08-12 20:27 ` georgaj at navcanada dot ca
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: georgaj at navcanada dot ca @ 2003-08-12 20:12 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


georgaj at navcanada dot ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
            Summary|[3.3 only] #pragma weak and |#pragma weak and static
                   |static inline functions     |inline functions
            Version|3.3                         |3.3.1


------- Additional Comments From georgaj at navcanada dot ca  2003-08-12 20:12 -------
hmmm..... I'm still getting the same bootstrap error with 3.3.1
Is there something else I need to do here?


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

* [Bug middle-end/11313] #pragma weak and static inline functions
  2003-06-24 20:44 [Bug bootstrap/11313] New: #pragma weak and static inline functions georgaj at navcanada dot ca
                   ` (5 preceding siblings ...)
  2003-08-12 20:12 ` [Bug middle-end/11313] " georgaj at navcanada dot ca
@ 2003-08-12 20:27 ` georgaj at navcanada dot ca
  2003-08-12 23:42 ` georgaj at navcanada dot ca
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: georgaj at navcanada dot ca @ 2003-08-12 20:27 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


georgaj at navcanada dot ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From georgaj at navcanada dot ca  2003-08-12 20:27 -------
Cancel last: The first stage of the bootstrap uses the gcc3.3 already installed 
on my system. hehe. I'll build 3.3.1 with the altered gthr-posix.h so gcc3.3 can 
deal with it, and use that to test a clean bootstrap.


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

* [Bug middle-end/11313] #pragma weak and static inline functions
  2003-06-24 20:44 [Bug bootstrap/11313] New: #pragma weak and static inline functions georgaj at navcanada dot ca
                   ` (6 preceding siblings ...)
  2003-08-12 20:27 ` georgaj at navcanada dot ca
@ 2003-08-12 23:42 ` georgaj at navcanada dot ca
  2003-08-13  0:00 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: georgaj at navcanada dot ca @ 2003-08-12 23:42 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


georgaj at navcanada dot ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


------- Additional Comments From georgaj at navcanada dot ca  2003-08-12 23:42 -------
Ok, I've tried a clean bootstrap of gcc-3.3.1, using gcc-3.3.1, and the original 
bug is still present.


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

* [Bug middle-end/11313] #pragma weak and static inline functions
  2003-06-24 20:44 [Bug bootstrap/11313] New: #pragma weak and static inline functions georgaj at navcanada dot ca
                   ` (7 preceding siblings ...)
  2003-08-12 23:42 ` georgaj at navcanada dot ca
@ 2003-08-13  0:00 ` pinskia at gcc dot gnu dot org
  2003-09-05 22:21 ` geoffk at gcc dot gnu dot org
  2003-09-19  4:13 ` zack at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-13  0:00 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.3.1                       |3.3.2


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

* [Bug middle-end/11313] #pragma weak and static inline functions
  2003-06-24 20:44 [Bug bootstrap/11313] New: #pragma weak and static inline functions georgaj at navcanada dot ca
                   ` (8 preceding siblings ...)
  2003-08-13  0:00 ` pinskia at gcc dot gnu dot org
@ 2003-09-05 22:21 ` geoffk at gcc dot gnu dot org
  2003-09-19  4:13 ` zack at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2003-09-05 22:21 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


geoffk at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|geoffk at gcc dot gnu dot   |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|REOPENED                    |NEW


------- Additional Comments From geoffk at gcc dot gnu dot org  2003-09-05 22:21 -------
It looks like my patch doesn't fix this, so I'll return it to the pool.


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

* [Bug middle-end/11313] #pragma weak and static inline functions
  2003-06-24 20:44 [Bug bootstrap/11313] New: #pragma weak and static inline functions georgaj at navcanada dot ca
                   ` (9 preceding siblings ...)
  2003-09-05 22:21 ` geoffk at gcc dot gnu dot org
@ 2003-09-19  4:13 ` zack at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: zack at gcc dot gnu dot org @ 2003-09-19  4:13 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


zack at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From zack at gcc dot gnu dot org  2003-09-19 00:38 -------
Believed fixed with this change:

2003-08-25  Zack Weinberg  <zack@codesourcery.com>

        * config.gcc (hppa*-*-hpux11*, ia64*-*-hpux*): Remove
        commented-out logic to use DCE threads (if present), add
        support for POSIX threads.
        * config/ia64/hpux.h: Define CPP_SPEC to set appropriate
        #defines for -pthread.  Add -lpthread to LIB_SPEC when
        -pthread.  In both cases take -mt as a synonym for -pthread
        for acc compatibility.
        Define GTHREAD_USE_WEAK to 0.
        * config/pa/pa-hpux11.h: Likewise for CPP_SPEC and LIB_SPEC.
        Remove old logic for DCE threads from LIB_SPEC.
        * config/pa/pa64-hpux.h: Define GTHREAD_USE_WEAK to 0.


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

end of thread, other threads:[~2003-09-19  0:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-24 20:44 [Bug bootstrap/11313] New: #pragma weak and static inline functions georgaj at navcanada dot ca
2003-07-24 12:47 ` [Bug libstdc++/11313] [3.3 only] " pinskia at physics dot uc dot edu
2003-07-24 18:20 ` geoffk at gcc dot gnu dot org
2003-07-29 17:57 ` [Bug middle-end/11313] " geoffk at gcc dot gnu dot org
2003-08-01 20:47 ` cvs-commit at gcc dot gnu dot org
2003-08-01 20:53 ` geoffk at gcc dot gnu dot org
2003-08-12 20:12 ` [Bug middle-end/11313] " georgaj at navcanada dot ca
2003-08-12 20:27 ` georgaj at navcanada dot ca
2003-08-12 23:42 ` georgaj at navcanada dot ca
2003-08-13  0:00 ` pinskia at gcc dot gnu dot org
2003-09-05 22:21 ` geoffk at gcc dot gnu dot org
2003-09-19  4:13 ` zack 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).