summaryrefslogtreecommitdiff
path: root/hurd/building
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/building')
-rw-r--r--hurd/building/cross-compiling.mdwn167
-rw-r--r--hurd/building/cross-compiling/Makefile168
2 files changed, 56 insertions, 279 deletions
diff --git a/hurd/building/cross-compiling.mdwn b/hurd/building/cross-compiling.mdwn
index c5dddfb6..d5beade9 100644
--- a/hurd/building/cross-compiling.mdwn
+++ b/hurd/building/cross-compiling.mdwn
@@ -21,10 +21,14 @@ Find it in the [[source repositories/incubator]], *cross-gnu* branch.
Read through it. Understand it. Only then use it by following the next steps.
-/!\ 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 source
-packages. See the following list about needed patches, which have not yet been
-installed in the upstream repositories.
+
+## Status
+
+/!\ Please note that these cross toolchains does not yet encompass all of the
+functionality that native toolchains provide. For example, there is only
+support for C and C++ so far, but not for other languages. A bunch of fixes /
+enhancements of [[glibc]] are missing. We're working towards minimizing these
+differences, as well as towards pushing all patches upstream.
### Supported Versions of Source Packages
@@ -34,138 +38,95 @@ guarantee is given. Always the preferred version is listed first.
* `src/binutils`: [[GNU_Binutils|binutils]]
- * CVS `binutils-2_19-branch`
-
- $ mkdir binutils-2_19-branch
- $ cd binutils-2_19-branch
- $ cvs -d:pserver:anoncvs@sources.redhat.com:/cvs/src ↩
- co -r binutils-2_19-branch binutils
-
- The sources are rooted in `binutils-2_19-branch/src/`. Also use these
- commands for updating, instead of the usual `cvs update`.
-
- * The 2.19 release tarball from <ftp://ftp.gnu.org/gnu/binutils/> should
- also be fine.
-
- * CVS `binutils-2_18-branch`
+ * CVS `binutils-2_20-branch`
- $ mkdir binutils-2_18-branch
- $ cd binutils-2_18-branch
+ $ mkdir binutils-2_20-branch
+ $ cd binutils-2_20-branch/
$ cvs -d:pserver:anoncvs@sources.redhat.com:/cvs/src ↩
- co -r binutils-2_18-branch binutils
+ co -r binutils-2_20-branch binutils
- The sources are rooted in `binutils-2_18-branch/src/`. Also use these
+ The sources are rooted in `binutils-2_20-branch/src/`. Also use the above
commands for updating, instead of the usual `cvs update`.
- * The 2.18 release tarball from <ftp://ftp.gnu.org/gnu/binutils/> should
- also be fine, as should be all other recent releases.
+ * Release of the 2.20 series from <ftp://ftp.gnu.org/gnu/binutils/>
+ should also be fine.
* `src/gcc`: [[GNU_Compiler_Collection|gcc]]
- * SVN `gcc-4_1-branch`
+ * SVN `gcc-4_5-branch`
- $ svn co svn://gcc.gnu.org/svn/gcc/branches/gcc-4_1-branch
-
- Prepare:
+ $ svn co svn://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch
- $ ( cd gcc-4_1-branch/ && contrib/gcc_update --touch )
+ Patches:
- * Releases of the 4.1 series from <ftp://ftp.gnu.org/gnu/gcc/> should
- also be fine.
-
- * SVN `gcc-4_2-branch`
-
- $ svn co svn://gcc.gnu.org/svn/gcc/branches/gcc-4_2-branch
-
- * Patches:
- <http://lists.gnu.org/archive/html/bug-hurd/2007-11/msg00034.html>
+ * <http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00602.html>
Prepare:
- $ ( cd gcc-4_2-branch/ && contrib/gcc_update --touch )
+ $ ( cd gcc-4_5-branch/ && contrib/gcc_update --touch )
- * Releases of the 4.2 series from <ftp://ftp.gnu.org/gnu/gcc/> should
- also be fine, but need the same set of patches as the `gcc-4_2-branch`
- needs.
+ * SVN `gcc-4_4-branch`
- * SVN `gcc-4_3-branch`
+ $ svn co svn://gcc.gnu.org/svn/gcc/branches/gcc-4_4-branch
- $ svn co svn://gcc.gnu.org/svn/gcc/branches/gcc-4_3-branch
+ Patches:
- * Patches:
- <http://lists.gnu.org/archive/html/bug-hurd/2007-11/msg00034.html>
+ * <http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00602.html>
Prepare:
- $ ( cd gcc-4_3-branch/ && contrib/gcc_update --touch )
-
- * Releases of the 4.3 series from <ftp://ftp.gnu.org/gnu/gcc/> should
- also be fine, but need the same set of patches as the `gcc-4_3-branch`
- needs.
-
- * SVN `trunk` -- upcoming 4.4 series
+ $ ( cd gcc-4_4-branch/ && contrib/gcc_update --touch )
- $ svn co svn://gcc.gnu.org/svn/gcc/trunk
-
- Prepare:
-
- $ ( cd trunk/ && contrib/gcc_update --touch )
+ * Releases of the 4.5 and 4.4 series from <ftp://ftp.gnu.org/gnu/gcc/>
+ should also be fine, but need the same set of patches as the
+ `gcc-4_5-branch` needs.
* `src/gnumach`: [[GNU_Mach|microkernel/mach/gnumach]]
- * CVS `gnumach-1-branch`
+ * Git `master` branch
- $ cvs -d:pserver:anoncvs@cvs.gnu.org:/cvsroot/hurd ↩
- co -r gnumach-1-branch gnumach
- $ mv gnumach gnumach-1-branch
+ $ git clone ↩
+ git://git.sv.gnu.org/hurd/gnumach.git gnumach
Prepare:
- $ ( cd gnumach-1-branch/ && autoreconf -vfi )
+ $ ( cd gnumach/ && autoreconf -vi )
* `src/mig`: [[microkernel/mach/mig/GNU_MIG]]
- * CVS `HEAD`
+ * Git `master` branch
- $ cvs -d:pserver:anoncvs@cvs.gnu.org:/cvsroot/hurd co mig
+ $ git clone ↩
+ git://git.sv.gnu.org/hurd/mig.git mig
Prepare:
- $ ( cd mig/ && autoreconf -vfi )
+ $ ( cd mig/ && autoreconf -vi )
* `src/hurd`: [[GNU_Hurd|hurd]]
- * CVS `HEAD`
+ * Git `master` branch
- $ cvs -d:pserver:anoncvs@cvs.gnu.org:/cvsroot/hurd co hurd
+ $ git clone ↩
+ git://git.sv.gnu.org/hurd/hurd.git hurd
- * `src/glibc`: [[GNU_C_Library|glibc]]
-
- * CVS `glibc-2_7-branch`
+ * `src/libpthread`: [[libpthread]]
- $ cvs -d:pserver:anoncvs@sources.redhat.com:/cvs/glibc ↩
- co -r glibc-2_7-branch glibc
- $ mv libc glibc-2_7-branch
+ * Git `tschwinge/Peter_Herbolzheimer` branch
- * Patches:
- <http://lists.gnu.org/archive/html/bug-hurd/2007-11/msg00030.html>
+ $ git clone --no-checkout ↩
+ git://git.sv.gnu.org/hurd/libpthread.git libpthread
+ $ cd libpthread/
+ $ git checkout origin/tschwinge/Peter_Herbolzheimer
- * 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
+ * `src/glibc`: [[GNU_C_Library|glibc]]
- * TODO.
- <http://lists.gnu.org/archive/html/bug-hurd/2007-11/msg00026.html>
+ * Git `tschwinge/Roger_Whittaker` branch
--->
+ $ git clone --no-checkout ↩
+ git://git.sv.gnu.org/hurd/glibc.git glibc
+ $ cd glibc/
+ $ git checkout origin/tschwinge/Roger_Whittaker
<!--
@@ -206,7 +167,7 @@ the following.
The system you're running the script on (the *build* system) needs to have a
basic compiling environment installed, i.e., a C compiler with the basic
libraries and `make`. You might also need `flex` and `bison`. For building
-recent version of GCC (e.g., the upcoming 4.3, which is not yet supported)
+recent version of GCC (4.3 onwards)
you'll need to have development packages of GMP and MPFR installed.
@@ -235,29 +196,13 @@ flow by. In the end you should see a message: *[...]/cross-gnu: Everything
should be in place now.*
-### Makefile
-
-A [[Makefile]] has been written to automate the above steps. You will require
-an Internet connection and atleast 1.5 GiB of hard-disk space. Just run...
-
- make
-
-... to build the toolchain. To clean up, use...
-
- make clean
-
-
### Staying Up-To-Date
You can re-run `cross-gnu` to rebuild the parts of the sources that have
changed since the last run. This will save a lot of time compared to starting
from scratch again. Also, it is especially useful if you aren't working with
-unpacked tarballs, but on CVS's branches or want to quickly get a new tool
-chain with patches you applied to the source trees. However: do *not* use this
+unpacked tarballs, but on CVS's / SVN's / Git's branches or want to quickly get
+a new toolchain
+with patches you applied to the source trees. However: do *not* use this
technique when doing major changes to the source trees, like switching from GCC
-4.0 to GCC 4.1.
-
-
-# References
-
-* <http://lists.gnu.org/archive/html/bug-hurd/2004-09/msg00030.html>
+4.4 to GCC 4.5.
diff --git a/hurd/building/cross-compiling/Makefile b/hurd/building/cross-compiling/Makefile
deleted file mode 100644
index 7a6a9524..00000000
--- a/hurd/building/cross-compiling/Makefile
+++ /dev/null
@@ -1,168 +0,0 @@
-# "HurdToolchainMakefile" - a Makefile for setting up Hurd toolchain builds
-
-# Copyright (C) 2007 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2, or (at your option) any later
-# version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# Written by Shakthi Kannan <shakthi.kannan@qvantel.com>.
-
-
-## Variables
-TOPDIR=.
-DOWNLOADS=${TOPDIR}/downloads
-ROOT=${TOPDIR}/root
-SRC=${ROOT}/src
-GLIBC_DIR=${SRC}/glibc
-PATCH0_DIR=patch0
-PATCH1_DIR=patch1
-
-## Patches
-PATCH1 = 0003-2007-09-13-H.J.-Lu-hongjiu.lu-intel.com.patch \
- 0005-Hurd-specific-kernel-features.h.patch \
- 0007-2007-10-05-version-of-stat.patch.patch \
- 0008-r2425-of-debian-patches-hurd-i386-local-atomic-no-mu.patch \
- 0010-r2425-of-debian-patches-hurd-i386-local-gscope.diff.patch \
- 0012-r2425-of-debian-patches-hurd-i386-local-no-strerror_.patch \
- 0013-r2626-of-debian-patches-hurd-i386-local-tls-support.patch \
- 0014-r2591-of-debian-patches-hurd-i386-local-tls.diff.patch \
- 0015-r2630-of-debian-patches-hurd-i386-submitted-libc_onc.patch \
- 0016-Include-stdint.h.patch \
- 0017-r2598-of-debian-patches-any-local-stdio-lock.diff.patch \
- 0018-r2650-of-debian-patches-hurd-i386-submitted-strtoul.patch \
- 0019-2007-11-12-Aurelien-Jarno-aurelien-aurel32.net-Tho.patch \
- 0020-r2656-of-debian-patches-any-submitted-sched_h.diff.patch \
- 0022-2007-11-18-Roland-McGrath-roland-frob.com.patch
-
-PATCH0 = 0009-2007-07-22-version-of-init-first.c_vs._GCC_4.1.patch.patch \
- 0011-2007-02-08-version-of-resolv_res_send.c.patch.patch
-
-all: create_dir get_sources apply_glibc_patches build_all
-
-## Create directories
-create_dir:
- cd ${TOPDIR}
- mkdir ${DOWNLOADS}
- mkdir -p ${SRC}
-
-get_sources: get_cross_gnu get_binutils get_gcc get_gnumach get_mig get_hurd get_glibc
-
-get_cross_gnu:
- @ echo " ___ _ __ ___ ___ ___ __ _ _ __ _ _ "
- @ echo " / __| '__/ _ \/ __/ __|_____ / _\` | '_ \| | | |"
- @ echo "| (__| | | (_) \__ \__ \_____| (_| | | | | |_| |"
- @ echo " \___|_| \___/|___/___/ \__, |_| |_|\__,_|"
- @ echo " |___/ "
- cd ${DOWNLOADS}; \
- wget http://nic-nac-project.de/~schwinge/tmp/cross-gnu
- @ echo " ___ _ __ ___ ___ ___ __ _ _ __ _ _ ___ _ ____ __"
- @ echo " / __| '__/ _ \/ __/ __|_____ / _\` | '_ \| | | |_____ / _ \ '_ \ \ / /"
- @ echo "| (__| | | (_) \__ \__ \_____| (_| | | | | |_| |_____| __/ | | \ V / "
- @ echo " \___|_| \___/|___/___/ \__, |_| |_|\__,_| \___|_| |_|\_/ "
- @ echo " |___/ "
- cd ${DOWNLOADS}; \
- wget http://nic-nac-project.de/~schwinge/tmp/cross-gnu-env; \
- chmod +x cross-gnu; \
- chmod +x cross-gnu-env
-
-get_binutils:
- @ echo " _ _ _ _ _ "
- @ echo "| |__ (_)_ __ _ _| |_(_) |___ "
- @ echo "| '_ \| | '_ \| | | | __| | / __|"
- @ echo "| |_) | | | | | |_| | |_| | \__ \\"
- @ echo "|_.__/|_|_| |_|\__,_|\__|_|_|___/"
- cd ${SRC}; \
- cvs -d:pserver:anoncvs@sources.redhat.com:/cvs/src co -r binutils-2_18-branch binutils; \
- mv src binutils
-
-get_gcc:
- @ echo " __ _ ___ ___ "
- @ echo " / _\` |/ __/ __|"
- @ echo "| (_| | (_| (__ "
- @ echo " \__, |\___\___|"
- @ echo " |___/ "
- cd ${SRC}; \
- svn co svn://gcc.gnu.org/svn/gcc/branches/gcc-4_1-branch; \
- mv gcc-4_1-branch gcc; \
- ( cd gcc/ && contrib/gcc_update --touch )
-
-get_gnumach:
- @ echo " _ "
- @ echo " __ _ _ __ _ _ _ __ ___ __ _ ___| |__ "
- @ echo " / _\` | '_ \| | | | '_ \` _ \ / _\` |/ __| '_ \ "
- @ echo "| (_| | | | | |_| | | | | | | (_| | (__| | | |"
- @ echo " \__, |_| |_|\__,_|_| |_| |_|\__,_|\___|_| |_|"
- @ echo " |___/ "
- cd ${SRC}; \
- cvs -d:pserver:anoncvs@cvs.gnu.org:/cvsroot/hurd co -r gnumach-1-branch gnumach; \
- ( cd gnumach/ && autoreconf -vfi )
-
-get_mig:
- @ echo " _ "
- @ echo " _ __ ___ (_) __ _ "
- @ echo "| '_ \` _ \| |/ _\` |"
- @ echo "| | | | | | | (_| |"
- @ echo "|_| |_| |_|_|\__, |"
- @ echo " |___/ "
- cd ${SRC}; \
- cvs -d:pserver:anoncvs@cvs.gnu.org:/cvsroot/hurd co mig; \
- ( cd mig/ && autoreconf -vfi )
-
-get_hurd:
- @ echo " _ _ "
- @ echo "| |__ _ _ _ __ __| |"
- @ echo "| '_ \| | | | '__/ _\` |"
- @ echo "| | | | |_| | | | (_| |"
- @ echo "|_| |_|\__,_|_| \__,_|"
- cd ${SRC}; \
- cvs -d:pserver:anoncvs@cvs.gnu.org:/cvsroot/hurd co hurd
-
-get_glibc:
- @ echo " _ _ _ "
- @ echo " __ _| (_) |__ ___ "
- @ echo " / _\` | | | '_ \ / __|"
- @ echo "| (_| | | | |_) | (__ "
- @ echo " \__, |_|_|_.__/ \___|"
- @ echo " |___/ "
- cd ${SRC}; \
- cvs -d:pserver:anoncvs@sources.redhat.com:/cvs/glibc co -r glibc-2_7-branch glibc; \
- mv libc glibc
- mkdir ${GLIBC_DIR}/${PATCH0_DIR}
- mkdir ${GLIBC_DIR}/${PATCH1_DIR}
-
-get_patch0: $(PATCH0)
-
-get_patch1: $(PATCH1)
-
-$(PATCH1):
- wget -r -np -nd -P ${GLIBC_DIR}/${PATCH1_DIR} http://www.schwinge.homeip.net/~thomas/tmp/glibc-patches/$@
- cd ${GLIBC_DIR}; \
- patch -p1 < ${PATCH1_DIR}/$@
-
-$(PATCH0):
- wget -r -np -nd -P ${GLIBC_DIR}/${PATCH0_DIR} http://www.schwinge.homeip.net/~thomas/tmp/glibc-patches/$@
- cd ${GLIBC_DIR}; \
- patch -p0 < ${PATCH0_DIR}/$@
-
-apply_glibc_patches: get_patch0 get_patch1
-
-build_all:
- ROOT=${TOPDIR}/root ; \
- export PATH="$(PATH):$(DOWNLOADS)" ; \
- echo $$PATH ; \
- . ${DOWNLOADS}/cross-gnu-env ; \
- ${DOWNLOADS}/cross-gnu
-
-clean:
- rm -rf downloads root *~