Bug 26308 - [4.2/4.3 Regression] libgomp bootstrap failure on Tru64 UNIX V4.0F
Summary: [4.2/4.3 Regression] libgomp bootstrap failure on Tru64 UNIX V4.0F
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libgomp (show other bugs)
Version: 4.2.0
: P5 normal
Target Milestone: 4.2.1
Assignee: Rainer Orth
URL:
Keywords: build
Depends on: 26161
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-15 21:03 UTC by Rainer Orth
Modified: 2007-07-02 14:41 UTC (History)
2 users (show)

See Also:
Host: alpha-dec-osf4.0f
Target: alpha-dec-osf4.0f
Build: alpha-dec-osf4.0f
Known to work:
Known to fail:
Last reconfirmed: 2007-07-02 14:37:35


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Orth 2006-02-15 21:03:51 UTC
Mainline as of 20060206 fails to bootstrap on alpha-dec-osf4.0f while
building libgomp:

/vol/gcc/obj/gcc-4.2.0-20060206/4.0f-gcc/./gcc/xgcc -B/vol/gcc/obj/gcc-4.2.0-20060206/4.0f-gcc/./gcc/ -B/vol/gcc/share/alpha-dec-osf4.0f/bin/ -B/vol/gcc/share/alpha-dec-osf4.0f/lib/ -isystem /vol/gcc/share/alpha-dec-osf4.0f/include -isystem /vol/gcc/share/alpha-dec-osf4.0f/sys-include -DHAVE_CONFIG_H -I. -I/vol/gcc/src/gcc-dist/libgomp -I. -I/vol/gcc/src/gcc-dist/libgomp/config/posix -I/vol/gcc/src/gcc-dist/libgomp -Wall -pthread -Werror -O2 -g -O2 -mieee -MT lock.lo -MD -MP -MF .deps/lock.Tpo -c /vol/gcc/src/gcc-dist/libgomp/config/posix/lock.c   -DPIC -o .libs/lock.o
In file included from /vol/gcc/src/gcc-dist/libgomp/libgomp.h:43,
                 from /vol/gcc/src/gcc-dist/libgomp/config/posix/lock.c:39:
/vol/gcc/obj/gcc-4.2.0-20060206/4.0f-gcc/./gcc/include/pthread.h:877: error: field '_Pfield' declared as a function

and many more similar errors.  The problem is ultimately due to the fact
that libgomp/posix/lock.c has

/* We need Unix98 extensions to get recursive locks.  */
#define _XOPEN_SOURCE 500

#include "libgomp.h"

Unfortunately, the following trivial program

#include <pthread.h>

fails in the same way when compiled with gcc -pthread -D_XOPEN_SOURCE=500.

Since <pthread.h> has PTHREAD_MUTEX_RECURSIVE even without _XOPEN_SOURCE
defined, one can probably simply omit that definition on Tru64 UNIX (at
least V4.0F, but probably on V5.1B as well).

Environment:
System: OSF1 rimsky V4.0 1229 alpha
Machine: alpha
	
host: alpha-dec-osf4.0f
build: alpha-dec-osf4.0f
target: alpha-dec-osf4.0f
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc --with-local-prefix=/vol/gcc --disable-nls --host alpha-dec-osf4.0f --build alpha-dec-osf4.0f --target alpha-dec-osf4.0f --with-gmp-dir=/vol/gnu/obj/gmp-4.1.3 --with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr --enable-languages=c,c++,fortran,java,objc,ada --disable-libmudflap

How-To-Repeat:
Bootstrap mainline as above.
Comment 1 Andrew Pinski 2006-03-18 06:30:43 UTC
Was this fixed?
Comment 2 Andrew Pinski 2006-03-18 06:33:33 UTC
PR 26161 might had fixed this.
Comment 3 Rainer Orth 2006-05-10 21:28:45 UTC
Subject: Re:  [4.2 Regression] libgomp bootstrap failure on Tru64 UNIX V4.0F

pinskia at gcc dot gnu dot org writes:

> PR 26161 might had fixed this.

No, the problem persists as of 20060503.

	Rainer
Comment 4 Mark Mitchell 2006-06-04 17:44:59 UTC
OSF is not release-critical.
Comment 5 Mark Mitchell 2007-05-14 22:28:05 UTC
Will not be fixed in 4.2.0; retargeting at 4.2.1.
Comment 6 Rainer Orth 2007-07-02 14:37:35 UTC
Patch here:

http://gcc.gnu.org/ml/gcc-patches/2006-07/msg00477.html
Comment 7 Rainer Orth 2007-07-02 14:38:27 UTC
Subject: Bug 26308

Author: ro
Date: Mon Jul  2 14:38:13 2007
New Revision: 126208

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126208
Log:
	PR libgomp/26308
	* config/posix/lock.c (_XOPEN_SOURCE): Don't define on Tru64 UNIX.


Modified:
    trunk/libgomp/ChangeLog
    trunk/libgomp/config/posix/lock.c

Comment 8 Rainer Orth 2007-07-02 14:41:13 UTC
Subject: Bug 26308

Author: ro
Date: Mon Jul  2 14:41:03 2007
New Revision: 126209

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126209
Log:
	PR libgomp/26308
	* config/posix/lock.c (_XOPEN_SOURCE): Don't define on Tru64 UNIX.


Modified:
    branches/gcc-4_2-branch/libgomp/ChangeLog
    branches/gcc-4_2-branch/libgomp/config/posix/lock.c

Comment 9 Rainer Orth 2007-07-02 14:41:34 UTC
Fixed for 4.2.1, 4.3.