public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/15174] New: [tree-ssa] libmudflap doesn't compile on Tru64 UNIX
@ 2004-04-27 19:17 gcc-bugzilla at gcc dot gnu dot org
2004-04-27 19:20 ` [Bug libmudflap/15174] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2004-04-27 19:17 UTC (permalink / raw)
To: gcc-bugs
Even after the fix for c/14589
http://gcc.gnu.org/ml/gcc-patches/2004-04/msg01046.html
a tree-ssa bootstrap on alpha-dec-osf4.0f fails in libmudflap:
$ /vol/gcc/obj/gcc-3.5-tree-ssa-20040416/4.0f-gcc/gcc/xgcc -B/vol/gcc/obj/gcc-3.5-tree-ssa-20040416/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/gnu/src/gcc/gcc-tree-ssa-dist/libmudflap -I. -O2 -g -O2 -mieee -Wall -O2 -g -O2 -mieee -Wp,-MD,.deps/mf-runtime.pp -c /vol/gnu/src/gcc/gcc-tree-ssa-dist/libmudflap/mf-runtime.c -o mf-runtime.o
In file included from /vol/gnu/src/gcc/gcc-tree-ssa-dist/libmudflap/mf-impl.h:41,
from /vol/gnu/src/gcc/gcc-tree-ssa-dist/libmudflap/mf-runtime.c:68:
/vol/gcc/obj/gcc-3.5-tree-ssa-20040416/4.0f-gcc/gcc/include/pthread.h:877: error: field `_Pfield' declared as a function
[...]
This happens due to what seems to be a fundamental problem in libmudflap:
currently, mf-runtime.c (and several other files) include a long list of
various feature macros to enable many API definitions on various platforms.
I fear this is fundamentally flawed (at least for the platforms I know
about): with very few exceptions, when not defining any feature test
macros, you get all API definitions available on the platform that don't
conflicts (or where different standards don't prescribe different
signatures). As soon as you start defining feature test macros, the set of
API definitions is restricted to what is prescribed by those standards.
Those sets are often different on various platforms.
E.g. on Tru64 UNIX, when I remove all the feature test macros in
mf-runtime.c, the file compiles cleanly.
The following hacky patch allowed me to compile all of libmudflag on Tru64
UNIX V4.0F. I call it hacky for two reasons:
* I don't like the fundamental approach. It seems to be much cleaner to
leave the feature test macros undefined and only define them on platforms
where they are known to be necessary, with a comment why they are
necessary. An example of this is the definition of _POSIX_PII_SOCKET in
mf-hooks2.c: it is necessary to get a definition of recvfrom (and others)
that uses socklen_t instead of int for the address_len parameter, as
required by libmudflap. Of course this should be commented appropriately
and only activated if __osf__ or (better) if found necessary by an
autoconf test.
* The duplication of those lists of feature test macros in mf-hooks*.c and
mf-runtime.c is a considerable maintenance burden. They should be
consolidated in one place instead.
Index: libmudflap/mf-hooks1.c
===================================================================
RCS file: /vol/gnu/src/gcc/.gcc-cvs/gcc/libmudflap/Attic/mf-hooks1.c,v
retrieving revision 1.1.2.7
diff -u -p -r1.1.2.7 mf-hooks1.c
--- libmudflap/mf-hooks1.c 20 Mar 2004 12:33:41 -0000 1.1.2.7
+++ libmudflap/mf-hooks1.c 19 Apr 2004 22:56:15 -0000
@@ -39,9 +39,10 @@ Software Foundation, 59 Temple Place - S
/* These attempt to coax various unix flavours to declare all our
needed tidbits in the system headers. */
-#if !defined(__FreeBSD__) && !defined(__APPLE__)
+#if !defined(__FreeBSD__) && !defined(__APPLE__) && !defined(__osf__)
#define _POSIX_SOURCE
#endif /* Some BSDs break <sys/socket.h> if this is defined. */
+#if !defined(__osf__)
#define _GNU_SOURCE
#define _XOPEN_SOURCE
#define _BSD_TYPES
@@ -49,6 +50,7 @@ Software Foundation, 59 Temple Place - S
#define _ALL_SOURCE
#define _LARGE_FILE_API
#define _XOPEN_SOURCE_EXTENDED 1
+#endif
#include <string.h>
#include <stdio.h>
Index: libmudflap/mf-hooks2.c
===================================================================
RCS file: /vol/gnu/src/gcc/.gcc-cvs/gcc/libmudflap/Attic/mf-hooks2.c,v
retrieving revision 1.1.2.9
diff -u -p -r1.1.2.9 mf-hooks2.c
--- libmudflap/mf-hooks2.c 20 Mar 2004 12:33:41 -0000 1.1.2.9
+++ libmudflap/mf-hooks2.c 19 Apr 2004 23:00:54 -0000
@@ -38,9 +38,10 @@ Software Foundation, 59 Temple Place - S
/* These attempt to coax various unix flavours to declare all our
needed tidbits in the system headers. */
-#if !defined(__FreeBSD__) && !defined(__APPLE__)
+#if !defined(__FreeBSD__) && !defined(__APPLE__) && !defined(__osf__)
#define _POSIX_SOURCE
#endif /* Some BSDs break <sys/socket.h> if this is defined. */
+#if !defined(__osf__)
#define _GNU_SOURCE
#define _XOPEN_SOURCE
#define _BSD_TYPES
@@ -48,6 +49,8 @@ Software Foundation, 59 Temple Place - S
#define _ALL_SOURCE
#define _LARGE_FILE_API
#define _XOPEN_SOURCE_EXTENDED 1
+#endif
+#define _POSIX_PII_SOCKET
#include <string.h>
#include <strings.h>
Index: libmudflap/mf-hooks3.c
===================================================================
RCS file: /vol/gnu/src/gcc/.gcc-cvs/gcc/libmudflap/Attic/mf-hooks3.c,v
retrieving revision 1.1.2.7
diff -u -p -r1.1.2.7 mf-hooks3.c
--- libmudflap/mf-hooks3.c 20 Mar 2004 12:33:41 -0000 1.1.2.7
+++ libmudflap/mf-hooks3.c 19 Apr 2004 22:54:22 -0000
@@ -38,9 +38,10 @@ Software Foundation, 59 Temple Place - S
/* These attempt to coax various unix flavours to declare all our
needed tidbits in the system headers. */
-#if !defined(__FreeBSD__) && !defined(__APPLE__)
+#if !defined(__FreeBSD__) && !defined(__APPLE__) && !defined(__osf__)
#define _POSIX_SOURCE
#endif /* Some BSDs break <sys/socket.h> if this is defined. */
+#if !defined(__osf__)
#define _GNU_SOURCE
#define _XOPEN_SOURCE
#define _BSD_TYPES
@@ -48,6 +49,7 @@ Software Foundation, 59 Temple Place - S
#define _ALL_SOURCE
#define _LARGE_FILE_API
#define _XOPEN_SOURCE_EXTENDED 1
+#endif
#include <string.h>
#include <stdio.h>
Index: libmudflap/mf-runtime.c
===================================================================
RCS file: /vol/gnu/src/gcc/.gcc-cvs/gcc/libmudflap/Attic/mf-runtime.c,v
retrieving revision 1.1.2.49
diff -u -p -r1.1.2.49 mf-runtime.c
--- libmudflap/mf-runtime.c 20 Mar 2004 12:33:41 -0000 1.1.2.49
+++ libmudflap/mf-runtime.c 19 Apr 2004 22:49:44 -0000
@@ -33,9 +33,10 @@ Software Foundation, 59 Temple Place - S
/* These attempt to coax various unix flavours to declare all our
needed tidbits in the system headers. */
-#if !defined(__FreeBSD__)
+#if !defined(__FreeBSD__) && !defined(__osf__)
#define _POSIX_SOURCE
#endif /* Some BSDs break <sys/socket.h> if this is defined. */
+#if !defined(__osf__)
#define _GNU_SOURCE
#define _XOPEN_SOURCE
#define _BSD_TYPES
@@ -43,6 +44,7 @@ Software Foundation, 59 Temple Place - S
#define _ALL_SOURCE
#define _LARGE_FILE_API
#define _XOPEN_SOURCE_EXTENDED 1
+#endif
#include <stdio.h>
#include <stdlib.h>
Anyway, I won't push this patch (or even an improved version thereof)
because it is useless: currently there's no way libmudflap can be used on
Tru64 UNIX since the native ld doesn't support the --wrap option. I'll
report this problem separately.
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/gnu/src/gcc/gcc-tree-ssa-dist/configure --prefix=/vol/gcc --with-local-prefix=/vol/gcc --disable-nls --enable-languages=c++,java,objc --host alpha-dec-osf4.0f --build alpha-dec-osf4.0f --target alpha-dec-osf4.0f
How-To-Repeat:
Bootstrap the tree-ssa branch as above.
--
Summary: [tree-ssa] libmudflap doesn't compile on Tru64 UNIX
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
CC: gcc-bugs at gcc dot gnu dot org
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=15174
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libmudflap/15174] [tree-ssa] libmudflap doesn't compile on Tru64 UNIX
2004-04-27 19:17 [Bug other/15174] New: [tree-ssa] libmudflap doesn't compile on Tru64 UNIX gcc-bugzilla at gcc dot gnu dot org
@ 2004-04-27 19:20 ` pinskia at gcc dot gnu dot org
2004-05-13 23:56 ` [Bug libmudflap/15174] " pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-27 19:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-27 19:05 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
Status|UNCONFIRMED |NEW
Component|other |libmudflap
Ever Confirmed| |1
Keywords| |build
Last reconfirmed|0000-00-00 00:00:00 |2004-04-27 19:05:56
date| |
Target Milestone|--- |tree-ssa
Version|unknown |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15174
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libmudflap/15174] libmudflap doesn't compile on Tru64 UNIX
2004-04-27 19:17 [Bug other/15174] New: [tree-ssa] libmudflap doesn't compile on Tru64 UNIX gcc-bugzilla at gcc dot gnu dot org
2004-04-27 19:20 ` [Bug libmudflap/15174] " pinskia at gcc dot gnu dot org
@ 2004-05-13 23:56 ` pinskia at gcc dot gnu dot org
2004-06-07 15:28 ` fche at redhat dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-13 23:56 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|minor |normal
Component|tree-optimization |libmudflap
Summary|[tree-ssa] libmudflap |libmudflap doesn't compile
|doesn't compile on Tru64 |on Tru64 UNIX
|UNIX |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15174
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libmudflap/15174] libmudflap doesn't compile on Tru64 UNIX
2004-04-27 19:17 [Bug other/15174] New: [tree-ssa] libmudflap doesn't compile on Tru64 UNIX gcc-bugzilla at gcc dot gnu dot org
2004-04-27 19:20 ` [Bug libmudflap/15174] " pinskia at gcc dot gnu dot org
2004-05-13 23:56 ` [Bug libmudflap/15174] " pinskia at gcc dot gnu dot org
@ 2004-06-07 15:28 ` fche at redhat dot com
2004-07-09 15:53 ` fche at redhat dot com
2004-07-09 22:12 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 7+ messages in thread
From: fche at redhat dot com @ 2004-06-07 15:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From fche at redhat dot com 2004-06-07 15:28 -------
Good points re feature macros.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Last reconfirmed|2004-04-27 19:05:56 |2004-06-07 15:28:48
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15174
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libmudflap/15174] libmudflap doesn't compile on Tru64 UNIX
2004-04-27 19:17 [Bug other/15174] New: [tree-ssa] libmudflap doesn't compile on Tru64 UNIX gcc-bugzilla at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-06-07 15:28 ` fche at redhat dot com
@ 2004-07-09 15:53 ` fche at redhat dot com
2004-07-09 22:12 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 7+ messages in thread
From: fche at redhat dot com @ 2004-07-09 15:53 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |16454
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15174
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libmudflap/15174] libmudflap doesn't compile on Tru64 UNIX
2004-04-27 19:17 [Bug other/15174] New: [tree-ssa] libmudflap doesn't compile on Tru64 UNIX gcc-bugzilla at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-07-09 15:53 ` fche at redhat dot com
@ 2004-07-09 22:12 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-09 22:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-09 22:12 -------
Not as important now that libmudflap is disable on every target except for linux.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.5.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15174
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libmudflap/15174] libmudflap doesn't compile on Tru64 UNIX
[not found] <bug-15174-4@http.gcc.gnu.org/bugzilla/>
@ 2011-07-19 11:25 ` ro at gcc dot gnu.org
0 siblings, 0 replies; 7+ messages in thread
From: ro at gcc dot gnu.org @ 2011-07-19 11:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15174
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
CC| |ro at gcc dot gnu.org
Resolution| |WONTFIX
--- Comment #4 from Rainer Orth <ro at gcc dot gnu.org> 2011-07-19 11:23:57 UTC ---
While the fundamental point about defining every feature test macro in sight
remains valid, there's no point in trying to fix this for Tru64 UNIX: gld
doesn't
work and the vendor linker has no support for --wrap or equivalent.
Rainer
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-07-19 11:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-27 19:17 [Bug other/15174] New: [tree-ssa] libmudflap doesn't compile on Tru64 UNIX gcc-bugzilla at gcc dot gnu dot org
2004-04-27 19:20 ` [Bug libmudflap/15174] " pinskia at gcc dot gnu dot org
2004-05-13 23:56 ` [Bug libmudflap/15174] " pinskia at gcc dot gnu dot org
2004-06-07 15:28 ` fche at redhat dot com
2004-07-09 15:53 ` fche at redhat dot com
2004-07-09 22:12 ` pinskia at gcc dot gnu dot org
[not found] <bug-15174-4@http.gcc.gnu.org/bugzilla/>
2011-07-19 11:25 ` 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).