This is the mail archive of the mailing list for the GCC 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]

cross mode -fstack-protector ?

 Is it a bug ?

 Maybe i still dont understand how this is emmited, but anyone knows why a
cross-compiler vs normal compiler using the -fstack-protector option why
will act differnetly ?

e.g nm on same object compiled with:
          U __stack_chk_fail
          U __stack_chk_guard
         U __stack_chk_guard

 somehow the cross one still put outside reference to __stack_chk_fail ...

Compilers are built with:

 Using built-in specs.
 Target: sparc-redhat-linux

 Configured cross compiler:

 ../configure --prefix=/usr --enable-shared
--enable-threads=posix --enable-tls --disable-libunwind-exceptions
--enable-languages=c,c++ --disable-libgomp --enable-libssp
--with-system-zlib --enable-nls --disable-checking
--enable-__cxa_atexit --disable-libunwind-exceptions
--with-long-double-128 --with-cpu=v7 --host=x86_64-redhat-linux -
-build=x86_64-redhat-linux --target=sparc-redhat-linux
Thread model: posix

 Configured native compiler:

Target: sparc64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile
--enable-java-awt=gtk --disable-dssi --enable-plugin
Thread model: posix

 This makes somehow wierd things, basicly i am unable to use with
-fstack-protector a distcc regime over cross-compilers, compile processes
will fail like this on a final linking of objects:

src/util.c:229: undefined reference to `__stack_chk_guard'

A solution is to drop -fstack-protector , but really a cross cannot do it ?

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