1 |
On 14-05-2008 09:35:03 +0200, Markus Duft wrote: |
2 |
> > Today I added the keyword x86-winnt in all places, and also the |
3 |
> > corresponding profiles. The purpose of this arch is, to get native |
4 |
> > windows binaries. Native in this case means, that the resulting |
5 |
> > binaries use the Microsoft windows libc (msvcrt) instead of the interix |
6 |
> > libc (libc.so). Also those binaries use a different subsystem (console |
7 |
> > or windows instead of posix), and can run completely without interix |
8 |
> > installed. The compiler used to create those binaries, does a lot of |
9 |
> > low-level magic, see [1]. |
10 |
|
11 |
Cool! |
12 |
|
13 |
> > To keep things separated, those native windows binaries are installed |
14 |
> > in a "child-prefix". First off all a "parent-prefix" is needed, which |
15 |
> > is an interix prefix right now (may be cygwin too in the future?). from |
16 |
> > there the winnt cross compiler is installed (parity). After that I |
17 |
> > manually created some wrappers right now, but I (and haubi) thought of |
18 |
> > screwing up the existing gcc-config and binutils-config packages to get |
19 |
> > those right (FYI I attached the two wrappers). I then symlinked |
20 |
> > /opt/gentoo.system/usr/i586-pc-winnt6.0/bin/{gcc,ld} to |
21 |
> > /opt/gentoo.system/usr/bin/i586-pc-winnt6.0-{gcc,g++,ld} (yes, both gcc |
22 |
> > and g++ point to the gcc wrapper). |
23 |
|
24 |
I don't think I understand this completely. Are you doing "normal" |
25 |
cross-compilation, and/or do you use Portage's ability to use a |
26 |
different "target" EPREFIX than the configured one? (e.g. env |
27 |
EPREFIX="/my/some-arch/prefix" CHOST="some-arch-blaX" emerge mypackage) |
28 |
|
29 |
> > Now the child-prefix can be set-up with bootstrap-prefix.sh like this: |
30 |
> > |
31 |
> > $ CHOST=i586-pc-winnt6.0 EPREFIX=/opt/gentoo.winnt |
32 |
> > /opt/gentoo.system/usr/portage/scripts/bootstrap-prefix.sh tree |
33 |
> > $ CHOST=i586-pc-winnt6.0 EPREFIX=/opt/gentoo.winnt |
34 |
> > /opt/gentoo.system/usr/portage/scripts/bootstrap-prefix.sh setup |
35 |
> > |
36 |
> > Now one can emerge winnt packages (only parity so far...): |
37 |
|
38 |
So what is it? Is the i?86-pc-winntX a full install (having @system |
39 |
emerged somehow) or is it only the result of cross-compiled stuff? |
40 |
|
41 |
> > $ CBUILD=i586-pc-winnt6.0 EPREFIX=/opt/gentoo.winnt emerge -v parity |
42 |
|
43 |
Hmm... CBUILD? Isn't the building machine the interix thing? Correct |
44 |
me if I'm wrong. I know haubi did some work on cross-compilation with |
45 |
Prefix recently, but I haven't managed to catch up with him on that... |
46 |
|
47 |
> > I must admit, that I didn't use exactly the above steps for |
48 |
> > bootstrapping the tree, but instead as first step linked my existing |
49 |
> > /opt/gentoo.system/usr/portage dir to /opt/gentoo.winnt/usr/portage, |
50 |
> > this saved downloading and unpacking a snapshot (which right now won't |
51 |
> > work (without updating) anyway, since I just committed the necessary |
52 |
> > changes :)) |
53 |
> > |
54 |
> > Phew, that's it for now :) Any questions/comments? |
55 |
|
56 |
Can we "bootstrap" a winnt system, or do you always keep on needing the |
57 |
"host" (interix or cygwin in this case). Is it possible to make say |
58 |
like an installer that just installs a stage4 Prefix such that you can |
59 |
start, say bash, from cmd.exe? |
60 |
|
61 |
|
62 |
-- |
63 |
Fabian Groffen |
64 |
Gentoo on a different level |
65 |
-- |
66 |
gentoo-alt@l.g.o mailing list |