delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2009/01/30/04:15:07

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Rugxulo <rugxulo AT gmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: 1] UNIX/LINUX Compilation 2] IDE
Date: Fri, 30 Jan 2009 01:07:47 -0800 (PST)
Organization: http://groups.google.com
Lines: 65
Message-ID: <b69447f6-80cc-48b1-b527-95830dba4a4a@t11g2000yqg.googlegroups.com>
References: <0KE70056UYX26YR0 AT mta2 DOT srv DOT hcvlny DOT cv DOT net> <200901291546 DOT n0TFkH4Z006381 AT envy DOT delorie DOT com>
<66f4d58f-5bb6-4af7-bea4-793f4b2ad735 AT n21g2000vba DOT googlegroups DOT com>
<200901300004 DOT n0U04LqF002047 AT envy DOT delorie DOT com>
NNTP-Posting-Host: 65.13.115.246
Mime-Version: 1.0
X-Trace: posting.google.com 1233306467 29342 127.0.0.1 (30 Jan 2009 09:07:47 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Fri, 30 Jan 2009 09:07:47 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: t11g2000yqg.googlegroups.com; posting-host=65.13.115.246;
posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO
User-Agent: G2/1.0
X-HTTP-UserAgent: Opera/9.63 (Windows NT 6.0; U; en) Presto/2.1.1,gzip(gfe),gzip(gfe)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi,

On Jan 29, 6:04=A0pm, DJ Delorie <d DOT  DOT  DOT  AT delorie DOT com> wrote:
> > Yes, you can cross-compile to ELF, but I guess DJ means the
> > difficult part is linking, esp. shared libraries or more complex
> > stuff like that.
>
> Yes. =A0You have to build what is essentially a "sys-root" - all the
> headers, libraries, etc from the target linux system. =A0Then you build
> a cross-gcc, cross-binutils, etc. =A0*Then* you start building your own
> programs.

Ethan should try here for more GCC-specific help:

"gcc-help is a relatively high volume list for people searching for
help in building or using GCC."
http://gcc.gnu.org/ml/gcc-help/

http://gcc.gnu.org/lists.html          (subscribe here)

Rebuilding GCC and BinUtils isn't really for the faint of heart. At
least I still feel like I have a ton of questions (maybe I'll
subscribe, heh).

> > Of course, the only ELF-based tools I know of were Daniel Borca's
> > DJGPP/ELF,
>
> That's a native ELF. =A0For cross-ELF it's a lot simpler (in theory),
> just build gcc+binutils for whatever target you want; the gcc
> executables themselves remain plain DJGPP programs, they just
> *produce* non-djgpp programs.

DJGPP/ELF can compile to ELF objects or DOS ELF .EXEs, but the objects
should be compatible with Linux (I think, never tested). Of course,
that toolset actually supports either COFF or ELF.

And yes, obviously it can be done. Two weeks ago me and Rod P. were
discussing / rebuilding a MOSS DOS-ELF host (via DJGPP). This meant
rebuilding both GCC and BinUtils as well as using the native headers
and libraries from the original (very old) Linux host cross-compiler.
In fact, MOSS turns 13 tomorrow (or at least 13 years since last
updated, heh).   :-)

> > As far as Linux distros, DJ should've been more specific (or else
> > maybe you can tell us what you want?).
>
> I don't have to be specific, pretty much all Linux distros these days
> are at least mostly LSB compliant, which means they all have about the
> same degree of difficulty cross-compiling. =A0

Uh, I've seen some projects release like nine different builds for
nine different Linuxes. Others just have one for .deb and one
for .rpm. Or 2.4 and 2.6 kernel compiles. Still others don't bother
and make you compile it yourself. Equally messy, no good solution for
any. Especially since even "-static" won't save you from C++ ABI
changes (ugh).

> Of course, I'm talking
> about mainstream distros, like Fedora or Debian. =A0The custom tiny ones
> (like OpenWRT) usually come with their own development sys-root.

I wish there was a live CD *only* for developers (no Firefox, Mplayer,
XMMS, Gnumeric, AbiWord) with a billion GCCs for a billion targets. In
this way, OpenWatcom is to be admired for its cross-platform support
from almost any host.

- Raw text -


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