This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
PATH_MAX missing cross building gmon-sol2.c
- From: Jay <jayk123 at hotmail dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Sun, 15 Jun 2008 15:04:17 +0000
- Subject: PATH_MAX missing cross building gmon-sol2.c
I am crossing from i686-cygwin to sparc-solaris (my Sun cc won't compile gcc
due to macros with empty parameters like in c-common.c):
/src/gcc-4.3.1/gcc/config/sparc/gmon-sol2.c: In function '_mcleanup':
/src/gcc-4.3.1/gcc/config/sparc/gmon-sol2.c:182: error: 'PATH_MAX' undeclared (first use in this function)
/src/gcc-4.3.1/gcc/config/sparc/gmon-sol2.c:182: error: (Each undeclared identifier is reported only once
/src/gcc-4.3.1/gcc/config/sparc/gmon-sol2.c:182: error: for each function it appears in.)
/src/gcc-4.3.1/gcc/config/sparc/gmon-sol2.c:182: warning: unused variable 'buf'
make[3]: *** [/cygdrive/d/obj/cross-gcc/sparc-solaris/libgcc/gmon.o] Error 1
make[3]: Leaving directory `/cygdrive/d/obj/cross-gcc/gcc'
make[2]: *** [gcc-extra-parts] Error 2
Could be my /usr/local/sparc-solaris/include is old.
just add #define PATH_MAX 1024
D:\src\gcc-4.3.1\gcc\config\sparc>diff -u gmon-sol2.c.orig gmon-sol2.c
--- gmon-sol2.c.orig 2008-06-15 07:55:53.296875000 -0700
+++ gmon-sol2.c 2008-06-15 07:55:57.671875000 -0700
@@ -37,6 +37,8 @@
#include /* for creat() */
#include "coretypes.h"
#include "tm.h"
+
+#define PATH_MAX 1024
#if 0
#include "sparc/gmon.h"
I deliberately didn't put #ifndef in so that if it is defined, and this mismatches, will error.
Thanks,
- Jay