This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs-970901, sparc-sun-solaris2.5 problem with sys_siglist ...


	I had trouble bootstrapping egcs-970901 on sparc-sun-solaris2.5
(using cc for stage1.) Though it may happen for all svr4 hosts (see
below.)

	The problem is that configure decides sys_siglist does not
exist, then during the build, config/xm-svr4.h defines sys_siglist to
_sys_siglist (which does exist.)  When compiling collect2.c I get:

 > cc  -DIN_GCC  -DSVR4  -g  -DHAVE_CONFIG_H     -I. -I. -I./config  \
 > -DTARGET_MACHINE=\"sparc-sun-solaris2.5\"  \
 > -c `echo ./collect2.c | sed 's,^\./,,'`
 > "collect2.c", line 213: identifier redeclared: _sys_siglistp
 >         current : array[-1] of pointer to char
 >         previous: pointer to pointer to const char :
 > 	"/usr/include/signal.h", line 25
 > cc: acomp failed for collect2.c
 > make[1]: *** [collect2.o] Error 2

	This is because of the following code:

 > #ifndef NO_SYS_SIGLIST
 > #ifndef SYS_SIGLIST_DECLARED
 > extern char *sys_siglist[];
 > #endif
 > #endif

	The code becomes "extern char *_sys_siglist[]" which conflicts
with the definition from /usr/include/signal.h which is "extern const
char **".

	Perhaps the AC_DECL_SYS_SIGLIST check in autoconf should be
taught about _sys_siglist too, and the declaration in various files be
wrapped with an additional macro, SYS__SIGLIST_DECLARED (with two
underbars.)  (???)

	BTW, solaris2.5 does have strsignal() which could be checked for
and used instead.  In fact, we should write all gcc code in terms of
strsignal() (whether or not it exists,) and provide a replacement if it
is absent.  Then if the replacement was necessary, we'd only have to get
it working in one place.

		--Kaveh
--
Kaveh R. Ghazi				Project Manager
ghazi@caip.rutgers.edu			ICon CMT Corp.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]