Subject: Building gcc-2.7.2.3 for winnt
From: [email-masked] (Smith, Eric)

12 Sep 1997 12:14:33 -0700
Message-ID: <c=US%a=_%p=Eastman%l=[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
To: "[email-masked]'" <[email-masked]>

To all,

I am currently trying to build the integrated version of gcc and gnat as
defined in the gnat readme files.  I hav gotten to the point of actually
building the compiler and am running into the most annoying errors I can
think of.

------------------------------------------------------------------------
---------------------------------
If I configure the system using 
	bash-2.01$ configure i386-*-winnt3
and build the compiler I get the following: (edited to eliminate long
path names)

bash-2.01$ make CC=gcc CFLAGS="-O2" LANGUAGES="c ada"
gcc  -DIN_GCC   -O2     -I. -I. -I./config \
       -DGCC_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/i386-*-winnt3/2.7.2.3/
include\" \
       -DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/lib/g++-include\" \
       -DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \
       -DCROSS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/i386-*-winnt3/2.7.2.
3/sys-include\" \
       -DTOOL_INCLUDE_DIR=\"/usr/local/i386-*-winnt3/include\" \
       -c `echo ./cccp.c | sed 's,^\./,,'`
In file included from cccp.c:67:
/cygnus/root/i386-cygwin32/include/sys/stat.h:85: warning: `S_IRWXU'
redefined 
config/winnt/xm-winnt.h:66: warning: this is the location of the
previous definition
/cygnus/root/i386-cygwin32/include/sys/stat.h:100: warning: `S_ISDIR'
redefined
config/winnt/xm-winnt.h:68: warning: this is the location of the
previous definition
/cygnus/root/i386-cygwin32/include/sys/stat.h:102: warning: `S_ISREG'
redefined
config/winnt/xm-winnt.h:67: warning: this is the location of the
previous definition
In file included from cccp.c:130:
/cygnus/root/i386-cygwin32/include/string.h:54: warning: conflicting
types for built-in function `memcmp'
/cygnus/root/i386-cygwin32/include/string.h:55: warning: conflicting
types for built-in function `memcpy'
/cygnus/root/i386-cygwin32/include/string.h:56: syntax error before `0'
/cygnus/root/i386-cygwin32/include/string.h:56: warning: conflicting
types for built-in function `memset'
make: *** [cccp.o] Error 1
bash-2.01$

The major error is the syntax error in string.h (Line 56).

Here is the problem section of string.h

_PTR 	 _EXFUN(memchr,(const _PTR, int, size_t));
int 	 _EXFUN(memcmp,(const _PTR, const _PTR, size_t));
_PTR	 _EXFUN(memcpy,(_PTR, const _PTR, size_t));
_PTR	 _EXFUN(memmove,(_PTR, const _PTR, size_t));
_PTR	 _EXFUN(memset,(_PTR, int, size_t));
char 	*_EXFUN(strcat,(char *, const char *));
char 	*_EXFUN(strchr,(const char *, int));
int	 _EXFUN(strcmp,(const char *, const char *));

As you can see, there is no `0' in string.h

------------------------------------------------------------------------
---------------------------------

If I instead try to configure from the command line using 
	C:\Unix\src\gcc>configure winnt i386

The results are :

Configuring GCC for Windows NT on i386
        1 file(s) copied.
C:\Unix\src\gcc>make CC=gcc CFLAGS="-O2" LANGUAGES="c ada"
Makefile:110: *** missing separator.  Stop.

This section of Makefile is as follows (starting at line 106)

# Header files that are made available under the same name
# to programs compiled with GCC.
USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
    $(srcdir)/ginclude/varargs.h $(srcdir)/ginclude/va-alpha.h \
    $(srcdir)/ginclude/va-h8300.h $(srcdir)/ginclude/va-i860.h \
    $(srcdir)/ginclude/va-i960.h $(srcdir)/ginclude/va-mips.h \
    $(srcdir)/ginclude/va-m88k.h $(srcdir)/ginclude/va-pa.h \
    $(srcdir)/ginclude/va-pyr.h $(srcdir)/ginclude/va-sparc.h \
    $(srcdir)/ginclude/va-clipper.h $(srcdir)/ginclude/va-spur.h \
    $(srcdir)/ginclude/iso646.h $(srcdir)/ginclude/va-ppc.h \
    $(srcdir)/ginclude/proto.h $(EXTRA_HEADERS)

------------------------------------------------------------------------
---------------------------------

Can anyone give me assistance on getting these things built?

Eric M. Smith
telephone               : (423) 229-2254
profs/officevision     : XGIB003
internet -- business : [email-masked]
internet -- personal  : [email-masked]

Do not meddle in the affairs of wizards, for they are quick to anger.
Do not meddle in the affairs of dragons, for you are crunchy and taste
good with ketchup.

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".