From owner-freebsd-hackers Wed Apr 23 12:12:20 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA17660 for hackers-outgoing; Wed, 23 Apr 1997 12:12:20 -0700 (PDT) Received: from siesta.cs.wustl.edu (nw1@siesta.cs.wustl.edu [128.252.165.3]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id MAA17655 for ; Wed, 23 Apr 1997 12:12:18 -0700 (PDT) Received: from localhost by siesta.cs.wustl.edu (SMI-8.6/ECL-J1.00) id OAA17121; Wed, 23 Apr 1997 14:11:44 -0500 Message-Id: <199704231911.OAA17121@siesta.cs.wustl.edu> To: hackers@freebsd.org From: Nanbor Wang Subject: Any compiler guru? (Was: 2 questions about C++ support in 2.2) Date: Wed, 23 Apr 1997 14:11:43 -0500 Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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.