From owner-cvs-all Mon Mar 29 20:55:25 1999 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 33BDC14DB7; Mon, 29 Mar 1999 20:55:24 -0800 (PST) (envelope-from obrien@FreeBSD.org) Received: (from obrien@localhost) by freefall.freebsd.org (8.9.2/8.9.2) id UAA98204; Mon, 29 Mar 1999 20:55:07 -0800 (PST) (envelope-from obrien@FreeBSD.org) Message-Id: <199903300455.UAA98204@freefall.freebsd.org> From: "David E. O'Brien" Date: Mon, 29 Mar 1999 20:55:07 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/contrib/egcs/gcc gcc.c Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk obrien 1999/03/29 20:55:07 PST Modified files: contrib/egcs/gcc gcc.c Log: Changes to support generation of assembler for the old a.out gas and the binutils gas (elf or a.out) with a single compiler. This uses other infrastructure in order to support both a.out and elf it needs to be able to get to both a.out and elf gas, ld, libs, crt* etc. The new freebsd.h file is based on the old freebsd-elf.h file (which has a long lineage, right back through linux and svr4 files). The change is pretty dramatic from a gcc internals standpoint as it overrides a lot of definitions in order to generate different output based on target mode. There is potential for screw-ups, so please be on the lookout - gcc's configuration mechanism wasn't really meant for this kind of thing. It's believed to compile world etc just fine under both a.out and elf, can handle global constructors and destructors, handles the differences in a.out and elf stabs, and what sections things like exceptions go in. The initial idea came from i386/osfrose.h which is a dual rose/elf format target. These two are not as diverse as a.out and elf it would seem. The cc front-end uses external configuration to determine default object format (still being thrashed out, so read the source if you want to see it so far), and has a '-aout' and '-elf' override command line switch. There are some other internal switches that can be accessed, namely -maout, -mno-aout, -munderscores and -mnounderscores. The underscore and local symbol prefixing rules are controllable seperately to the output format. (ie: it's possible to generate a.out without the _ prefixes on symbols and also to generate elf with the _ prefixes. This isn't quite optimal, but does seem to work pretty well, except the linkers don't always recognise the local symbols without their normal names) Obtained from: rev 1.5 of contrib/gcc/gcc.c by peter (w/sos,jdp sitting in) Revision Changes Path 1.3 +73 -1 src/contrib/egcs/gcc/gcc.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message