This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[CT-NG:patch 15/19] First setup for cygwin as target


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]