Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!lance!surf!kowande!s000623 From: s000623@kowande.bu.oz.au (Jason Patterson) Newsgroups: comp.unix.amiga Subject: g++ (was stdio.h incompatibility) Keywords: assembler, as, stdio.h, g++, FILE structure. Message-ID: <1619@surf.sics.bu.oz.au> Date: 19 Jun 91 01:44:10 GMT References: <1991Jun17.101219@cs.utwente.nl> Sender: news@surf.sics.bu.oz.au Organization: SICS, Bond University, Australia. Lines: 90 Installing (or trying to) g++ for AMIX is a nightmare! Even when the config files from AMIX gcc (1.37) are used, there are still *HEAPS* of problems... I have attempted to install g++ TWICE for AMIX (version 1.37.0, stay away from 1.39, even the author suggests this!). Both times I managed to overcome the stuff your getting to now by following the hacks required to gcc 1.37, found on the 4th segment of the 1.1 release tape. (ie: the changes required for AMIX, mostly to allow for PIC and so on). BUT... Don't get your hopes up... The following *BIG* problem still exists... **** THE STANDARD ASSEMBLER HATES $ SIGNS IN LABELS **** This is a big problem because EVERY constructor gets a $ sign put into it's "mangled" name by g++ (standard mangled names for constructors begin _$_). WHAT DOES THIS MEAN - It means I have a perfectly good WORKING c++ compiler, which compiles everything WITHOUT constructors perfectly, but outputs assembly code that 'as' can't assemble if constructors are involved. If I really wan't to, I can do a textual search and replace of $ in labels to something else (like an x), and then assemble the result. Although this works, I do NOT wan't to have to S&R every time I compile something with constructors. Besides, this will stuff up the workings of things like gdb anyway (because they will also expect $ in constructors). Why as can't handle $ is a puzzle, especially since every other assembler I've come across seems to handle them ok. Anyway, the following solutions come to mind... 1) FIX THE STANDARD ASSEMBLER (best option by far) 2) USE GAS (which I have not yet installed, because this would imply remaking gcc, and I would prefer NOT to have to do this) 3) Hack *A LOT* of the g++ compiler (especially the name mangler and demangler) to use some other symbol. BUT WHAT ELSE DOES STANDARD AS NOT ALLOW IN LABLES? Besides, I do NOT have the time to hack the g++ compiler to bits, and this would mean *MORE* work to fix future updates in any case. So WHY am I writing this? (for help, what else?) 1) If anyone has a working g++ for AMIX, *PLEASE* let me know. (I already know about Comeau C++) 2) If someone fixes the assembler, please let me know. 3) If anyone want's a *HALF WORKING* g++ (which is unable to compile constructors, and hence is unable to compile libg++), please let me know. (nobody could be this desperate, could they?) 4) If I can help you (slim chance), or you can help me (much more likely, since I've only installed a couple of compilers, and so am very inexperienced) please let me know... I know I didn't help this time, I hope I can help in the future... LETS GET G++ WORKING FOR AMIX... Jason Patterson ************************************************************ EMAIL: s000623@kowande.bu.oz.au OR: s000623@sand.sics.bu.oz.au Info & Computing Science, Bond University, AUSTRALIA, 4229 "These views are NOT necessarily those of Bond University" ************************************************************