delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/04/21/14:46:35

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: stephen DOT webb AT bregmasoft DOT com (Stephen M. Webb)
Newsgroups: comp.os.msdos.djgpp,alt.os.development
Subject: Re: Port/Recompile GCC (using DJGPP)
Date: 21 Apr 2004 11:31:47 -0700
Organization: http://groups.google.com
Lines: 38
Message-ID: <34e1ce0c.0404211031.4959961a@posting.google.com>
References: <3a014972 DOT 0404210042 DOT 6c42fc AT posting DOT google DOT com>
NNTP-Posting-Host: 209.87.242.247
X-Trace: posting.google.com 1082572307 24107 127.0.0.1 (21 Apr 2004 18:31:47 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Wed, 21 Apr 2004 18:31:47 +0000 (UTC)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

fdjhngslgsgh AT hotmail DOT com (os_dev) wrote in message news:<3a014972 DOT 0404210042 DOT 6c42fc AT posting DOT google DOT com>...
> Hey,
> 
> I have a question about recompiling GCC, hope somebody can help me
> with this.
> I was trying to port GCC to another OS (some hobby OS so I can't use
> any pre-existing configure options).
> I already have a LibC + include files which should contain all the
> functions needed to compile GCC/Binutils (standard i/o, process,
> etc.). But my problem is that I don't really know where to start. I
> decided to try to recompile everything under Win/DOS using DJGPP since
> I use this platform to compile most of my programs.

It sounds like what you want is a DOS-hosted GCC cross compiler
targeted at your hobby OS.  That means you would build the toolchain
on DOS using an existing DJGPP toolchain (toolchain == compiler +
linker + ancillary tools like ar, objdump, as, etc).  The built
toolchain would run under DOS, but produce files that link reference
symbols from your libc and execute under your hobby OS.  Am I right?

The first place to start is <http://www.objsw.com/CrossGCC/>, which
has links to all kinds of wonderful information on building GCC
cross-targetted toolchains.  You will probably end up having to create
some config files for GCC that target your OS/libs, which you would
want to keep as a set of diffs so you can reapply the config patches
to newer versions of GCC.  Download the excellent manual
<ftp://ftp.axis.se/pub/users/hp/pgccfd/pgccfd.pdf>, which is really
the definitive guide to what you want to do.

On the other hand, you can build (or maybe even download) a generic
toolchain.  See <http://sourceforge.net/docman/display_doc.php?docid=21418&group_id=102011>
for an example of how to build a genberic corss-targetted toolchain.

Good luck.

--
Stephen M. Webb
stephen DOT webb AT bregmasoft DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019