This is the mail archive of the gcc@gcc.gnu.org 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:
 cross:
          U __stack_chk_fail
          U __stack_chk_guard
 native:
         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-languages=c,c++,objc,obj-c++,java,fortran
--enable-java-awt=gtk --disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
--host=sparc64-redhat-linux
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]