This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: undefined reference to `__stack_chk_guard' with sparc crosscompiler


Now I configure glibc with the following line:

../glibc/configure --prefix=/opt/sparc-sun-linux/
--build=x86_64-pc-linux-gnu --host=sparc-sun-linux
--target=sparc-sun-linux --with-headers=/opt/sparc-sun-linux/include
CFLAGS=-O2 CPPFLAGS=-O2

And get

sparc-sun-linux-gcc   -shared -static-libgcc -Wl,-O1  -Wl,-z,defs
-Wl,-dynamic-linker=/home/alex/test/test1/cross/sparc-sun-linux/lib/ld-linux.so.2
 -B/home/alex/test/test1/glibc_objs/csu/
-Wl,--version-script=/home/alex/test/test1/glibc_objs/libresolv.map
-Wl,-soname=libresolv.so.2 -Wl,-z,combreloc -Wl,-z,relro
-Wl,--hash-style=both  -L/home/alex/test/test1/glibc_objs
-L/home/alex/test/test1/glibc_objs/math
-L/home/alex/test/test1/glibc_objs/elf
-L/home/alex/test/test1/glibc_objs/dlfcn
-L/home/alex/test/test1/glibc_objs/nss
-L/home/alex/test/test1/glibc_objs/nis
-L/home/alex/test/test1/glibc_objs/rt
-L/home/alex/test/test1/glibc_objs/resolv
-L/home/alex/test/test1/glibc_objs/crypt
-L/home/alex/test/test1/glibc_objs/mathvec
-L/home/alex/test/test1/glibc_objs/nptl
-Wl,-rpath-link=/home/alex/test/test1/glibc_objs:/home/alex/test/test1/glibc_objs/math:/home/alex/test/test1/glibc_objs/elf:/home/alex/test/test1/glibc_objs/dlfcn:/home/alex/test/test1/glibc_objs/nss:/home/alex/test/test1/glibc_objs/nis:/home/alex/test/test1/glibc_objs/rt:/home/alex/test/test1/glibc_objs/resolv:/home/alex/test/test1/glibc_objs/crypt:/home/alex/test/test1/glibc_objs/mathvec:/home/alex/test/test1/glibc_objs/nptl
-o /home/alex/test/test1/glibc_objs/resolv/libresolv.so -T
/home/alex/test/test1/glibc_objs/shlib.lds
/home/alex/test/test1/glibc_objs/csu/abi-note.o -Wl,--whole-archive
/home/alex/test/test1/glibc_objs/resolv/libresolv_pic.a
-Wl,--no-whole-archive  -Wl,--start-group
/home/alex/test/test1/glibc_objs/libc.so
/home/alex/test/test1/glibc_objs/libc_nonshared.a -Wl,--as-needed
/home/alex/test/test1/glibc_objs/elf/ld.so -Wl,--no-as-needed
-Wl,--end-group
/home/alex/test/test1/glibc_objs/resolv/libresolv_pic.a(ns_print.os):
In function `__GI_ns_sprintrrf':
ns_print.c:(.text+0x8f8): undefined reference to `__stack_chk_guard'
ns_print.c:(.text+0x8fc): undefined reference to `__stack_chk_guard'
ns_print.c:(.text+0x900): undefined reference to `__stack_chk_guard'
ns_print.c:(.text+0xa4c): undefined reference to `__stack_chk_guard'
ns_print.c:(.text+0xa50): undefined reference to `__stack_chk_guard'
/home/alex/test/test1/glibc_objs/resolv/libresolv_pic.a(ns_print.os):ns_print.c:(.text+0xa54):
more undefined references to `__stack_chk_guard' follow

--
Kind regards,
Markin Alex

2015-12-09 7:00 GMT+00:00 Waldemar Brodkorb <wbx@openadk.org>:
> Hi Alex,
> Alex Markin wrote,
>
>> Hello.
>>
>> I'm trying to build a sparc cross-compiler, but I get the following error:
>>
>> /home/alex/test/test1/glibc_objs/resolv/libresolv_pic.a(ns_print.os):
>> In function `__GI_ns_sprintrrf':
>> ns_print.c:(.text+0x8f8): undefined reference to `__stack_chk_guard'
>> ns_print.c:(.text+0x8fc): undefined reference to `__stack_chk_guard'
>> ns_print.c:(.text+0x900): undefined reference to `__stack_chk_guard'
>> ns_print.c:(.text+0xa4c): undefined reference to `__stack_chk_guard'
>> ns_print.c:(.text+0xa50): undefined reference to `__stack_chk_guard'
>> /home/alex/test/test1/glibc_objs/resolv/libresolv_pic.a(ns_print.os):ns_print.c:(.text+0xa54):
>> more undefined references to `__stack_chk_guard' follow
>>
>> I've read the thread from libc-alpha 05 Sep 2012 with the same error.
>> I tryed to build glibc with gcc_cv_libc_provides_ssp=yes (and no too)
>> but it did not help. Actually I can add -fno-stack-protector to my
>> build flags, but that does not seem to be a good solution. I use trunk
>> versions of gcc and glibc
>>
>> So, please, any ideas about this problem?
>
> As far as i know, glibc can not compiled with -fstack-protector.
> gcc_cv_libc_provides_ssp is for gcc and should be yes.
>
> best regards
>  Waldemar


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