Hello,
there is from line nr. 247 :
#ifdef HAVE_TZNAME #if !defined (tzname) && !defined (TZNAME_DECLARED) extern char *tzname [2]; #endif #else static char *tzname [2] = { NULL, NULL }; #endif #ifdef HAVE_TIMEZONE #if !defined (timezone) && !defined (TIMEZONE_DECLARED) extern long int timezone; #endif #else #define timezone 0 #endif
in rts.c file.
I am unable to get it working.
If add line #undef timezone before line 247, compiler said :
make[2]: Entering directory `/home/dave/cygwin/gcc-build/gcc/p/rts' /home/dave/cygwin/gcc-build/gcc/xgcc -B/home/dave/cygwin/gcc-build/gcc/ -B/home/dave/xcygwin-gcc-3.3.1-bin-2.14-pascal/i686-pc-cygwin/bin/ -B/home/dave/xcygwin-gcc-3.3.1-bin-2.14-pascal/i686-pc-cygwin/lib/ -isystem /home/dave/xcygwin-gcc-3.3.1-bin-2.14-pascal/i686-pc-cygwin/include -c -I. -W -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -g -O2 /home/dave/cygwin/gcc-3.3.1/gcc/p/rts/rts.c /home/dave/cygwin/gcc-3.3.1/gcc/p/rts/rts.c:239: error: `timezone' redeclared as different kind of symbol /home/dave/xcygwin-gcc-3.3.1-bin-2.14-pascal/i686-pc-cygwin/include/time.h:117: error: previous declaration of `timezone' /home/dave/cygwin/gcc-3.3.1/gcc/p/rts/rts.c:636: warning: `struct stat64' declared inside parameter list /home/dave/cygwin/gcc-3.3.1/gcc/p/rts/rts.c:636: warning: its scope is only this definition or declaration, which is probably not what you want /home/dave/cygwin/gcc-3.3.1/gcc/p/rts/rts.c:639: warning: `struct stat64' declared inside parameter list /home/dave/cygwin/gcc-3.3.1/gcc/p/rts/rts.c:642: warning: `struct stat64' declared inside parameter list make[2]: *** [rts.o] Error 1 make[2]: Leaving directory `/home/dave/cygwin/gcc-build/gcc/p/rts' make[1]: *** [pascal.rts] Error 2 make[1]: Leaving directory `/home/dave/cygwin/gcc-build/gcc' make: *** [all-gcc] Error 2
Regards,
David
Waldek Hebisch napsal(a):
Hello,
I am trying to build cross linux -> cygwin compiler with pascal language enabled.
I am able to build complete gcc-3.3.1 with c,c++,objc,ada,f77,java and pascal-20030507 (the three patches to get gpc-20030507 working with gcc-3.3 applied) languages enabled.
The cross compiler fails under rts :
<snip>
/home/dave/cygwin/gcc-3.3.1/gcc/p/rts/rts.c:1001: error: wrong type argument to unary minus
The error appears becouse `timezone' is at that point is either undefined or have strange definition. If you just want to finish compilation then putting the following to lines before the function containing error should help:
#undef timezone extern long timezone;
For proper fix one should check why configure made wrong choice -- it seems that `configure' defined symbols _GNU_SOURCE _LARGEFILE64_SOURCE _FILE_OFFSET_BITS
and that those symbols are not defined during build. For me it looks like `configure' bug.