summaryrefslogtreecommitdiff
path: root/hurd/building/cross-compiling.mdwn
blob: 8c8d0625b0934e02e69e87545862814de0bc8ac8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
[[meta copyright="Copyright © 2007 Free Software Foundation, Inc."]]
[[meta license="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license
is included in the section entitled
[[GNU_Free_Documentation_License|/fdl]]."]]

# `cross-gnu`

[[Thomas_Schwinge|tschwinge]] has written a shell script for building a
complete cross-build environment for GNU/Hurd systems.

For now, find the shell scripts at
<http://nic-nac-project.de/~schwinge/tmp/cross-gnu> and
<http://nic-nac-project.de/~schwinge/tmp/cross-gnu-env>.


## Using

Read through it.  Understand it.  Then use it.

/!\ Be made aware that -- while it is of course possible to build a working
cross-compiler -- this is not trivial to do.  You'll have to patch several of
the source packages.  See the corresponding Debian unstable source packages
about which Hurd-specific patches exist and check which of them are not yet in
the upstream source packages.  Not all of the patches from the Debian packages
are needed for getting a functional tool chain, though.  Applying patches is
definitely needed for the glibc, Hurd and GCC source packages, as there are a
bunch of outstanding patches that are needed for getting a functional build.


### Supported Versions of Source Packages

The following ones are known to work.  Others may work as well, but no
guarantee is given.  Always the preferred version is listed first.

* `src/binutils`: [GNU Binutils](http://www.gnu.org/software/binutils/)

    * CVS `binutils-2_18-branch`

            $ cvs -d:pserver:anoncvs@sources.redhat.com:/cvs/src \
                co -r binutils-2_18-branch binutils
            $ mv src binutils-2_18-branch

    * The 2.18 release tarball from <ftp://ftp.gnu.org/gnu/binutils/> should
        also be fine, as should be all other recent releases.

* `src/gcc`: [GNU Compiler Collection](http://gcc.gnu.org/)

    * SVN `gcc-4_1-branch`

            $ svn co svn://gcc.gnu.org/svn/gcc/branches/gcc-4_1-branch

    * Recent releases of the 4.1 series from <ftp://ftp.gnu.org/gnu/gcc/>
        should also be fine.

    Support for the 4.2 series (`gcc-4_2-branch`) and the upcoming 4.3 series
    (`trunk`) is being worked on.

<!--

    * SVN `gcc-4_2-branch` plus patches.

            $ svn co svn://gcc.gnu.org/svn/gcc/branches/gcc-4_2-branch

        TODO.  patches: libiberty (?!), config.

    For building recent version of GCC (e.g., the upcoming 4.3) you'll need to
    have development packages of GMP and MPFR (for the *build* system)
    installed.

-->

* `src/gnumach`: [GNU Mach](http://hurd.gnu.org/)

    * CVS `gnumach-1-branch`

            $ cvs -d:pserver:anoncvs@cvs.gnu.org:/cvsroot/hurd \
                co -r gnumach-1-branch gnumach
            $ mv gnumach gnumach-1-branch

* `src/mig`: [GNU Mach Interface Generator](http://hurd.gnu.org/)

    * CVS `HEAD`

            $ cvs -d:pserver:anoncvs@cvs.gnu.org:/cvsroot/hurd co mig

* `src/hurd`: [GNU Hurd](http://hurd.gnu.org/)

    * CVS `HEAD`

            $ cvs -d:pserver:anoncvs@cvs.gnu.org:/cvsroot/hurd co hurd

* `src/glibc`: [GNU C Library](http://www.gnu.org/software/libc/)

    * CVS `glibc-2_7-branch`

            $ cvs -d:pserver:anoncvs@sources.redhat.com:/cvs/glibc \
                co -r glibc-2_7-branch glibc
            $ mv libc glibc-2_7-branch

        * TODO.  Patches.

    * Recent releases of the 2.7 series from <ftp://ftp.gnu.org/gnu/glibc/>
        should also be fine, but need the same set of patches as the
        `glibc-2_7-branch` needs.

<!--

    * CVS `HEAD`

            $ cvs -d:pserver:anoncvs@sources.redhat.com:/cvs/glibc \
                co glibc
            $ mv libc glibc-HEAD

        * TODO.
            <http://lists.gnu.org/archive/html/bug-hurd/2007-11/msg00026.html>

-->

<!--

* `src/gdb`: [GNU Debugger](http://www.gnu.org/software/gdb/)

    This is optional and will only be compiled if present.

    * CVS `gdb_6_6-branch`

            $ cvs -d:pserver:anoncvs@sources.redhat.com:/cvs/src \
                co -r gdb_6_6-branch gdb
            $ mv src gdb_6_6-branch

        Also needs some patch because of MIG changes, if I remember correctly.

    * Recent tarballs from <ftp://ftp.gnu.org/gnu/gdb/> should also work.

-->


# References

* <http://lists.gnu.org/archive/html/bug-hurd/2004-09/msg00030.html>