Return to BSD News archive
Received: by minnie.vk1xwt.ampr.org with NNTP id AA2240 ; Mon, 01 Mar 93 10:50:39 EST Path: sserve!manuel.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!europa.eng.gtefsd.com!emory!ogicse!flop.ENGR.ORST.EDU!gaia.ucs.orst.edu!umn.edu!csus.edu!netcom.com!thinman From: thinman@netcom.com (Technically Sweet) Newsgroups: comp.unix.bsd Subject: [386BSD]: Cross-compilation to DOS works! Message-ID: <1993Feb25.210845.19786@netcom.com> Date: 25 Feb 93 21:08:45 GMT Article-I.D.: netcom.1993Feb25.210845.19786 Organization: International Foundation for Internal Freedom Lines: 31 You can cross-compile DJGPP programs from 386BSD quite easily. The sequence is: 1) compile .c to .o using the DJGPP include files 2) link .o files together with DJGPP crt0.o and DJGPP libc.a etc. into 'program'. Do not use the stock 'ld', use the DJGPP 'ld'. I rebuilt it from binutils.zip in the DJGPP 1.09 release. 3) Start the program under DOS either with go32.exe or by doing 'cat stub.exe program > program.exe' and running that file under DOS. Problem 1: I didn't include name demangling; I'd rather eat beetles than use C++. Problem 2: 'file' doesn't recognize 'program'. I presume this needs a hack to /etc/magic. Problem 3: more testing needed. I just tested a hello.c. Problem 4: integration with GNU cross-compilation schema. Organized source. I'll be after #3 in awhile. Anyone who wants my ld.c & binary thereof is welcome to it. -- Lance Norskog thinman@netcom.com Data is not information is not knowledge is not wisdom.