Gentoo Archives: gentoo-alt

From: Markus Duft <mduft@g.o>
To: gentoo-alt@l.g.o
Subject: [gentoo-alt] FW: x86-winnt
Date: Wed, 14 May 2008 07:39:55
Message-Id: 002901c8b595$061baa10$1252fe30$@org
1 Ok, somehow this hasn't got through, I think I chose the wrong mail account
2 to send it :) here we go
3
4 >
5 > Hi Folks!
6 >
7 > I just committed some things to the Prefix tree, and must admit that in
8 > the rush I just forgot ( :) ) to discuss this on the list :(. So now I
9 > just wanted to tell all of you what I have done. Please just tell me if
10 > you feel I could have done things different/better.
11 >
12 > Today I added the keyword x86-winnt in all places, and also the
13 > corresponding profiles. The purpose of this arch is, to get native
14 > windows binaries. Native in this case means, that the resulting
15 > binaries use the Microsoft windows libc (msvcrt) instead of the interix
16 > libc (libc.so). Also those binaries use a different subsystem (console
17 > or windows instead of posix), and can run completely without interix
18 > installed. The compiler used to create those binaries, does a lot of
19 > low-level magic, see [1].
20 >
21 > To keep things separated, those native windows binaries are installed
22 > in a "child-prefix". First off all a "parent-prefix" is needed, which
23 > is an interix prefix right now (may be cygwin too in the future?). from
24 > there the winnt cross compiler is installed (parity). After that I
25 > manually created some wrappers right now, but I (and haubi) thought of
26 > screwing up the existing gcc-config and binutils-config packages to get
27 > those right (FYI I attached the two wrappers). I then symlinked
28 > /opt/gentoo.system/usr/i586-pc-winnt6.0/bin/{gcc,ld} to
29 > /opt/gentoo.system/usr/bin/i586-pc-winnt6.0-{gcc,g++,ld} (yes, both gcc
30 > and g++ point to the gcc wrapper).
31 >
32 > Now the child-prefix can be set-up with bootstrap-prefix.sh like this:
33 >
34 > $ CHOST=i586-pc-winnt6.0 EPREFIX=/opt/gentoo.winnt
35 > /opt/gentoo.system/usr/portage/scripts/bootstrap-prefix.sh tree
36 > $ CHOST=i586-pc-winnt6.0 EPREFIX=/opt/gentoo.winnt
37 > /opt/gentoo.system/usr/portage/scripts/bootstrap-prefix.sh setup
38 >
39 > Now one can emerge winnt packages (only parity so far...):
40 >
41 > $ CBUILD=i586-pc-winnt6.0 EPREFIX=/opt/gentoo.winnt emerge -v parity
42 >
43 > I must admit, that I didn't use exactly the above steps for
44 > bootstrapping the tree, but instead as first step linked my existing
45 > /opt/gentoo.system/usr/portage dir to /opt/gentoo.winnt/usr/portage,
46 > this saved downloading and unpacking a snapshot (which right now won't
47 > work (without updating) anyway, since I just committed the necessary
48 > changes :))
49 >
50 > Phew, that's it for now :) Any questions/comments?
51 >
52 > [1] http://www.sf.net/projects/parity
53 >
54 > Cheers, Markus
55
56 --
57 gentoo-alt@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-alt] FW: x86-winnt Fabian Groffen <grobian@g.o>
RE: [gentoo-alt] FW: x86-winnt Markus Duft <mduft@g.o>