public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] egcs-ss-1998-05-02 wouldn't build on mips-sgi-irix5.2
@ 1998-05-06 23:49 Alexandre Oliva
  1998-05-07 21:59 ` Jim Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Oliva @ 1998-05-06 23:49 UTC (permalink / raw)
  To: egcs

[-- Attachment #1: Type: text/plain, Size: 414 bytes --]

Hi!

The latest snapshot of egcs wouldn't build on mips-sgi-irix5.2 because 
config.h would define HAVE_INTTYPES_H to `empty' instead of `1'.  So,
when compiling cccp.c, it would choke on `#if HAVE_INTTYPES_H', on
line 121.

The attached patch fixed this problem.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil

[-- Attachment #2: defines.diff --]
[-- Type: text/x-diff, Size: 590 bytes --]

  Alexandre Oliva <oliva@dcc.unicamp.br>

	* configure.in (config.h): #define to `1' instead of nothing

Index: gcc/configure.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/configure.in,v
retrieving revision 1.93
diff -u -r1.93 configure.in
--- gcc/configure.in	1998/04/28 05:57:03	1.93
+++ gcc/configure.in	1998/05/05 21:15:39
@@ -3016,7 +3016,7 @@
 
 	for def in `eval echo '$'$define`; do
 		echo "#ifndef $def" >>$link
-		echo "#define $def" >>$link
+		echo "#define $def 1" >>$link
 		echo "#endif" >>$link
 	done
 done

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

* Re: [patch] egcs-ss-1998-05-02 wouldn't build on mips-sgi-irix5.2
  1998-05-06 23:49 [patch] egcs-ss-1998-05-02 wouldn't build on mips-sgi-irix5.2 Alexandre Oliva
@ 1998-05-07 21:59 ` Jim Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Wilson @ 1998-05-07 21:59 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: egcs

I think the bug here is that the irix5 configurations have HAVE_INTTYPES_H
in xm_defines.  <inttypes.h> is not safe to use under Irix5.  If you bootstrap
using the SGI C compiler, you will get type redeclaration errors because
of conflicts between inttypes.h and sys/types.h.

Checking further, I see this is a bug introduced by Kenner's rewrite of the
mips configuration files.  xm-iris5.h originally had in it
	#undef HAVE_INTTYPES_H
Kenner then put this in xm_defines which is wrong, because that will define
it, not undefine it.  What we really need is a xm_undefines, or failing that,
some way to mark things in xm_defines which need to be undefined.  Or we
could just undo Kenner's change, and put the #undef back in xm-iris5.h.

As for the configure.in patch, 
	* configure.in (config.h): #define to `1' instead of nothing
it is harmless and may be otherwise beneficial, so we may as well accept it.

Jim

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

end of thread, other threads:[~1998-05-07 21:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-06 23:49 [patch] egcs-ss-1998-05-02 wouldn't build on mips-sgi-irix5.2 Alexandre Oliva
1998-05-07 21:59 ` Jim Wilson

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).