public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Remy Bohmer <linux@bohmer.net>
To: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: "Bart vdr. Meulen" <bartvdrmeulen@gmail.com>, crossgcc@sourceware.org
Subject: [CT-NG:patch 15/19] First setup for cygwin as target
Date: Fri, 09 Apr 2010 19:34:00 -0000	[thread overview]
Message-ID: <4bbf811d.1067f10a.253c.61f2@mx.google.com> (raw)
In-Reply-To: <20100409190419.325379428@bohmer.net>

[-- Attachment #1: add-cygwin-as-target.patch --]
[-- Type: text/plain, Size: 3610 bytes --]

This is the first attempt to add cygwin as target

Note the cygwin 'kernel' files are downloaded 
pre-compiled

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
---
 config/kernel.in               |    4 +++
 config/kernel/cygwin.in        |   33 ++++++++++++++++++++++++++++
 config/libc/newlib.in          |    2 -
 scripts/build/kernel/cygwin.sh |   47 +++++++++++++++++++++++++++++++++++++++++
 4 files changed, 85 insertions(+), 1 deletion(-)

Index: crosstool-ng/config/kernel/cygwin.in
===================================================================
--- /dev/null
+++ crosstool-ng/config/kernel/cygwin.in
@@ -0,0 +1,33 @@
+# Bare metal config options
+
+config KERNEL_cygwin
+    select CYGWIN
+    help
+      Build a toolchain targeting systems running cygwin as host
+
+choice
+	bool
+	prompt "Cygwin version"
+
+config CYGWIN_V_1_5_25_15
+	bool
+	prompt "1.5.25-15"
+
+# CT_INSERT_VERSION_ABOVE
+# Don't remove above line!
+
+config CYGWIN_V_select
+    bool
+    prompt "Other version"
+
+endchoice
+
+config CYGWIN_VERSION
+	string
+	prompt "Cygwin version" if CYGWIN_V_select
+	default "1.5.25-15" if CYGWIN_V_1_5_25_15
+# CT_INSERT_VERSION_STRING_ABOVE
+# Don't remove above line!
+    help
+	Enter the version number for Cygwin
+
Index: crosstool-ng/scripts/build/kernel/cygwin.sh
===================================================================
--- /dev/null
+++ crosstool-ng/scripts/build/kernel/cygwin.sh
@@ -0,0 +1,47 @@
+# This file declares functions to install the kernel headers for mingw
+# Copyright 2009 Bart vdr. Meulen
+# Licensed under the GPL v2. See COPYING in the root of this package
+
+CT_DoKernelTupleValues() {
+    CT_TARGET_KERNEL="cygwin"
+    CT_TARGET_SYS=
+}
+
+do_kernel_get() {
+    CT_GetFile "cygwin-${CT_CYGWIN_VERSION}" \
+        ftp://ftp.easynet.be/cygwin/release/cygwin/
+
+    return 0
+}
+
+do_kernel_extract() {
+    mkdir -p "${CT_SRC_DIR}/cygwin-${CT_CYGWIN_VERSION}"
+    CT_Pushd "${CT_SRC_DIR}/cygwin-${CT_CYGWIN_VERSION}"
+    CT_Extract nochdir "cygwin-${CT_CYGWIN_VERSION}"
+    CT_Popd
+
+    mkdir -p "${CT_SRC_DIR}/w32api-3.13-1"
+    CT_Pushd "${CT_SRC_DIR}/w32api-3.13-1"
+    CT_Extract nochdir "w32api-3.13-1"
+    CT_Popd
+
+    return 0
+}
+
+do_kernel_headers() {
+    CT_DoStep INFO "Installing kernel headers"
+
+    mkdir -p "${CT_SYSROOT_DIR}/usr"
+    cp -r ${CT_SRC_DIR}/cygwin-${CT_CYGWIN_VERSION}/usr/include \
+          ${CT_SYSROOT_DIR}/usr
+    cp -r ${CT_SRC_DIR}/w32api-3.13-1/usr/include \
+          ${CT_SYSROOT_DIR}/usr
+
+    mkdir -p "${CT_SYSROOT_DIR}/usr"
+    cp -r ${CT_SRC_DIR}/cygwin-${CT_CYGWIN_VERSION}/usr/lib \
+          ${CT_SYSROOT_DIR}/usr
+    cp -r ${CT_SRC_DIR}/w32api-3.13-1/usr/lib \
+          ${CT_SYSROOT_DIR}/usr
+
+  CT_EndStep
+}
Index: crosstool-ng/config/kernel.in
===================================================================
--- crosstool-ng.orig/config/kernel.in
+++ crosstool-ng/config/kernel.in
@@ -12,6 +12,10 @@ config MINGW32
     bool
     default n
 
+config CYGWIN
+    bool
+    default n
+
 # Each target OS (aka kernel) that support shared libraries can select
 # this, so the user can decide whether or not to build a shared library
 # enabled toolchain
Index: crosstool-ng/config/libc/newlib.in
===================================================================
--- crosstool-ng.orig/config/libc/newlib.in
+++ crosstool-ng/config/libc/newlib.in
@@ -1,5 +1,5 @@
 # newlib options
-# depends on BARE_METAL
+# depends on BARE_METAL || CYGWIN
 
 config LIBC_newlib
     help

-- 


--
For unsubscribe information see http://sourceware.org/lists.html#faq

  parent reply	other threads:[~2010-04-09 19:34 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100409190419.325379428@bohmer.net>
2010-04-09 19:33 ` [CT-NG:patch 05/19] Force autoreconf for mpfr Remy Bohmer
2010-04-11 13:56   ` Yann E. MORIN
2010-04-12 22:24   ` Yann E. MORIN
2010-04-09 19:33 ` [CT-NG:patch 11/19] Add mingw as kernel type Remy Bohmer
2010-04-11 15:25   ` Yann E. MORIN
2010-04-09 19:33 ` [CT-NG:patch 10/19] Add ARCH_CPU for m68k architecture Remy Bohmer
2010-04-11 15:03   ` Yann E. MORIN
2010-04-09 19:33 ` [CT-NG:patch 03/19] Build candian baremetal compiler Remy Bohmer
2010-04-11 13:40   ` Yann E. MORIN
     [not found]     ` <i2l87271a2c1004120533g10be9d4ge8c5d8bdb69742f8@mail.gmail.com>
2010-04-12 12:35       ` Bart van der Meulen
2010-04-09 19:33 ` [CT-NG:patch 13/19] Add Linux - Mingw32 sample Remy Bohmer
2010-04-09 19:33 ` [CT-NG:patch 09/19] Allow choice for elf format when building bare metal cross compiler Remy Bohmer
2010-04-11 14:47   ` Yann E. MORIN
2010-04-09 19:33 ` [CT-NG:patch 06/19] Update CT_DoSaveState and CT_DoRestoreState to check for existence Remy Bohmer
2010-04-11 13:59   ` Yann E. MORIN
2010-04-12 12:28     ` Bart van der Meulen
2010-04-12 15:12       ` Arnaud Lacombe
2010-04-12 20:43         ` Yann E. MORIN
2010-04-12 20:42       ` Yann E. MORIN
2010-04-09 19:33 ` [CT-NG:patch 02/19] Symlink to cc not always installed correctly Remy Bohmer
2010-04-11 13:26   ` Yann E. MORIN
2010-04-09 19:33 ` [CT-NG:patch 07/19] Adapt CTPatch function to handle dash in package name Remy Bohmer
2010-04-11 14:06   ` Yann E. MORIN
2010-04-09 19:33 ` [CT-NG:patch 16/19] Fix PPL build for MINGW Remy Bohmer
2010-04-09 19:33 ` [CT-NG:patch 04/19] Update check for need of g++ Remy Bohmer
2010-04-11 13:43   ` Yann E. MORIN
2010-04-09 19:33 ` [CT-NG:patch 01/19] Add option to not install the wrapper scripts Remy Bohmer
2010-04-09 22:25   ` Arnaud Lacombe
2010-04-11 13:20   ` Yann E. MORIN
2010-04-09 19:33 ` [CT-NG:patch 12/19] Add mingw target libraries Remy Bohmer
2010-04-11 15:45   ` Yann E. MORIN
2010-04-11 16:10     ` Arnaud Lacombe
2010-04-09 19:34 ` Remy Bohmer [this message]
2010-04-11 20:30   ` [CT-NG:patch 15/19] First setup for cygwin as target Yann E. MORIN
2010-04-12 12:44     ` Bart van der Meulen
2010-04-09 19:34 ` [CT-NG:patch 19/19] The m68k processor does not like unaligned access in memcpy Remy Bohmer
2010-04-12 20:56   ` Yann E. MORIN
2010-04-09 19:34 ` [CT-NG:patch 08/19] Prevent trailing - in CT_TARGET Remy Bohmer
2010-04-11 14:11   ` Yann E. MORIN
2010-04-09 19:34 ` [CT-NG:patch 14/19] add bugurl and compiler version to core gcc compiler Remy Bohmer
2010-04-11 15:50   ` Yann E. MORIN
2010-04-09 19:34 ` [CT-NG:patch 18/19] Fix wrong host compiler usage on canadian build with baremetal target Remy Bohmer
2010-04-09 19:34 ` [CT-NG:patch 17/19] Fix linking of PPL (it does not link with stdc++ automaticly) Remy Bohmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4bbf811d.1067f10a.253c.61f2@mx.google.com \
    --to=linux@bohmer.net \
    --cc=bartvdrmeulen@gmail.com \
    --cc=crossgcc@sourceware.org \
    --cc=yann.morin.1998@anciens.enib.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).