This is the mail archive of the gcc-help@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]

Re: default cflags to compile


On Mon, 12 Dec 2005, Nuno Lopes gibbered uncontrollably:
I need to generate a gcc binary that will always enable the
-fabi-version=1, because I have a library built with gcc 3.3 and I
need to link with it, but I would like to use gcc 4.

The libstdc++ ABI broke between these releases, so unless your library doesn't use libstdc++ at all (somewhat unlikely), there is little point to this.q

The problem is that we are using a closed-source library from Sony (for their robots AIBO, which run on a MIPS) and they don't support anything other than gcc 3.3.

You're in trouble then.


If the library uses libstdc++, does it help if I compile it with
-fabi-version?

Only if you *never* pass any objects manipulated by that old libstdc++ to the newer version of libstdc++, or vice versa. This is likely to be hard to ensure.


Update: I've tried to compile some sample sources, but linking has failed with:

/usr/local/OPEN_R_SDK/OPEN_R/bin/mkbin -p /usr/local/OPEN_R_SDK -o tinyFTPD.bin TinyFTPDStub.o TinyFTPD.o FtpPI.o FtpRequest.o FtpDTP.o FtpMethod.o tinyFTPD.ocf -L/usr/local/OPEN_R_SDK/OPEN_R/lib -lObjectComm -lOPENR -lInternet -lantMCOOP
/usr/local/OPEN_R_SDK/OPEN_R/lib/libObjectComm.a(OObserver.o): In function `OObserver::OObserver()':
OObserver.cc:(.text+0x64): undefined reference to `std::__default_alloc_template<true, 0>::allocate(unsigned int)'
OObserver.cc:(.text+0x16c): undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
/usr/local/OPEN_R_SDK/OPEN_R/lib/libObjectComm.a(OObserver.o): In function `OObserver::OObserver()':
OObserver.cc:(.text+0x1f8): undefined reference to `std::__default_alloc_template<true, 0>::allocate(unsigned int)'
OObserver.cc:(.text+0x300): undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
/usr/local/OPEN_R_SDK/OPEN_R/lib/libObjectComm.a(OObserver.o): In function `OObserver::~OObserver()':
OObserver.cc:(.text+0x3b0): undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
OObserver.cc:(.text+0x41c): undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
/usr/local/OPEN_R_SDK/OPEN_R/lib/libObjectComm.a(OObserver.o): In function `OObserver::~OObserver()':
OObserver.cc:(.text+0x4dc): undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
OObserver.cc:(.text+0x548): undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
/usr/local/OPEN_R_SDK/OPEN_R/lib/libObjectComm.a(OObserver.o):OObserver.cc:(.text+0x608): more undefined references to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)' follow
/usr/local/OPEN_R_SDK/OPEN_R/lib/libObjectComm.a(OObserver.o): In function `std::list<OSubjectInfo, std::allocator<OSubjectInfo> >::_M_create_node(OSubjectInfo const&)':
OObserver.cc:(.gnu.linkonce.t._ZNSt4listI12OSubjectInfoSaIS0_EE14_M_create_nodeERKS0_+0x28): undefined reference to `std::__default_alloc_template<true, 0>::allocate(unsigned int)'
(...)



And it continues with a couple more errors about that default_alloc function and std::list. Isn't there a workaround, so that I can link the objects with the old lib?



Thanks,
Nuno



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