gcc-4.1.1: default enabled stack-protector does not work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I compiled my gcc-4.1.1 with

./configure --prefix=/usr --enable-stack-protector-all \
--enable-shared --enable-threads=poxis --enable-__cxa_atexit \
--disable-checking --with-gnu-ld --verbose --target=i486-hardened-linux
--host=i486-hardened-linux --enable-libstdcpp

My gcc -v sais:
Using built-in specs.
Target: i486-hardenedlinux
Configured wit: ../gcc-4.1.1/configure --prefix=/usr --enable-stack-protector-all
--enable-shared --enable-threads=poxis --enable-__cxa_atexit --disable-checking
--with-gnu-ld --verbose --target=i486-hardened-linux --host=i486-hardened-linux
--enable-libstdcpp
Thread model: posix
gcc version 4.1.1

My problem is, that my gcc does not enable -fstack-protector-all by default (but
I used --enable-stack-protector-all):

$ cat conftest.c
#include <stdio.h>
int main() {
     printf("%i\n", __SSP_ALL__);
     return 0;
}
$ gcc -o conftest conftest.c
conftest.c: In function 'main':
conftest.c:3: error: '__SSP_ALL__' undeclared (first use in this function)
...
$ gcc -o conftest -fstack-protector-all conftest.c
$ ./conftest
2

I don't understand why I need to enable -fstack-protector-all by hand.

regards
--Steffen


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux