[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cross-Compiling OpenBSD
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: Re: Cross-Compiling OpenBSD
- From: Maslan <maslanbsd_(_at_)_gmail_(_dot_)_com>
- Date: Mon, 11 Jul 2005 17:07:14 +0300
- Reply-to: Maslan <maslanbsd_(_at_)_gmail_(_dot_)_com>
On 7/11/05, Maslan <maslanbsd_(_at_)_gmail_(_dot_)_com> wrote:
> Really thanks for your help, but what you said is the theoritical part
> that can be applied to any os which will be cross-compiled, any thing
> special for OpenBSD?
> On 11 Jul 2005 14:04:03 +0200, Artur Grabowski <art_(_at_)_blahonga_(_dot_)_org> wrote:
> > Maslan <maslanbsd_(_at_)_gmail_(_dot_)_com> writes:
> > > Thanks
> > > but i hope somebody else may help.
> > 1. install snapshot.
> > 2. compile.
> > That's the easy way to do it.
> > The hard way to do it is useless to teach. There is a very minimal
> > amount of people on earth who actually _need_ to be able to
> > cross-compile. Maybe my imagination is limited, but I can't actually
> > imagine someone who needs the ability to cross-compile without at the
> > same time having enough knowlege of the system to already know how to
> > cross-compile.
> > In other words, if you really need it, you already know how to do it.
> > If you don't know how to do it, you're not one of the people who
> > actually need it. At least not yet. By the time you're ready for
> > cross compilation, you'll know how to do it.
> > Besides. Cross-compiling OpenBSD is something you only do once for
> > every new architecture you compile. After it's been done once, there
> > is absolutely no need to do it again. It's even considered harmful to
> > do more than once. Therefore, the tools used for this are rusty, not
> > up to date and most likely broken in intricate and hard to debug
> > ways. And noone bothers to premanently maintain them. Especially since
> > cross compilation is done like this:
> > o Get a kernel that pretends to boot using a hand-crafted gcc and
> > binutils because you didn't want to waste time trying to get them
> > in real shape.
> > o Get something that resembles libc with the same gcc and binutils.
> > o Get something that resembles sh and init.
> > o Fight with the kernel for a few days
> > o Fight with gcc and binutils to actually make it through cross.
> > o Notice how badly broken the kernel is now. fiddle.
> > o Get a working kernel, fix the compilation errors that popped up in
> > libc now.
> > o Yay. Single user with init and sh.
> > o Build native binutils, gcc and make.
> > o start make build, install some parts, swear, install some libs,
> > swear again. Find some obscure bug in awk. Spend a few days
> > redesigning floating point emulation in the kernel to fix the bug
> > in awk. Give up. Install gawk. Notice how gawk has the same bug as
> > the classic awk (ehmm). (happened twice)
> > o Finally fix the bug in awk during some dark night and don't remember
> > how you fixed it when you wake up.
> > o Start doing partial builds again.
> > o Nag Todd to get you a working perl.
> > o Since you still only have shared libraries, find some obscure bugs
> > in some ./configured piece of crap that only pop up with static
> > linking.
> > o Bang your head against the wall a few times without being able to
> > fix those bugs.
> > o Give up and write the missing pieces of ld.so instead of trying
> > to get binutils to cooperate. (happened twice)
> > o Iterate a few more times until make build pretends to finish.
> > o Notice the hundereds of Ms in your source tree. Start removing
> > them.
> > o Build something that resembles a snapshot.
> > o Let someone else fix the rest of the bugs.
> > This is not something that you can be taught. You have to experience
> > it yourself. If you don't know how to do it or teach yourself, you're
> > not ready for such an excercise. This is the Mount Everest of
> > operating system hacking. Installing escalators is just wrong.
> > If it's not evident, I've done it a few times. I doubt you can get
> > better advice regarding cross compiling OpenBSD than this.
> > //art
> > > On 7/10/05, Tobias Weingartner <weingart_(_at_)_tepid_(_dot_)_org> wrote:
> > > > On Sunday, July 10, Maslan wrote:
> > > > >
> > > > > Ok, i will give it a try,
> > > > > the fisrt problem will be the config
> > > > > do i have to port openbsd config first to freebsd ?
> > > >
> > > > I don't think you understand. I've give you my advice. I'm not
> > > > inclined to help you further in this endeavor. If you wish to
> > > > learn this path, you will be traveling alone.
> > > >
> > > > --Toby.
> > > >
> > >
> > >
> > > --
> > > I'm Searching For Perfection,
> > > So Even If U Need Portability U've To Use Assembly ;-)
> > > http://www.maslanlab.org
> I'm Searching For Perfection,
> So Even If U Need Portability U've To Use Assembly ;-)
I'm Searching For Perfection,
So Even If U Need Portability U've To Use Assembly ;-)
Visit your host, monkey.org