I am trying to build klibc in an hardened environment. The ssp causes
some problems. I wonder how I can turn off the ssp while compiling
klibc? I have tried USE="-hardened" CFLAGS="-fnostack-protector" but it
looks like the -fno-stackprotector option never is used. What can I do
to compile klibc in my hardened environment? Turning off SSP is ok. It
will only be used for initramfs anyway.

Here are som output:
recv.o(.text+0x14): In function `recv':
/var/tmp/portage/klibc-1.0.14/work/klibc-1.0.14/klibc/recv.c:9:
undefined reference to `__guard'
recv.o(.text+0x41):/var/tmp/portage/klibc-1.0.14/work/klibc-1.0.14/klibc/recv.c:11:
undefined reference to `__stack_smash_handler'
libgcc/__divdi3.o(.text+0x17): In function `__divdi3':
libgcc/__divdi3.c:11: undefined reference to `__guard'
libgcc/__divdi3.o(.text+0x7f):libgcc/__divdi3.c:29: undefined reference
to `__stack_smash_handler'
libgcc/__moddi3.o(.text+0x17): In function `__moddi3':
libgcc/__moddi3.c:11: undefined reference to `__guard'
libgcc/__moddi3.o(.text+0x90):libgcc/__moddi3.c:29: undefined reference
to `__stack_smash_handler'
libgcc/__udivdi3.o(.text+0x13): In function `__udivdi3':
libgcc/__udivdi3.c:11: undefined reference to `__guard'
libgcc/__udivdi3.o(.text+0x3f):libgcc/__udivdi3.c:13: undefined
reference to `__stack_smash_handler'
libgcc/__umoddi3.o(.text+0x13): In function `__umoddi3':
libgcc/__umoddi3.c:11: undefined reference to `__guard'
libgcc/__umoddi3.o(.text+0x4b):libgcc/__umoddi3.c:16: undefined
reference to `__stack_smash_handler'
libgcc/__udivmoddi4.o(.text+0x1d): In function `__udivmoddi4':
libgcc/__udivmoddi4.c:5: undefined reference to `__guard'
libgcc/__udivmoddi4.o(.text+0xda):libgcc/__udivmoddi4.c:32: undefined
reference to `__stack_smash_handler'
make[1]: *** [libc.so] Error 1
rm tests/microhello.o tests/malloctest.o tests/stat.o tests/statfs.o
tests/fcntl.o tests/strtoimax.o tests/setenvtest.o tests/idtest.o
tests/opentest.o tests/strlcpycat.o tests/malloctest2.o
tests/minihello.o tests/hello.o tests/setjmptest.o tests/nfs_no_rpc.o
tests/rtsig.o tests/memstrtest.o tests/strtotime.o tests/getopttest.o
tests/sigint.o tests/getpagesize.o tests/environ.o tests/mmaptest.o
tests/testrand48.o
make[1]: Leaving directory
`/var/tmp/portage/klibc-1.0.14/work/klibc-1.0.14/klibc'
make: *** [all] Error 2

--
Natanael Copa


-- 
[email protected] mailing list

Reply via email to