This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libobjc/26309] New: libobjc bootstrap failure on Tru64 UNIX V4.0F


Mainline as of 20060206 and the 4.1 branch as of 20060208 fail to bootstrap
in libobjc:

/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 -c -I.
-I/vol/gcc/src/gcc-dist/libobjc -O2 -g -O2 -mieee -W -Wall -Wwrite-strings
-Wstrict-prototypes -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing -fexceptions
-I/vol/gcc/src/gcc-dist/libobjc/objc -I/vol/gcc/src/gcc-dist/libobjc/../gcc
-I/vol/gcc/src/gcc-dist/libobjc/../gcc/config -I../.././gcc
-I/vol/gcc/src/gcc-dist/libobjc/../include
/vol/gcc/src/gcc-dist/libobjc/thr-objc.c   -DPIC -o .libs/thr-objc.o
In file included from /vol/gcc/src/gcc-dist/libobjc/../gcc/gthr-posix.h:43,
                 from ../.././gcc/gthr-default.h:1,
                 from /vol/gcc/src/gcc-dist/libobjc/../gcc/gthr.h:114,
                 from /vol/gcc/src/gcc-dist/libobjc/thr-objc.c:38:
/vol/gcc/obj/gcc-4.2.0-20060206/4.0f-gcc/./gcc/include/pthread.h:877: error:
field '_Pfield' declared as a function
[...]

This is the same problem as PR libgomp/26308: libobjc/thr-objc.c defines
_XOPEN_SOURCE=500 before including <gthr.h> and thus <pthread.h>, which
doesn't work on that platform.  This is a regression from the 4.0 branch
introduced by this patch:

2005-11-09  Alexandre Oliva  <aoliva@redhat.com>

        PR other/4372
        * thr-objc.c (_XOPEN_SOURCE): Define.

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 or 4.1 branch as above.


------- Comment #1 from ro at techfak dot uni-bielefeld dot de  2006-02-15 21:15 -------
Fix:
I use the following patch which works around this problem and works
seemlessly on both alpha-dec-osf4.0f and alpha-dec-osf5.1b:

Index: libobjc/thr-objc.c
===================================================================
--- libobjc/thr-objc.c  (revision 110838)
+++ libobjc/thr-objc.c  (working copy)
@@ -26,8 +26,11 @@ Boston, MA 02110-1301, USA.  */
 #define _LIBOBJC
 /* The line below is needed for declarations of functions such as
    pthread_mutexattr_settype, without which gthr-posix.h may fail to
-   compile within libobjc.  */
+   compile within libobjc.  Unfortunately, this breaks compilation on
+   Tru64 UNIX V4.0F, so disable it there.  */
+#ifndef __osf__
 #define _XOPEN_SOURCE 500
+#endif
 #include "config.h"
 #include "tconfig.h"
 #include "coretypes.h"


-- 
           Summary: libobjc bootstrap failure on Tru64 UNIX V4.0F
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libobjc
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: alpha-dec-osf4.0f
  GCC host triplet: alpha-dec-osf4.0f
GCC target triplet: alpha-dec-osf4.0f


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]