Re: Bug#357122: FTBFS on mips: cannot compute sizeof (char *)
* Ben Pfaff <blp@cs.stanford.edu> [2006-03-15 12:13]:
> However, it doesn't try to link, and it appears that on this MIPS
> target -fstack-protector succeeds in compiling (with a warning) and
> fails in linking. (This might actually be a GCC bug: why try to
> link with -lssp_nonshared if you don't support stack protection?)
I tend to agree, but let's ask the GCC folks. GCC people, basically,
the problem is that -fstack-protector does not work on MIPS. However,
instead of generating an error when this option is passed, it only
issues a warning - but then fails during linking.
$ gcc-4.1 -g -O2 -fstack-protector test.c
test.c:1: warning: -fstack-protector not supported for this target
/usr/bin/ld: cannot find -lssp_nonshared
collect2: ld returned 1 exit status
This doesn't really make sense, does it?
The specific problem we have is that autoconf checks whether
-fstack-protector is supported by the compiler and it thinks it is on
mips because there's no error in compilation:
$ gcc-4.1 -g -O2 -fstack-protector -o x -c test.c
test.c:1: warning: -fstack-protector not supported for this target
$ echo $?
0
So we get:
| checking whether gcc-4.1 accepts -fstack-protector... yes
But later another check (for the size of char *) fails because it uses
-fstack-protector and there's a linking error...
Should autoconf be updated to recognize the warning message or should
GCC 4.1 be changed to issue an error?
--
Martin Michlmayr
http://www.cyrius.com/
Reply to: