I'd suggest you to disable libssp support for your target. In order to,
add --disable-libssp to the gcc configure options.
I think libssp is for rather complex systems (and powerful targets). You
don't want to use it on small target, and I assume a mips target not to
be big enough to use libssp overhead required to manage stack overflow.
Document yourself here in order to know if you want it or not:
http://aconole.brad-x.com/papers/exploits/ssp/intro
You can easily check how it is most of the times disabled in most gcc
toolchain compile process tutorials (google-> "libssp" and scroll).
R
On 06/08/2013 10:54 AM, sudha sarita jha wrote:
Hi,
gcc-4.7.2 build fails while cross compiling for mips as target
architecture with following error:
libtool: compile: /home/prem/GCC/gcc_build_mips/./gcc/xgcc
-B/home/prem/GCC/gcc_build_mips/./gcc/
-B/DRIVER/MIPS/mips-unknown-elf/bin/
-B/DRIVER/MIPS/mips-unknown-elf/lib/ -isystem
/DRIVER/MIPS/mips-unknown-elf/include -isystem
/DRIVER/MIPS/mips-unknown-elf/sys-include -DHAVE_CONFIG_H -I.
-I../../../gcc-4.7.2/libssp -Wall -g -O2 -MT ssp.lo -MD -MP -MF
.deps/ssp.Tpo -c ../../../gcc-4.7.2/libssp/ssp.c -o ssp.o
../../../gcc-4.7.2/libssp/ssp.c: In function ‘__guard_setup’:
../../../gcc-4.7.2/libssp/ssp.c:78:3: warning: implicit declaration of
function ‘open’ [-Wimplicit-function-declaration]
../../../gcc-4.7.2/libssp/ssp.c:78:30: error: ‘O_RDONLY’ undeclared
(first use in this function)
../../../gcc-4.7.2/libssp/ssp.c:78:30: note: each undeclared
identifier is reported only once for each function it appears in
../../../gcc-4.7.2/libssp/ssp.c:81:7: error: unknown type name ‘ssize_t’
../../../gcc-4.7.2/libssp/ssp.c:81:7: warning: implicit declaration of
function ‘read’ [-Wimplicit-function-declaration]
../../../gcc-4.7.2/libssp/ssp.c:83:7: warning: implicit declaration of
function ‘close’ [-Wimplicit-function-declaration]
../../../gcc-4.7.2/libssp/ssp.c: At top level:
../../../gcc-4.7.2/libssp/ssp.c:97:25: error: unknown type name ‘size_t’
../../../gcc-4.7.2/libssp/ssp.c: In function ‘__stack_chk_fail’:
../../../gcc-4.7.2/libssp/ssp.c:169:3: warning: implicit declaration
of function ‘fail’ [-Wimplicit-function-declaration]
../../../gcc-4.7.2/libssp/ssp.c:169:3: warning: implicit declaration
of function ‘strlen’ [-Wimplicit-function-declaration]
../../../gcc-4.7.2/libssp/ssp.c:169:14: warning: incompatible implicit
declaration of built-in function ‘strlen’ [enabled by default]
../../../gcc-4.7.2/libssp/ssp.c: In function ‘__chk_fail’:
../../../gcc-4.7.2/libssp/ssp.c:176:14: warning: incompatible implicit
declaration of built-in function ‘strlen’ [enabled by default]
make[3]: *** [ssp.lo] Error 1
make[3]: Leaving directory
`/home/prem/GCC/gcc_build_mips/mips-unknown-elf/libssp'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/home/prem/GCC/gcc_build_mips/mips-unknown-elf/libssp'
make[1]: *** [all-target-libssp] Error 2
make[1]: Leaving directory `/home/prem/GCC/gcc_build_mips'
make: *** [all] Error 2
I am using Ubuntu 11.04.
How and where to declare these undeclared variables?
Regards,
Sudha Sarita