Chris Garrett wrote:

I built 4.0.0 last week and thought I would update to 4.0.1. While building 401 I got the following error:

----------------------------------------------------------
gcc -c -g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wno-error -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I/d/developer/src/gcc-4.0.1/gcc -I/d/developer/src/gcc-4.0.1/gcc/build -I/d/developer/src/gcc-4.0.1/gcc/../include -I/d/developer/src/gcc-4.0.1/gcc/../libcpp/include -I/usr/local/gmp-4.1.4/include \
-o build/gengtype-yacc.o /d/developer/src/gcc-4.0.1/gcc/gengtype-yacc.c
gcc -g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -DHAVE_CONFIG_H -DGENERATOR_FILE -s -o build/gengtype.exe \
build/gengtype.o build/gengtype-lex.o build/gengtype-yacc.o \
build/errors.o ../build-i686-pc-mingw32/libiberty/libiberty.a
build/gengtype.exe
/d/developer/src/gcc-4.0.1/gcc/input.h: No such file or directory
make[2]: *** [s-gtype] Error 1
make[2]: Leaving directory `/d/developer/projects/chinook_lib/gcc/build/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/d/developer/projects/chinook_lib/gcc/build/gcc'
make: *** [bootstrap] Error 2
----------------------------------------------------------

The file exists in that location so I'm not sure what to do with this. I'm building on winxp pro, GCC 3.4.1 using Msys.

Config line:
------------------
../gcc-4.0.1/configure \
   --prefix=/mingw \
   --with-gcc \
   --with-gnu-ld \
   --with-gnu-as \
   --enable-threads \
   --disable-shared \
   --disable-nls \
   --enable-languages=c,c++,f95 \
   --disable-win32-registry \
   --with-gmp=/usr/local/gmp-4.1.4


Make cmd:
------------------
make \
       CFLAGS="-O2 -march=i686 -fomit-frame-pointer" \
       CXXFLAGS="-mthreads -O2 -march=i686 -fomit-frame-pointer" \
       LIBCFLAGS="-O2" \
       LIBCXXFLAGS="-O2 -fno-implicit-templates" \
       LDFLAGS="-s" \
       bootstrap

this patch should sort you out

Index: gcc/c-incpath.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-incpath.c,v
retrieving revision 1.21
diff -c -3 -p -r1.21 c-incpath.c
*** gcc/c-incpath.c    23 Jan 2005 15:05:27 -0000    1.21
--- gcc/c-incpath.c    23 Feb 2005 19:39:49 -0000
*************** add_path (char *path, int chain, int cxx
*** 331,343 ****
   cpp_dir *p;

 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
!   /* Convert all backslashes to slashes.  The native CRT stat()
!      function does not recognize a directory that ends in a backslash
!      (unless it is a drive root dir, such "c:\").  Forward slashes,
!      trailing or otherwise, cause no problems for stat().  */
!   char* c;
!   for (c = path; *c; c++)
!     if (*c == '\\') *c = '/';
 #endif

   p = xmalloc (sizeof (cpp_dir));
--- 331,348 ----
   cpp_dir *p;

 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
!   /* Remove unnecessary trailing slashes.  On some versions of MS
!      Windows, trailing  _forward_ slashes cause no problems for stat().
!      On newer versions, stat() does not recognise a directory that ends
!      in a '\\' or '/', unless it is a drive root dir, such as "c:/",
!      where it is obligatory.  */
!   int pathlen = strlen (path);
!   char* end = path + pathlen - 1;
!   /* Preserve the lead '/' or lead "c:/".  */
!   char* start = path + (pathlen > 2 && path[1] == ':' ? 3 : 1);
! ! for (; end > start && IS_DIR_SEPARATOR (*end); end--)
!     *end = 0;
 #endif

   p = xmalloc (sizeof (cpp_dir));



Reply via email to