Date: Wed, 23 Apr 1997 14:11:43 -0500 From: Nanbor Wang <nw1@cs.wustl.edu> To: hackers@freebsd.org Subject: Any compiler guru? (Was: 2 questions about C++ support in 2.2) Message-ID: <199704231911.OAA17121@siesta.cs.wustl.edu>
next in thread | raw e-mail | index | archive | help
Hi all, I have been working on porting ACE to FreeBSD platform on and off for quite some time. Fortunately, I have solved most of the problem for a non-thread version of ACE and will ask the author of ACE to commit the changes into his lastest version very soon. However, I got caught by a possibly buggy behavior of g++ on FreeBSD. ACE uses a lot of (advanced?) features of C++ and it seems to me that we don't have a very good C++ support on our platform. I've seen this issue being raised several times but never recalled to see an answer or solution or fix to it. ;( The problem I have only happens when I try to compile an object for .so library. If I ask g++ to generate static code, then, there is no problem at all. Here is how I compile, gcc -w -I. -fno-strict-prototypes -D__ACE_INLINE__ -D_POSIX_THREADS -g -I/ho me/nw1/ACE_wrappers -I. -c -fPIC -DPIC -o .shobj/Local_Tokens.so Local_Tokens.cpp /var/tmp/cc022478.s: Assembler messages: /var/tmp/cc022478.s:16783: Warning: GOT relocation burb: `__vt$15ACE_Local_Mutex ' should be global /var/tmp/cc022478.s:16783: Warning: GOT relocation burb: `__vt$15ACE_Local_RLock ' should be global /var/tmp/cc022478.s:16783: Warning: GOT relocation burb: `__vt$15ACE_Local_WLock ' should be global /var/tmp/cc022478.s:16783: Warning: GOT relocation burb: `__vt$10ACE_Tokens' sho uld be global A lot of files generate these warning messages. Although I did get libACE.so compiled successfully, I haven't had time to confirm it works correctly.. However, I was not able to compile one example in ACE. After spitting out a lot of GOT warnings, the compiler finally spited out "Compiler internal error" and went dead. Although at this moment, the static library (libACE.a) seems to work perfectly on FreeBSD, being able to build .so library is very important in ACE for it provides a convenient routines that enable users to reconfigure a service by relinking shared object on the fly (without shutting down the server program.) I have no idea at all as this problem is caused by incorrect g++ behavior or by lame assembler (binutil?) Is there a quick fix for this? Has any one solved this problem before? Will switching to gcc 2.7.2.2 help? Or, we should get a better binutil? Thanks in advance. Nanbor p.s. I hate to say this but Linux handles this code without a glitch which makes me very uncomfortable.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704231911.OAA17121>