Path: utzoo!attcan!uunet!mcsun!ukc!slxsys!ibmpcug!robobar!steve From: steve@robobar.co.uk (Steve Bleazard) Newsgroups: comp.unix.i386 Subject: Re: Clean Compile! (ESIX - gcc) Keywords: ESIX, gcc Message-ID: <1990Jun7.174900.4047@robobar.co.uk> Date: 7 Jun 90 17:49:00 GMT References: <5637@aplcen.apl.jhu.edu> Distribution: comp.unix.i386 Organization: Robobar Ltd., Perivale, Middx., ENGLAND. Lines: 33 In article <5637@aplcen.apl.jhu.edu> trw@aplcen.apl.jhu.edu (Weil timothy) writes: >After several days of going nowhere with compile command >lines such as > * gcc -ansi -B -c -o file.o file.c >OR, * gcc -ansi -B -o file file.c >OR, * gcc -ansi -B file.c > >I mostly ran into the following error message - > "ld: malformed input file (not rel or archive) file.o > >SO, like most good experimenters I stumbled onto a Makefile >which resulted in - > * gcc -O -c file.c > * cc file.o -o file > >and THIS ONE WORKED! (and I've got no idea why). > From your earlier postings I got the impression that you were using a binary only distribution of gcc (ie you didn't compile gcc yourself) is this the case? If it is then there's a very good chance you are running my Xenix port of GCC / GAS, in which case the .o files are in OMF format. I must admit to being puzzled by the fact cc manages to link the file - does it invoke a more intelligent linker ie one that understands OMF? it is possible that your standard ld (the one invoked by gcc) does not. If this is the case, ln(C)-ing the more intelligent ld to /usr/local/lib/gcc-ld will allow gcc to link as well. Steve. -- Steve.Bleazard@RoboBar.Co.Uk | Phone: +44 81 991 1142 x153 Snr Software Engineer, Robobar Ltd. | Fax: +44 81 998 8343 (G3) 22 Wadsworth Road, Perivale. | Middx., UB6 7JD ENGLAND. | ...!ukc!robobar!steve