public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* [CT-NG:patch 11/19] Add mingw as kernel type
       [not found] <20100409190419.325379428@bohmer.net>
                   ` (4 preceding siblings ...)
  2010-04-09 19:33 ` [CT-NG:patch 13/19] Add Linux - Mingw32 sample Remy Bohmer
@ 2010-04-09 19:33 ` Remy Bohmer
  2010-04-11 15:25   ` Yann E. MORIN
  2010-04-09 19:33 ` [CT-NG:patch 05/19] Force autoreconf for mpfr Remy Bohmer
                   ` (12 subsequent siblings)
  18 siblings, 1 reply; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:33 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc

[-- Attachment #1: add_mingw_as_kernel_type.patch --]
[-- Type: text/plain, Size: 9995 bytes --]

Add the option to build a cross-compiler for kernel type 'mingw'.
The resulting cross-compiler can be used to build applications on a Linux host
that can be run on a Windows target.

Compiler is build using the mingwrt and w32-api packages aviable from the
MinGW project (http://sourceforge.net/projects/mingw).

The windows headers (w32-api package) are extracting with the kernel_headers
step The libraries and other headers from both packages are build and
installed in the various steps of libc

Signed-off-by: Bart vdr Meulen <bartvdrmeulen@gmail.com>
---
 config/kernel.in                |    4 ++
 config/kernel/mingw32.in        |   33 +++++++++++++++++
 config/libc.in                  |   13 ++++++
 config/libc/eglibc.in           |    2 -
 config/libc/glibc.in            |    2 -
 config/libc/mingw.in            |   35 ++++++++++++++++++
 config/libc/uClibc.in           |    2 -
 scripts/build/cc/gcc.sh         |    9 ++++
 scripts/build/kernel/mingw32.sh |   30 ++++++++++++++++
 scripts/build/libc/mingw.sh     |   75 ++++++++++++++++++++++++++++++++++++++++
 10 files changed, 200 insertions(+), 5 deletions(-)

Index: crosstool-ng/config/kernel.in
===================================================================
--- crosstool-ng.orig/config/kernel.in
+++ crosstool-ng/config/kernel.in
@@ -8,6 +8,10 @@ config BARE_METAL
     bool
     default n
 
+config MINGW32
+    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/kernel/mingw32.in
===================================================================
--- /dev/null
+++ crosstool-ng/config/kernel/mingw32.in
@@ -0,0 +1,33 @@
+# Bare metal config options
+
+config KERNEL_mingw32
+    select MINGW32
+    help
+      Build a toolchain targeting systems running Windows as host
+
+choice
+	bool
+	prompt "Windows api version"
+
+config W32API_V_3_13
+	bool
+	prompt "3.13"
+
+# CT_INSERT_VERSION_ABOVE
+# Don't remove above line!
+
+config W32API_V_select
+    bool
+    prompt "Other version"
+
+endchoice
+
+config W32API_VERSION
+	string
+	prompt "W32 api version" if W32API_V_select
+	default "3.13" if W32API_V_3_13
+# CT_INSERT_VERSION_STRING_ABOVE
+# Don't remove above line!
+    help
+	Enter the version number of the windows api files to use
+
Index: crosstool-ng/config/libc.in
===================================================================
--- crosstool-ng.orig/config/libc.in
+++ crosstool-ng/config/libc.in
@@ -29,10 +29,15 @@ config LIBC_SUPPORT_LINUXTHREADS
     bool
     default n
 
+config LIBC_SUPPORT_WIN32THREADS
+     bool
+     default n
+
 config THREADS
     string
     default "nptl"          if THREADS_NPTL
     default "linuxthreads"  if THREADS_LINUXTHREADS
+    default "win32"         if THREADS_WIN32THREADS
     default "none"          if THREADS_NONE || LIBC_none
 #                              No C library, no threads!
 
@@ -45,7 +50,8 @@ choice
     prompt "Threading implementation to use:"
     default THREADS_NPTL           if LIBC_SUPPORT_NPTL
     default THREADS_LINUXTHREADS   if LIBC_SUPPORT_LINUXTHREADS && ! LIBC_SUPPORT_NPTL
-    default THREADS_NONE           if ! LIBC_SUPPORT_LINUXTHREADS && ! LIBC_SUPPORT_NPTL
+    default THREADS_WIN32          if LIBC_SUPPORT_WIN32THREADS
+    default THREADS_NONE           if ! LIBC_SUPPORT_LINUXTHREADS && ! LIBC_SUPPORT_NPTL && ! LIBC_SUPPORT_WIN32THREADS
 
 config THREADS_NPTL
     bool
@@ -57,6 +63,11 @@ config THREADS_LINUXTHREADS
     prompt "linuxthreads"
     depends on LIBC_SUPPORT_LINUXTHREADS
 
+config THREADS_WIN32THREADS
+    bool
+    prompt "win32"
+    depends on LIBC_SUPPORT_WIN32THREADS
+
 config THREADS_NONE
     bool
     prompt "none"
Index: crosstool-ng/config/libc/eglibc.in
===================================================================
--- crosstool-ng.orig/config/libc/eglibc.in
+++ crosstool-ng/config/libc/eglibc.in
@@ -1,5 +1,5 @@
 # eglibc options
-# depends on ! BARE_METAL && ARCH_USE_MMU
+# depends on ! MINGW32 && ! BARE_METAL && ARCH_USE_MMU
 
 config LIBC_eglibc
     select LIBC_SUPPORT_NPTL
Index: crosstool-ng/config/libc/glibc.in
===================================================================
--- crosstool-ng.orig/config/libc/glibc.in
+++ crosstool-ng/config/libc/glibc.in
@@ -1,5 +1,5 @@
 # glibc options
-# depends on ! BARE_METAL && ARCH_USE_MMU
+# depends on ! MINGW32 && ! BARE_METAL && ARCH_USE_MMU
 
 config LIBC_glibc
     select LIBC_SUPPORT_NPTL
Index: crosstool-ng/config/libc/mingw.in
===================================================================
--- /dev/null
+++ crosstool-ng/config/libc/mingw.in
@@ -0,0 +1,35 @@
+# mingw options
+# depends on MINGW32
+
+config LIBC_mingw
+    bool
+    select LIBC_SUPPORT_WIN32THREADS
+    help
+      The de-facto standard for Mingw distributions.
+
+choice
+	bool
+	prompt "Mingw runtime version"
+
+config MINGWRT_V_3_15_2
+    bool
+    prompt "3.15.2"
+
+# CT_INSERT_VERSION_ABOVE
+# Don't remove above line!
+
+config MINGWRT_V_select
+    bool
+    prompt "Other version"
+
+endchoice
+
+config MINGWRT_VERSION
+	string
+	prompt "Mingw runtime version" if MINGWRT_V_select
+	default "3.15.2" if MINGWRT_V_3_15_2
+# CT_INSERT_VERSION_STRING_ABOVE
+# Don't remove above line!
+    help
+	Enter the version number of the mingw runtime files to use
+
Index: crosstool-ng/config/libc/uClibc.in
===================================================================
--- crosstool-ng.orig/config/libc/uClibc.in
+++ crosstool-ng/config/libc/uClibc.in
@@ -1,5 +1,5 @@
 # uClibc options
-# depends on ! BARE_METAL
+# depends on ! MINGW32 && ! BARE_METAL
 
 config LIBC_uClibc
     select LIBC_SUPPORT_LINUXTHREADS
Index: crosstool-ng/scripts/build/cc/gcc.sh
===================================================================
--- crosstool-ng.orig/scripts/build/cc/gcc.sh
+++ crosstool-ng/scripts/build/cc/gcc.sh
@@ -68,6 +68,8 @@ do_cc_core_pass_2() {
         ,,nptl)
             do_cc_core mode=shared build_libgcc=yes
             ;;
+        ,,win32) do_cc_core mode=static build_libgcc=yes
+            ;;
         *)  if [ "${CT_CC_GCC_4_3_or_later}" = "y" ]; then
                 do_cc_core mode=static build_libgcc=yes
             else
@@ -317,7 +319,12 @@ do_cc() {
             extra_config+=("--disable-libgomp")
         fi
     else
-        extra_config+=("--enable-threads=posix")
+	if [ "${CT_THREADS}" = "win32" ]; then
+		extra_config+=("--enable-threads=win32")
+		extra_config+=("--disable-win32-registry")
+	else
+		extra_config+=("--enable-threads=posix")
+	fi
     fi
 
     CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
Index: crosstool-ng/scripts/build/kernel/mingw32.sh
===================================================================
--- /dev/null
+++ crosstool-ng/scripts/build/kernel/mingw32.sh
@@ -0,0 +1,30 @@
+# 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="mingw32"
+    CT_TARGET_SYS=
+}
+
+do_kernel_get() {
+    CT_GetFile "w32api-${CT_W32API_VERSION}-mingw32-src" \
+        http://downloads.sourceforge.net/sourceforge/mingw
+
+    return 0
+}
+
+do_kernel_extract() {
+    CT_Extract "w32api-${CT_W32API_VERSION}-mingw32-src"
+    return 0
+}
+
+do_kernel_headers() {
+    CT_DoStep INFO "Installing kernel headers"
+
+    mkdir -p "${CT_SYSROOT_DIR}/include"
+    cp -r ${CT_SRC_DIR}/w32api-${CT_W32API_VERSION}-mingw32/include \
+          ${CT_SYSROOT_DIR}
+
+  CT_EndStep
+}
Index: crosstool-ng/scripts/build/libc/mingw.sh
===================================================================
--- /dev/null
+++ crosstool-ng/scripts/build/libc/mingw.sh
@@ -0,0 +1,75 @@
+do_libc_get() {
+    CT_GetFile "mingwrt-${CT_MINGWRT_VERSION}-mingw32-src" \
+        http://downloads.sourceforge.net/sourceforge/mingw
+}
+
+do_libc_extract() {
+
+    CT_Extract "mingwrt-${CT_MINGWRT_VERSION}-mingw32-src"
+}
+
+do_libc_check_config() {
+    :
+}
+
+do_libc_headers() {
+    CT_DoStep INFO "Installing C library headers"
+
+    CT_DoLog EXTRA "Installing MinGW Runtime headers"
+    mkdir -p "${CT_SYSROOT_DIR}/include"
+    cp -r ${CT_SRC_DIR}/mingwrt-${CT_MINGWRT_VERSION}-mingw32/include \
+          ${CT_SYSROOT_DIR}
+
+    CT_EndStep
+}
+
+do_libc_start_files() {
+    :
+}
+
+do_libc() {
+    CT_DoStep INFO "Building MinGW files"
+
+    CT_DoLog EXTRA "Configuring W32-API"
+
+    mkdir -p "${CT_BUILD_DIR}/w32api"
+    cd "${CT_BUILD_DIR}/w32api"
+
+    CFLAGS="-I${CT_SYSROOT_DIR}/include"                          \
+    LDFLAGS="-L${CT_SYSROOT_DIR}/lib"                             \
+    CT_DoExecLog ALL                                              \
+    "${CT_SRC_DIR}/w32api-${CT_W32API_VERSION}-mingw32/configure" \
+        --prefix=${CT_SYSROOT_DIR}                                \
+        --host=${CT_TARGET}
+
+    CT_DoLog EXTRA "Building W32-API"
+    CT_DoExecLog ALL make ${PARALLELMFLAGS}
+
+    CT_DoLog EXTRA "Installing W32-API"
+    CT_DoExecLog ALL make install
+
+    CT_DoLog EXTRA "Configuring MinGW Runtime"
+
+    mkdir -p "${CT_BUILD_DIR}/mingwrt"
+    cd "${CT_BUILD_DIR}/mingwrt"
+
+    CFLAGS="-I${CT_SYSROOT_DIR}/include"                            \
+    LDFLAGS="-L${CT_SYSROOT_DIR}/lib"                               \
+    CT_DoExecLog ALL                                                \
+    "${CT_SRC_DIR}/mingwrt-${CT_MINGWRT_VERSION}-mingw32/configure" \
+        --prefix=${CT_SYSROOT_DIR}/                                 \
+        --host=${CT_TARGET}
+
+    CT_DoLog EXTRA "Building MinGW Runtime"
+    CT_DoExecLog ALL make ${PARALLELMFLAGS}
+
+    CT_DoLog EXTRA "Installing MinGW Runtime"
+    CT_DoExecLog ALL make install
+
+    CT_EndStep
+}
+
+do_libc_finish() {
+ :
+}
+

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 07/19] Adapt CTPatch function to handle dash in  package name
       [not found] <20100409190419.325379428@bohmer.net>
                   ` (10 preceding siblings ...)
  2010-04-09 19:33 ` [CT-NG:patch 02/19] Symlink to cc not always installed correctly Remy Bohmer
@ 2010-04-09 19:33 ` 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
                   ` (6 subsequent siblings)
  18 siblings, 1 reply; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:33 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc

[-- Attachment #1: adept-CTPatch-to-handle-dash-in-pacakge.patch --]
[-- Type: text/plain, Size: 1598 bytes --]

Some packages have a dash ('-') in their package name, other
packages have a dash in their version number. In order to handle this
first look for a patch directory split on the last dash, in not found
check for a patch direcory split on the fist dash.

TODO:
Handle package with dash both in package and version number.

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
---
 scripts/functions |   10 ++++++++++
 1 file changed, 10 insertions(+)

Index: crosstool-ng/scripts/functions
===================================================================
--- crosstool-ng.orig/scripts/functions
+++ crosstool-ng/scripts/functions
@@ -754,6 +754,16 @@ CT_Patch() {
     bundled_patch_dir="${CT_LIB_DIR}/patches/${base_file}/${ver_file}"
     local_patch_dir="${CT_LOCAL_PATCH_DIR}/${base_file}/${ver_file}"
 
+    if [ ! -d ${bundled_patch_dir} -a ! -d ${local_patch_dir} ]; then
+        #"${basename%%-*}" return incorrect base-file when package name contains '-'
+        #"${basename%-*}" return incorrect base-file when version contains '-'
+        #so first try first method, and if no dirs exists set to alternative
+        base_file="${basename%-*}"
+        ver_file="${basename##*-}"
+        bundled_patch_dir="${CT_LIB_DIR}/patches/${base_file}/${ver_file}"
+        local_patch_dir="${CT_CUSTOM_PATCH_DIR}/${base_file}/${ver_file}"
+    fi
+
     case "${CT_PATCH_ORDER}" in
         bundled)        patch_dirs=("${bundled_patch_dir}");;
         local)          patch_dirs=("${local_patch_dir}");;

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 16/19] Fix PPL build for MINGW
       [not found] <20100409190419.325379428@bohmer.net>
                   ` (11 preceding siblings ...)
  2010-04-09 19:33 ` [CT-NG:patch 07/19] Adapt CTPatch function to handle dash in package name Remy Bohmer
@ 2010-04-09 19:33 ` Remy Bohmer
  2010-04-09 19:34 ` [CT-NG:patch 15/19] First setup for cygwin as target Remy Bohmer
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:33 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc

[-- Attachment #1: add-patches-for-ppl.patch --]
[-- Type: text/plain, Size: 1452 bytes --]

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
---
 patches/ppl/0.10.2/100-update-for-mingw-build.patch |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Index: crosstool-ng/patches/ppl/0.10.2/100-update-for-mingw-build.patch
===================================================================
--- /dev/null
+++ crosstool-ng/patches/ppl/0.10.2/100-update-for-mingw-build.patch
@@ -0,0 +1,19 @@
+--- ppl-0.10.2/configure	2010-03-19 07:44:26.000000000 +0100
++++ ppl-0.10.2-new/configure	2010-03-19 19:25:02.000000000 +0100
+@@ -15603,11 +15603,12 @@
+                 found_la="$additional_libdir/lib$name.la"
+               fi
+             else
+-              if test -f "$additional_libdir/lib$name.$libext"; then
++              post=${shlibext:+.${shlibext}}
++              if test -f "$additional_libdir/lib$name$post.$libext"; then
+                 found_dir="$additional_libdir"
+-                found_a="$additional_libdir/lib$name.$libext"
+-                if test -f "$additional_libdir/lib$name.la"; then
+-                  found_la="$additional_libdir/lib$name.la"
++                found_a="$additional_libdir/lib$name$post.$libext"
++                if test -f "$additional_libdir/lib$name$post.la"; then
++                  found_la="$additional_libdir/lib$name$post.la"
+                 fi
+               fi
+             fi

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 04/19] Update check for need of g++
       [not found] <20100409190419.325379428@bohmer.net>
                   ` (8 preceding siblings ...)
  2010-04-09 19:33 ` [CT-NG:patch 01/19] Add option to not install the wrapper scripts Remy Bohmer
@ 2010-04-09 19:33 ` Remy Bohmer
  2010-04-11 13:43   ` Yann E. MORIN
  2010-04-09 19:33 ` [CT-NG:patch 02/19] Symlink to cc not always installed correctly Remy Bohmer
                   ` (8 subsequent siblings)
  18 siblings, 1 reply; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:33 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc

[-- Attachment #1: update-check-for-g++.patch --]
[-- Type: text/plain, Size: 1509 bytes --]

g++ is only needed when building additonal libs on the HOST,
so check wheter g++ is available for the HOST compiler only

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
---
 scripts/crosstool-NG.sh.in |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Index: crosstool-ng/scripts/crosstool-NG.sh.in
===================================================================
--- crosstool-ng.orig/scripts/crosstool-NG.sh.in
+++ crosstool-ng/scripts/crosstool-NG.sh.in
@@ -416,11 +416,15 @@ if [ -z "${CT_RESTART}" ]; then
             else
                 case "${tool}" in
                     # We'll at least need some of them...
-                    ar|as|gcc|g++|ld|nm|objcopy|objdump|ranlib)
+                    ar|as|gcc|ld|nm|objcopy|objdump|ranlib)
                         CT_Abort "Missing: '${t}${tool}${!s}' or '${t}${tool}' or '${tool}' : either needed!"
                         ;;
                     # Some are conditionnally required
                     # Add them in alphabetical (C locale) ordering
+		    #g++ (needed for companion lib), only needed for HOST
+		    g++)
+			CT_TestAndAbort "Missing: '${t}${tool}${!s}' or '${t}${tool}' or '${tool}' : either needed!" "${m}" = "HOST"
+			;;
                     gcj)
                         CT_TestAndAbort "Missing: '${t}${tool}${!s}' or '${t}${tool}' or '${tool}' : either needed!" "${CT_CC_LANG_JAVA}" = "y"
                         ;;

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 13/19] Add Linux - Mingw32 sample
       [not found] <20100409190419.325379428@bohmer.net>
                   ` (3 preceding siblings ...)
  2010-04-09 19:33 ` [CT-NG:patch 03/19] Build candian baremetal compiler Remy Bohmer
@ 2010-04-09 19:33 ` Remy Bohmer
  2010-04-09 19:33 ` [CT-NG:patch 11/19] Add mingw as kernel type Remy Bohmer
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:33 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc

[-- Attachment #1: add-linux-mingw-sample.patch --]
[-- Type: text/plain, Size: 7270 bytes --]

Sample to build compiler targetting mingw32 target systems

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
---
 samples/i686-pc-mingw32/crosstool.config |  302 +++++++++++++++++++++++++++++++
 samples/i686-pc-mingw32/reported.by      |    3 
 2 files changed, 305 insertions(+)

Index: crosstool-ng/samples/i686-pc-mingw32/crosstool.config
===================================================================
--- /dev/null
+++ crosstool-ng/samples/i686-pc-mingw32/crosstool.config
@@ -0,0 +1,302 @@
+#
+# Automatically generated make config: don't edit # crosstool-NG
+version: hg_default@1430_933eee133cbf # Tue Jul 21 21:15:23 2009 #
+
+#
+# Paths and misc options
+#
+
+#
+# crosstool-NG behavior
+#
+# CT_OBSOLETE is not set
+# CT_EXPERIMENTAL is not set
+# CT_DEBUG_CT is not set
+
+#
+# Paths
+#
+CT_LOCAL_TARBALLS_DIR="${HOME}/src"
+CT_SAVE_TARBALLS=y
+CT_WORK_DIR="${CT_TOP_DIR}/targets"
+CT_PREFIX_DIR="${HOME}/x-tools/${samp_name}"
+CT_INSTALL_DIR="${CT_PREFIX_DIR}"
+# CT_CUSTOM_PATCH is not set
+CT_REMOVE_DOCS=y
+CT_INSTALL_DIR_RO=y
+
+#
+# Downloading
+#
+# CT_FORBID_DOWNLOAD is not set
+# CT_FORCE_DOWNLOAD is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/"
+# CT_MIRROR_LS_R is not set
+CT_CONNECT_TIMEOUT=10
+# CT_ONLY_DOWNLOAD is not set
+
+#
+# Extracting
+#
+# CT_FORCE_EXTRACT is not set
+CT_OVERIDE_CONFIG_GUESS_SUB=y
+# CT_ONLY_EXTRACT is not set
+
+#
+# Build behavior
+#
+CT_PARALLEL_JOBS=1
+CT_LOAD=0
+CT_NICE=0
+CT_USE_PIPES=y
+# CT_CONFIG_SHELL_ASH is not set
+
+#
+# Logging
+#
+# CT_LOG_ERROR is not set
+# CT_LOG_WARN is not set
+# CT_LOG_INFO is not set
+CT_LOG_EXTRA=y
+# CT_LOG_DEBUG is not set
+# CT_LOG_ALL is not set
+CT_LOG_LEVEL_MAX="EXTRA"
+# CT_LOG_SEE_TOOLS_WARN is not set
+CT_LOG_PROGRESS_BAR=y
+CT_LOG_TO_FILE=y
+CT_LOG_FILE_COMPRESS=y
+
+#
+# Target options
+#
+CT_ARCH="x86"
+# CT_ARCH_64 is not set
+CT_ARCH_SUPPORT_ARCH=y
+# CT_ARCH_SUPPORTS_BOTH_MMU is not set
+# CT_ARCH_SUPPORTS_BOTH_ENDIAN is not set
+# CT_ARCH_SUPPORT_ABI is not set
+CT_ARCH_SUPPORT_CPU=y
+CT_ARCH_SUPPORT_TUNE=y
+# CT_ARCH_SUPPORT_FPU is not set
+# CT_ARCH_DEFAULT_HAS_MMU is not set
+# CT_ARCH_DEFAULT_BE is not set
+# CT_ARCH_DEFAULT_LE is not set
+CT_ARCH_ARCH="i686"
+CT_ARCH_CPU=""
+CT_ARCH_TUNE=""
+CT_ARCH_FLOAT_HW=y
+# CT_ARCH_FLOAT_SW is not set
+CT_TARGET_CFLAGS=""
+CT_TARGET_LDFLAGS=""
+
+#
+# General target options
+#
+# CT_ARCH_alpha is not set
+# CT_ARCH_arm is not set
+# CT_ARCH_ia64 is not set
+# CT_ARCH_mips is not set
+# CT_ARCH_powerpc64 is not set
+# CT_ARCH_powerpc is not set
+# CT_ARCH_sh is not set
+# CT_ARCH_x86_64 is not set
+CT_ARCH_x86=y
+CT_ARCH_USE_MMU=y
+
+#
+# Target optimisations
+#
+
+#
+# Toolchain options
+#
+
+#
+# General toolchain options
+#
+# CT_USE_SYSROOT is not set
+CT_SHARED_LIBS=y
+
+#
+# Tuple completion and aliasing
+#
+CT_TARGET_VENDOR="pc"
+CT_TARGET_ALIAS_SED_EXPR=""
+CT_TARGET_ALIAS=""
+
+#
+# Toolchain type
+#
+# CT_NATIVE is not set
+CT_CROSS=y
+# CT_CROSS_NATIVE is not set
+# CT_CANADIAN is not set
+CT_TOOLCHAIN_TYPE="cross"
+
+#
+# Build system
+#
+CT_BUILD=""
+CT_BUILD_PREFIX=""
+CT_BUILD_SUFFIX=""
+
+#
+# Operating System
+#
+# CT_BARE_METAL is not set
+CT_MINGW32=y
+CT_KERNEL="mingw32"
+# CT_KERNEL_bare_metal is not set
+# CT_KERNEL_linux is not set
+CT_KERNEL_mingw32=y
+CT_W32API_V_3_13=y
+# CT_W32API_V_select is not set
+CT_W32API_VERSION="3.13"
+
+#
+# Companion libraries
+#
+CT_GMP_MPFR=y
+# CT_GMP_V_4_2_2 is not set
+CT_GMP_V_4_2_4=y
+CT_GMP_VERSION="4.2.4"
+# CT_MPFR_V_2_3_1 is not set
+# CT_MPFR_V_2_3_2 is not set
+# CT_MPFR_V_2_4_0 is not set
+CT_MPFR_V_2_4_1=y
+CT_MPFR_VERSION="2.4.1"
+# CT_PPL_CLOOG_MPC is not set
+
+#
+# Companion libraries common options
+#
+# CT_COMP_LIBS_CHECK is not set
+# CT_COMP_LIBS_TARGET is not set
+
+#
+# Binary utilities
+#
+CT_ARCH_BINFMT_ELF=y
+# CT_ARCH_BINFMT_FLAT is not set
+
+#
+# GNU binutils
+#
+CT_BINUTILS_VERSION="2.19.1"
+# CT_BINUTILS_V_2_14 is not set
+# CT_BINUTILS_V_2_15 is not set
+# CT_BINUTILS_V_2_16_1 is not set
+# CT_BINUTILS_V_2_17 is not set
+# CT_BINUTILS_V_2_18 is not set
+# CT_BINUTILS_V_2_18_50_0_4 is not set
+# CT_BINUTILS_V_2_18_50_0_6 is not set
+# CT_BINUTILS_V_2_18_50_0_7 is not set
+# CT_BINUTILS_V_2_18_50_0_8 is not set
+# CT_BINUTILS_V_2_18_50_0_9 is not set
+# CT_BINUTILS_V_2_18_90 is not set
+# CT_BINUTILS_V_2_18_91 is not set
+# CT_BINUTILS_V_2_18_92 is not set
+# CT_BINUTILS_V_2_18_93 is not set
+# CT_BINUTILS_V_2_19 is not set
+CT_BINUTILS_V_2_19_1=y
+# CT_BINUTILS_V_2_19_50_0_1 is not set
+# CT_BINUTILS_V_2_19_51_0_1 is not set
+# CT_BINUTILS_V_2_19_51_0_2 is not set
+CT_BINUTILS_EXTRA_CONFIG=""
+# CT_BINUTILS_FOR_TARGET is not set
+
+#
+# C compiler
+#
+CT_CC="gcc"
+CT_CC_VERSION="4.3.2"
+CT_CC_gcc=y
+# CT_CC_V_3_2_3 is not set
+# CT_CC_V_3_3_6 is not set
+# CT_CC_V_3_4_6 is not set
+# CT_CC_V_4_0_0 is not set
+# CT_CC_V_4_0_1 is not set
+# CT_CC_V_4_0_2 is not set
+# CT_CC_V_4_0_3 is not set
+# CT_CC_V_4_0_4 is not set
+# CT_CC_V_4_1_0 is not set
+# CT_CC_V_4_1_1 is not set
+# CT_CC_V_4_1_2 is not set
+# CT_CC_V_4_2_0 is not set
+# CT_CC_V_4_2_1 is not set
+# CT_CC_V_4_2_2 is not set
+# CT_CC_V_4_2_3 is not set
+# CT_CC_V_4_2_4 is not set
+# CT_CC_V_4_3_0 is not set
+# CT_CC_V_4_3_1 is not set
+CT_CC_V_4_3_2=y
+# CT_CC_V_4_3_3 is not set
+# CT_CC_V_4_4_0 is not set
+CT_CC_GCC_4_3_or_later=y
+# CT_CC_GCC_4_4_or_later is not set
+CT_CC_CXA_ATEXIT=y
+CT_CC_SJLJ_EXCEPTIONS_CONFIGURE=y
+# CT_CC_SJLJ_EXCEPTIONS_USE is not set
+# CT_CC_SJLJ_EXCEPTIONS_DONT_USE is not set
+CT_CC_CORE_EXTRA_CONFIG=""
+CT_CC_EXTRA_CONFIG=""
+CT_CC_PKGVERSION="crosstool-NG-${CT_VERSION}"
+CT_CC_BUGURL=""
+CT_CC_SUPPORT_CXX=y
+CT_CC_SUPPORT_FORTRAN=y
+CT_CC_SUPPORT_JAVA=y
+CT_CC_SUPPORT_ADA=y
+CT_CC_SUPPORT_OBJC=y
+CT_CC_SUPPORT_OBJCXX=y
+
+#
+# Additional supported languages:
+#
+CT_CC_LANG_CXX=y
+# CT_CC_LANG_FORTRAN is not set
+# CT_CC_LANG_JAVA is not set
+# CT_CC_LANG_ADA is not set
+# CT_CC_LANG_OBJC is not set
+# CT_CC_LANG_OBJCXX is not set
+CT_CC_LANG_OTHERS=""
+CT_LIBC="mingw"
+
+#
+# C-library
+#
+# CT_LIBC_eglibc is not set
+# CT_LIBC_glibc is not set
+CT_LIBC_mingw=y
+# CT_LIBC_uClibc is not set
+CT_MINGWRT_V_3_15_2=y
+# CT_MINGWRT_V_select is not set
+CT_MINGWRT_VERSION="3.15.2"
+
+#
+# Common C library options
+#
+# CT_LIBC_SUPPORT_NPTL is not set
+# CT_LIBC_SUPPORT_LINUXTHREADS is not set
+CT_LIBC_SUPPORT_WIN32THREADS=y
+CT_THREADS="win32"
+# CT_THREADS_NPTL is not set
+# CT_THREADS_LINUXTHREADS is not set
+CT_THREADS_WIN32THREADS=y
+# CT_THREADS_NONE is not set
+
+#
+# Tools facilities
+#
+# CT_TOOL_libelf is not set
+# CT_TOOL_sstrip is not set
+
+#
+# Debug facilities
+#
+# CT_DEBUG_dmalloc is not set
+# CT_DEBUG_duma is not set
+# CT_DEBUG_gdb is not set
+# CT_DEBUG_ltrace is not set
+# CT_DEBUG_strace is not set
Index: crosstool-ng/samples/i686-pc-mingw32/reported.by
===================================================================
--- /dev/null
+++ crosstool-ng/samples/i686-pc-mingw32/reported.by
@@ -0,0 +1,3 @@
+reporter_name="Bart vdr. Meulen <bartvdrmeulen@gmail.com>"
+reporter_url=""
+reporter_comment="Config to build cross-compiler with mingw as kernel type"

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 12/19] Add mingw target libraries
       [not found] <20100409190419.325379428@bohmer.net>
                   ` (6 preceding siblings ...)
  2010-04-09 19:33 ` [CT-NG:patch 05/19] Force autoreconf for mpfr Remy Bohmer
@ 2010-04-09 19:33 ` Remy Bohmer
  2010-04-11 15:45   ` Yann E. MORIN
  2010-04-09 19:33 ` [CT-NG:patch 01/19] Add option to not install the wrapper scripts Remy Bohmer
                   ` (10 subsequent siblings)
  18 siblings, 1 reply; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:33 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc

[-- Attachment #1: add_mingw_target_libraries.patch --]
[-- Type: text/plain, Size: 12800 bytes --]

Add several development libraries to the build of the mingw cross-compiler
to be used on target

Libraries:
PDCurses (port of the ncurses library)
GnuRX (the regex library)
DirectX
OpenGL

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
---
 config/libc/mingw.in                                    |   72 +++++++++++
 patches/PDCurses/3.4/mingw32_cross_compile.patch        |   87 +++++++++++++
 patches/mingw-libgnurx/2.5.1/build-static-library.patch |  103 ++++++++++++++++
 scripts/build/libc/mingw.sh                             |   87 +++++++++++++
 4 files changed, 347 insertions(+), 2 deletions(-)

Index: crosstool-ng/config/libc/mingw.in
===================================================================
--- crosstool-ng.orig/config/libc/mingw.in
+++ crosstool-ng/config/libc/mingw.in
@@ -33,3 +33,75 @@ config MINGWRT_VERSION
     help
 	Enter the version number of the mingw runtime files to use
 
+config MINGW_DIRECTX
+	bool
+	prompt "Include DirectX development files"
+	default n
+
+config MINGW_OPENGL
+	bool
+	prompt "Include OpenGL development files"
+	default n
+
+config MINGW_PDCURSES
+	bool
+	prompt "Include PDCurses (NCurses library) development files"
+	default n
+
+choice
+	bool
+	prompt "PDCurses library version"
+
+config MINGW_PDCURSES_V_3_4
+    bool
+    prompt "3.4"
+
+# CT_INSERT_VERSION_ABOVE
+# Don't remove above line!
+
+config MINGW_PDCURSES_V_select
+    bool
+    prompt "Other version"
+
+endchoice
+
+config MINGW_PDCURSES_VERSION
+	string
+	prompt "PDCurses library version" if MINGW_PDCURSES_V_select
+	default "3.4" if MINGW_PDCURSES_V_3_4
+# CT_INSERT_VERSION_STRING_ABOVE
+# Don't remove above line!
+    help
+	Enter the version number of the PDCurses library to use
+
+config MINGW_GNURX
+	bool
+	prompt "Include GnuRX (regex library) development files"
+	default n
+
+choice
+	bool
+	prompt "GnuRX library version"
+
+config MINGW_GNURX_V_2_5_1
+    bool
+    prompt "2.5.1"
+
+# CT_INSERT_VERSION_ABOVE
+# Don't remove above line!
+
+config MINGW_GNURX_V_select
+    bool
+    prompt "Other version"
+
+endchoice
+
+config MINGW_GNURX_VERSION
+	string
+	prompt "GnuRX library version" if MINGW_GNURX_V_select
+	default "2.5.1" if MINGW_GNURX_V_2_5_1
+# CT_INSERT_VERSION_STRING_ABOVE
+# Don't remove above line!
+    help
+	Enter the version number of the Regex library to use
+
Index: crosstool-ng/scripts/build/libc/mingw.sh
===================================================================
--- crosstool-ng.orig/scripts/build/libc/mingw.sh
+++ crosstool-ng/scripts/build/libc/mingw.sh
@@ -1,11 +1,40 @@
 do_libc_get() {
     CT_GetFile "mingwrt-${CT_MINGWRT_VERSION}-mingw32-src" \
         http://downloads.sourceforge.net/sourceforge/mingw
+
+    if [ -n "${CT_MINGW_DIRECTX}" ]; then
+        CT_GetFile "directx-devel" \
+            http://www.libsdl.org/extras/win32/common
+    fi
+
+    if [ -n "${CT_MINGW_OPENGL}" ]; then
+        CT_GetFile "opengl-devel" \
+            http://www.libsdl.org/extras/win32/common
+    fi
+
+    if [ -n "${CT_MINGW_PDCURSES}" ]; then
+        CT_GetFile "PDCurses-${CT_MINGW_PDCURSES_VERSION}" \
+            http://downloads.sourceforge.net/sourceforge/pdcurses
+    fi
+
+    if [ -n "${CT_MINGW_GNURX}" ]; then
+        CT_GetFile "mingw-libgnurx-${CT_MINGW_GNURX_VERSION}-src" \
+            http://downloads.sourceforge.net/sourceforge/mingw
+    fi
 }
 
 do_libc_extract() {
-
     CT_Extract "mingwrt-${CT_MINGWRT_VERSION}-mingw32-src"
+
+    if [ -n "${CT_MINGW_PDCURSES}" ]; then
+        CT_Extract "PDCurses-${CT_MINGW_PDCURSES_VERSION}"
+        CT_Patch "PDCurses-${CT_MINGW_PDCURSES_VERSION}"
+    fi
+
+    if [ -n "${CT_MINGW_GNURX}" ]; then
+        CT_Extract "mingw-libgnurx-${CT_MINGW_GNURX_VERSION}-src"
+        CT_Patch "mingw-libgnurx-${CT_MINGW_GNURX_VERSION}"
+    fi
 }
 
 do_libc_check_config() {
@@ -70,6 +99,60 @@ do_libc() {
 }
 
 do_libc_finish() {
- :
+    CT_DoStep INFO "Installing MinGW Development libraries"
+
+    CT_Pushd "${CT_SYSROOT_DIR}"
+    if [ -n "${CT_MINGW_DIRECTX}" ]; then
+	CT_DoLog EXTRA "Installing DirectX development package"
+        CT_Extract nochdir "directx-devel"
+    fi
+    if [ -n "${CT_MINGW_OPENGL}" ]; then
+	CT_DoLog EXTRA "Installing OpenGL development package"
+        CT_Extract nochdir "opengl-devel"
+    fi
+    CT_Popd
+
+    if [ -n "${CT_MINGW_PDCURSES}" ]; then
+        CT_DoLog EXTRA "Building PDCurses development files"
+        mkdir -p "${CT_BUILD_DIR}/pdcurses"
+        cd "${CT_BUILD_DIR}/pdcurses"
+
+        make -f ${CT_SRC_DIR}/PDCurses-${CT_MINGW_PDCURSES_VERSION}/win32/mingwin32.mak libs \
+	    PDCURSES_SRCDIR=${CT_SRC_DIR}/PDCurses-${CT_MINGW_PDCURSES_VERSION} \
+            CROSS_COMPILE=${CT_TARGET}-
+
+        CT_DoLog EXTRA "Installing PDCurses development files"
+		 chmod a+r ${CT_SRC_DIR}/PDCurses-${CT_MINGW_PDCURSES_VERSION}/*.h
+        cp ${CT_SRC_DIR}/PDCurses-${CT_MINGW_PDCURSES_VERSION}/*.h \
+            ${CT_SYSROOT_DIR}/include
+        cp ${CT_BUILD_DIR}/pdcurses/pdcurses.a \
+            ${CT_SYSROOT_DIR}/lib/libpdcurses.a
+        cp ${CT_BUILD_DIR}/pdcurses/pdcurses.a \
+            ${CT_SYSROOT_DIR}/lib/libncurses.a
+    fi
+
+    if [ -n "${CT_MINGW_GNURX}" ]; then
+        CT_DoLog EXTRA "Configuring GnuRX development files"
+
+        mkdir -p "${CT_BUILD_DIR}/gnurx"
+        cd "${CT_BUILD_DIR}/gnurx"
+
+        CFLAGS="${CT_CFLAGS_FOR_TARGET}"                \
+        CT_DoExecLog ALL                                \
+        "${CT_SRC_DIR}/mingw-libgnurx-${CT_MINGW_GNURX_VERSION}/configure" \
+            --build=${CT_BUILD}           \
+            --host=${CT_TARGET}           \
+            --prefix=${CT_SYSROOT_DIR}    \
+            --enable-shared               \
+            --enable-static
+
+        CT_DoLog EXTRA "Building GnuRX development files"
+        CT_DoExecLog ALL make ${PARALLELMFLAGS}
+
+        CT_DoLog EXTRA "Installing GnuRX development files"
+        CT_DoExecLog ALL make install-dev
+    fi
+
+    CT_EndStep
 }
 
Index: crosstool-ng/patches/PDCurses/3.4/mingw32_cross_compile.patch
===================================================================
--- /dev/null
+++ crosstool-ng/patches/PDCurses/3.4/mingw32_cross_compile.patch
@@ -0,0 +1,87 @@
+--- PDCurses-3.4.orig/win32/mingwin32.mak	2009-11-02 13:50:11.000000000 +0100
++++ PDCurses-3.4/win32/mingwin32.mak	2009-11-02 13:53:43.000000000 +0100
+@@ -18,7 +18,7 @@
+
+ PDCURSES_WIN_H	= $(osdir)/pdcwin.h
+
+-CC		= gcc
++CC		= ${CROSS_COMPILE}gcc
+
+ ifeq ($(DEBUG),Y)
+ 	CFLAGS  = -g -Wall -DPDCDEBUG
+@@ -30,8 +30,8 @@
+
+ CFLAGS += -I$(PDCURSES_SRCDIR)
+
+-BASEDEF		= $(PDCURSES_SRCDIR)\exp-base.def
+-WIDEDEF		= $(PDCURSES_SRCDIR)\exp-wide.def
++BASEDEF		= $(PDCURSES_SRCDIR)/exp-base.def
++WIDEDEF		= $(PDCURSES_SRCDIR)/exp-wide.def
+
+ DEFDEPS		= $(BASEDEF)
+
+@@ -46,17 +46,17 @@
+
+ DEFFILE		= pdcurses.def
+
+-LINK		= gcc
++LINK		= ${CROSS_COMPILE}gcc
+
+ ifeq ($(DLL),Y)
+ 	CFLAGS += -DPDC_DLL_BUILD
+-	LIBEXE = gcc $(DEFFILE)
++	LIBEXE = ${CROSS_COMPILE}gcc $(DEFFILE)
+ 	LIBFLAGS = -Wl,--out-implib,pdcurses.a -shared -o
+ 	LIBCURSES = pdcurses.dll
+ 	LIBDEPS = $(LIBOBJS) $(PDCOBJS) $(DEFFILE)
+ 	CLEAN = $(LIBCURSES) *.a $(DEFFILE)
+ else
+-	LIBEXE = ar
++	LIBEXE = ${CROSS_COMPILE}ar
+ 	LIBFLAGS = rcv
+ 	LIBCURSES = pdcurses.a
+ 	LIBDEPS = $(LIBOBJS) $(PDCOBJS)
+@@ -70,24 +70,24 @@
+ libs:	$(LIBCURSES)
+
+ clean:
+-	-del *.o
+-	-del *.exe
+-	-del $(CLEAN)
++	-rm *.o
++	-rm *.exe
++	-rm $(CLEAN)
+
+ demos:	$(DEMOS)
+-	strip *.exe
++	${CROSS_COMPILE}strip *.exe
+
+ $(DEFFILE): $(DEFDEPS)
+ 	echo LIBRARY pdcurses > $@
+ 	echo EXPORTS >> $@
+-	type $(BASEDEF) >> $@
++	cat $(BASEDEF) >> $@
+ ifeq ($(WIDE),Y)
+-	type $(WIDEDEF) >> $@
++	cat $(WIDEDEF) >> $@
+ endif
+
+ $(LIBCURSES) : $(LIBDEPS)
+ 	$(LIBEXE) $(LIBFLAGS) $@ $?
+-	-copy pdcurses.a panel.a
++	-cp pdcurses.a panel.a
+
+ $(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS)
+ $(PDCOBJS) : $(PDCURSES_WIN_H)
+--- PDCurses-3.4.orig/curses.h	2009-11-03 14:12:18.000000000 +0100
++++ PDCurses-3.4./curses.h	2009-11-03 14:14:09.000000000 +0100
+@@ -82,7 +82,9 @@
+  *
+  */
+
++#ifndef __bool_true_false_are_defined
+ typedef unsigned char bool;    /* PDCurses Boolean type */
++#endif
+
+ #ifdef CHTYPE_LONG
+ # if _LP64
Index: crosstool-ng/patches/mingw-libgnurx/2.5.1/build-static-library.patch
===================================================================
--- /dev/null
+++ crosstool-ng/patches/mingw-libgnurx/2.5.1/build-static-library.patch
@@ -0,0 +1,103 @@
+--- mingw-libgnurx-2.5.1.orig/configure	2009-11-03 08:19:15.000000000 +0100
++++ mingw-libgnurx-2.5.1/configure	2009-11-03 08:31:37.000000000 +0100
+@@ -273,7 +273,7 @@
+ PACKAGE_STRING='MinGW libgnurx 2.5.1'
+ PACKAGE_BUGREPORT='https://sourceforge.net/tracker/?group_id=2435&atid=102435'
+
+-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CC_QUALIFIED DLLVERSION ZIPCMD ZIPEXT MSVCLIB ac_ct_MSVCLIB GNURX_LIB install_dev LIBOBJS LTLIBOBJS'
++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CC_QUALIFIED AR DLLVERSION ZIPCMD ZIPEXT MSVCLIB ac_ct_MSVCLIB GNURX_LIB install_dev LIBOBJS LTLIBOBJS'
+ ac_subst_files=''
+
+ # Initialize some variables set by options.
+@@ -2190,21 +2190,54 @@
+
+ fi
+ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
+-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+-  ac_ext=c
++
++for ac_prog in ar; do
++set dummy ${ac_tool_prefix}$ac_prog; ac_word=$2
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_AR+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++  if test -n "$AR"; then
++  ac_cv_prog_AR="$AR" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++  for ac_exec_ext in '' $ac_executable_extensions; do
++  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
++    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++done
++
++  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
++fi
++fi
++AR=$ac_cv_prog_AR
++if test -n "$AR"; then
++  echo "$as_me:$LINENO: result: $AR" >&5
++echo "${ECHO_T}$AR" >&6
++else
++  echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++done
++
++ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+- popCFLAGS=$CFLAGS
+- echo 'int main(void){return 0;}' > conftest.$ac_ext
+- echo "$as_me:$LINENO: checking whether $CC accepts the -mthreads option" >&5
++popCFLAGS=$CFLAGS
++echo 'int main(void){return 0;}' > conftest.$ac_ext
++echo "$as_me:$LINENO: checking whether $CC accepts the -mthreads option" >&5
+ echo $ECHO_N "checking whether $CC accepts the -mthreads option... $ECHO_C" >&6
+    CFLAGS="$popCFLAGS $CC_QUALIFIED -mthreads"
+    if (eval $ac_compile) 2>&5; then
+@@ -3038,6 +3069,7 @@
+ s,@EXEEXT@,$EXEEXT,;t t
+ s,@OBJEXT@,$OBJEXT,;t t
+ s,@CC_QUALIFIED@,$CC_QUALIFIED,;t t
++s,@AR@,$AR,;t t
+ s,@DLLVERSION@,$DLLVERSION,;t t
+ s,@ZIPCMD@,$ZIPCMD,;t t
+ s,@ZIPEXT@,$ZIPEXT,;t t
+--- mingw-libgnurx-2.5.1.orig/Makefile.in	2009-11-03 08:17:49.000000000 +0100
++++ mingw-libgnurx-2.5.1/Makefile.in	2009-11-03 08:57:37.000000000 +0100
+@@ -39,6 +39,7 @@
+ mandir = @mandir@
+
+ CC = @CC_QUALIFIED@
++AR = @AR@
+ CFLAGS = @CFLAGS@ -I ${srcdir}
+ LDFLAGS = @LDFLAGS@
+
+@@ -67,8 +68,8 @@
+ libgnurx-$(DLLVERSION).dll libgnurx.dll.a: $(OBJECTS)
+ 	$(CC) $(CFLAGS) -shared -o libgnurx-$(DLLVERSION).dll $(LDFLAGS) $(OBJECTS)
+
+-libregex.a: libgnurx.dll.a
+-	cp -p libgnurx.dll.a $@
++libregex.a: $(OBJECTS)
++	$(AR) cru $@ $(OBJECTS)
+
+ gnurx.lib: libgnurx-$(DLLVERSION).dll

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 02/19] Symlink to cc not always installed correctly
       [not found] <20100409190419.325379428@bohmer.net>
                   ` (9 preceding siblings ...)
  2010-04-09 19:33 ` [CT-NG:patch 04/19] Update check for need of g++ Remy Bohmer
@ 2010-04-09 19:33 ` 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
                   ` (7 subsequent siblings)
  18 siblings, 1 reply; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:33 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc

[-- Attachment #1: install-correct-symlink-for-cc.patch --]
[-- Type: text/plain, Size: 1957 bytes --]

When building an cross-compiler for a host which depends
on file extensions the symlink for cc was not installed correctly

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
---
 scripts/build/cc/gcc.sh |   18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

Index: crosstool-ng/scripts/build/cc/gcc.sh
===================================================================
--- crosstool-ng.orig/scripts/build/cc/gcc.sh
+++ crosstool-ng/scripts/build/cc/gcc.sh
@@ -246,7 +246,14 @@ do_cc_core() {
 
     # Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-gcc to always be able
     # to call the C compiler with the same, somewhat canonical name.
-    CT_DoExecLog ALL ln -sv "${CT_TARGET}"-gcc "${core_prefix_dir}/bin/${CT_TARGET}"-cc
+    # check whether compiler as an extension
+    file=$(ls -1 ${core_prefix_dir}/bin/${CT_TARGET}-gcc.* 2>/dev/null || echo "")
+    if [ "x${file}" = "x" ]; then
+        CT_DoExecLog ALL ln -sv "${CT_TARGET}"-gcc "${core_prefix_dir}/bin/${CT_TARGET}"-cc
+    else
+        ext=${file##*.}
+        CT_DoExecLog ALL ln -sv "${CT_TARGET}-gcc.${ext}" "${core_prefix_dir}/bin/${CT_TARGET}-cc.${ext}"
+    fi
 
     CT_EndStep
 }
@@ -362,7 +369,14 @@ do_cc() {
 
     # Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-gcc to always be able
     # to call the C compiler with the same, somewhat canonical name.
-    CT_DoExecLog ALL ln -sv "${CT_TARGET}"-gcc "${CT_PREFIX_DIR}/bin/${CT_TARGET}"-cc
+    # check whether compiler as an extension
+    file=$(ls -1 ${CT_TARGET}/bin/${CT_TARGET}-gcc.* 2>/dev/null || echo "")
+    if [ "x${file}" = "x" ]; then
+        CT_DoExecLog ALL ln -sv "${CT_TARGET}"-gcc "${CT_PREFIX_DIR}/bin/${CT_TARGET}"-cc
+    else
+        ext=${file##*.}
+        CT_DoExecLog ALL ln -sv "${CT_TARGET}-gcc.${ext}" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-cc.${ext}"
+    fi
 
     CT_EndStep
 }

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 09/19] Allow choice for elf format when building bare  metal cross compiler
       [not found] <20100409190419.325379428@bohmer.net>
  2010-04-09 19:33 ` [CT-NG:patch 06/19] Update CT_DoSaveState and CT_DoRestoreState to check for existence Remy Bohmer
@ 2010-04-09 19:33 ` Remy Bohmer
  2010-04-11 14:47   ` Yann E. MORIN
  2010-04-09 19:33 ` [CT-NG:patch 10/19] Add ARCH_CPU for m68k architecture Remy Bohmer
                   ` (16 subsequent siblings)
  18 siblings, 1 reply; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:33 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc

[-- Attachment #1: support-elf-for-baremetal.patch --]
[-- Type: text/plain, Size: 684 bytes --]

When building a baremetal cross compiler I want to be able to select
the elf format and not be forced to build the elf2flt package.

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
---
 config/binutils.in |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: crosstool-ng/config/binutils.in
===================================================================
--- crosstool-ng.orig/config/binutils.in
+++ crosstool-ng/config/binutils.in
@@ -6,7 +6,7 @@ choice
     bool
     prompt "Binary format:"
 
-if ARCH_USE_MMU
+if ARCH_USE_MMU || BARE_METAL
 
 config ARCH_BINFMT_ELF
     bool

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 06/19] Update CT_DoSaveState and CT_DoRestoreState to  check for existence
       [not found] <20100409190419.325379428@bohmer.net>
@ 2010-04-09 19:33 ` Remy Bohmer
  2010-04-11 13:59   ` Yann E. MORIN
  2010-04-09 19:33 ` [CT-NG:patch 09/19] Allow choice for elf format when building bare metal cross compiler Remy Bohmer
                   ` (17 subsequent siblings)
  18 siblings, 1 reply; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:33 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc

[-- Attachment #1: make_DoSave_and_DoRestore_robust.patch --]
[-- Type: text/plain, Size: 5864 bytes --]

In some configuration not all directories that are saved by
CT_DoSaveState exist, add a check so only existing directories
are saved.

Same applies when Restoring, check wheter the save files has
been created during an previous DoSave.

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
---
 scripts/functions |   93 +++++++++++++++++++++++++++++++-----------------------
 1 file changed, 55 insertions(+), 38 deletions(-)

Index: crosstool-ng/scripts/functions
===================================================================
--- crosstool-ng.orig/scripts/functions
+++ crosstool-ng/scripts/functions
@@ -934,29 +934,38 @@ CT_DoSaveState() {
                            /^(UID|EUID)=/d;
                            /^(FUNCNAME|GROUPS|PPID|SHELLOPTS)=/d;' >"${state_dir}/env.sh"
 
-    CT_DoLog DEBUG "  Saving CT_CONFIG_DIR='${CT_CONFIG_DIR}'"
-    CT_Pushd "${CT_CONFIG_DIR}"
-    CT_DoExecLog DEBUG tar cv${tar_opt}f "${state_dir}/config_dir.tar${tar_ext}" .
-    CT_Popd
-
-    CT_DoLog DEBUG "  Saving CT_CC_CORE_STATIC_PREFIX_DIR='${CT_CC_CORE_STATIC_PREFIX_DIR}'"
-    CT_Pushd "${CT_CC_CORE_STATIC_PREFIX_DIR}"
-    CT_DoExecLog DEBUG tar cv${tar_opt}f "${state_dir}/cc_core_static_prefix_dir.tar${tar_ext}" .
-    CT_Popd
-
-    CT_DoLog DEBUG "  Saving CT_CC_CORE_SHARED_PREFIX_DIR='${CT_CC_CORE_SHARED_PREFIX_DIR}'"
-    CT_Pushd "${CT_CC_CORE_SHARED_PREFIX_DIR}"
-    CT_DoExecLog DEBUG tar cv${tar_opt}f "${state_dir}/cc_core_shared_prefix_dir.tar${tar_ext}" .
-    CT_Popd
-
-    CT_DoLog DEBUG "  Saving CT_PREFIX_DIR='${CT_PREFIX_DIR}'"
-    CT_Pushd "${CT_PREFIX_DIR}"
-    CT_DoExecLog DEBUG tar cv${tar_opt}f "${state_dir}/prefix_dir.tar${tar_ext}" --exclude '*.log' .
-    CT_Popd
+    if [ -d ${CT_CONFIG_DIR} ]; then
+	    CT_DoLog DEBUG "  Saving CT_CONFIG_DIR='${CT_CONFIG_DIR}'"
+	    CT_Pushd "${CT_CONFIG_DIR}"
+	    CT_DoExecLog DEBUG tar cv${tar_opt}f "${state_dir}/config_dir.tar${tar_ext}" .
+	    CT_Popd
+    fi
+
+    if [ -d ${CT_CC_CORE_STATIC_PREFIX_DIR} ]; then
+	    CT_DoLog DEBUG "  Saving CT_CC_CORE_STATIC_PREFIX_DIR='${CT_CC_CORE_STATIC_PREFIX_DIR}'"
+	    CT_Pushd "${CT_CC_CORE_STATIC_PREFIX_DIR}"
+	    CT_DoExecLog DEBUG tar cv${tar_opt}f "${state_dir}/cc_core_static_prefix_dir.tar${tar_ext}" .
+	    CT_Popd
+    fi
+
+    if [ -d ${CT_CC_CORE_SHARED_PREFIX_DIR} ]; then
+	    CT_DoLog DEBUG "  Saving CT_CC_CORE_SHARED_PREFIX_DIR='${CT_CC_CORE_SHARED_PREFIX_DIR}'"
+	    CT_Pushd "${CT_CC_CORE_SHARED_PREFIX_DIR}"
+	    CT_DoExecLog DEBUG tar cv${tar_opt}f "${state_dir}/cc_core_shared_prefix_dir.tar${tar_ext}" .
+	    CT_Popd
+    fi
+
+    if [ -d ${CT_PREFIX_DIR} ]; then
+        CT_DoLog DEBUG "  Saving CT_PREFIX_DIR='${CT_PREFIX_DIR}'"
+        CT_Pushd "${CT_PREFIX_DIR}"
+        CT_DoExecLog DEBUG tar cv${tar_opt}f "${state_dir}/prefix_dir.tar${tar_ext}" --exclude '*.log' .
+        CT_Popd
+    fi
 
     if [ "${CT_LOG_TO_FILE}" = "y" ]; then
         CT_DoLog DEBUG "  Saving log file"
         exec >/dev/null
+
         case "${CT_DEBUG_CT_SAVE_STEPS_GZIP}" in
             y)  gzip -3 -c "${CT_LOG_FILE}"  >"${state_dir}/log.gz";;
             *)  cat "${CT_LOG_FILE}" >"${state_dir}/log";;
@@ -992,25 +1001,33 @@ CT_DoLoadState(){
     CT_DoForceRmdir             "${CT_PREFIX_DIR}" "${CT_CC_CORE_SHARED_PREFIX_DIR}" "${CT_CC_CORE_STATIC_PREFIX_DIR}" "${CT_CONFIG_DIR}"
     CT_DoExecLog DEBUG mkdir -p "${CT_PREFIX_DIR}" "${CT_CC_CORE_SHARED_PREFIX_DIR}" "${CT_CC_CORE_STATIC_PREFIX_DIR}" "${CT_CONFIG_DIR}"
 
-    CT_DoLog DEBUG "  Restoring CT_PREFIX_DIR='${CT_PREFIX_DIR}'"
-    CT_Pushd "${CT_PREFIX_DIR}"
-    CT_DoExecLog DEBUG tar xv${tar_opt}f "${state_dir}/prefix_dir.tar${tar_ext}"
-    CT_Popd
-
-    CT_DoLog DEBUG "  Restoring CT_CC_CORE_SHARED_PREFIX_DIR='${CT_CC_CORE_SHARED_PREFIX_DIR}'"
-    CT_Pushd "${CT_CC_CORE_SHARED_PREFIX_DIR}"
-    CT_DoExecLog DEBUG tar xv${tar_opt}f "${state_dir}/cc_core_shared_prefix_dir.tar${tar_ext}"
-    CT_Popd
-
-    CT_DoLog DEBUG "  Restoring CT_CC_CORE_STATIC_PREFIX_DIR='${CT_CC_CORE_STATIC_PREFIX_DIR}'"
-    CT_Pushd "${CT_CC_CORE_STATIC_PREFIX_DIR}"
-    CT_DoExecLog DEBUG tar xv${tar_opt}f "${state_dir}/cc_core_static_prefix_dir.tar${tar_ext}"
-    CT_Popd
-
-    CT_DoLog DEBUG "  Restoring CT_CONFIG_DIR='${CT_CONFIG_DIR}'"
-    CT_Pushd "${CT_CONFIG_DIR}"
-    CT_DoExecLog DEBUG tar xv${tar_opt}f "${state_dir}/config_dir.tar${tar_ext}"
-    CT_Popd
+    if [ -f "${state_dir}/prefix_dir.tar${tar_ext}" ]; then
+        CT_DoLog DEBUG "  Restoring CT_PREFIX_DIR='${CT_PREFIX_DIR}'"
+        CT_Pushd "${CT_PREFIX_DIR}"
+        CT_DoExecLog DEBUG tar xv${tar_opt}f "${state_dir}/prefix_dir.tar${tar_ext}"
+        CT_Popd
+    fi
+
+    if [ -f "${state_dir}/cc_core_shared_prefix_dir.tar${tar_ext}" ]; then
+        CT_DoLog DEBUG "  Restoring CT_CC_CORE_SHARED_PREFIX_DIR='${CT_CC_CORE_SHARED_PREFIX_DIR}'"
+        CT_Pushd "${CT_CC_CORE_SHARED_PREFIX_DIR}"
+        CT_DoExecLog DEBUG tar xv${tar_opt}f "${state_dir}/cc_core_shared_prefix_dir.tar${tar_ext}"
+        CT_Popd
+    fi
+
+    if [ -f "${state_dir}/cc_core_static_prefix_dir.tar${tar_ext}" ]; then
+        CT_DoLog DEBUG "  Restoring CT_CC_CORE_STATIC_PREFIX_DIR='${CT_CC_CORE_STATIC_PREFIX_DIR}'"
+        CT_Pushd "${CT_CC_CORE_STATIC_PREFIX_DIR}"
+        CT_DoExecLog DEBUG tar xv${tar_opt}f "${state_dir}/cc_core_static_prefix_dir.tar${tar_ext}"
+        CT_Popd
+    fi
+
+    if [ -f "${state_dir}/config_dir.tar${tar_ext}" ]; then
+        CT_DoLog DEBUG "  Restoring CT_CONFIG_DIR='${CT_CONFIG_DIR}'"
+        CT_Pushd "${CT_CONFIG_DIR}"
+        CT_DoExecLog DEBUG tar xv${tar_opt}f "${state_dir}/config_dir.tar${tar_ext}"
+        CT_Popd
+    fi
 
     # Restore the environment, discarding any error message
     # (for example, read-only bash internals)

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 01/19] Add option to not install the wrapper scripts
       [not found] <20100409190419.325379428@bohmer.net>
                   ` (7 preceding siblings ...)
  2010-04-09 19:33 ` [CT-NG:patch 12/19] Add mingw target libraries Remy Bohmer
@ 2010-04-09 19:33 ` 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 04/19] Update check for need of g++ Remy Bohmer
                   ` (9 subsequent siblings)
  18 siblings, 2 replies; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:33 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc

[-- Attachment #1: remove-wrapper-for-mingw-host.patch --]
[-- Type: text/plain, Size: 5668 bytes --]

On certain hosts (ie. mingw) the default wrapper scripts and binary do not work
due to incompatible paths, path syntax, executable extensions

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
---
 config/companion_libs.in   |   14 +++++++-
 scripts/build/internals.sh |   78 +++++++++++++++++++++++----------------------
 2 files changed, 53 insertions(+), 39 deletions(-)

Index: crosstool-ng/config/companion_libs.in
===================================================================
--- crosstool-ng.orig/config/companion_libs.in
+++ crosstool-ng/config/companion_libs.in
@@ -196,7 +196,7 @@ choice
     bool
     prompt "|  Install tools wrapper as:"
     depends on WRAPPER_NEEDED
-    default TOOLS_WRAPPER_SHELL
+    default TOOLS_WRAPPER_SCRIPT
 
 config TOOLS_WRAPPER_SCRIPT
     bool
@@ -216,11 +216,23 @@ config TOOLS_WRAPPER_EXEC
       
       See docs/overview.txt, section "Tools wrapper".
 
+config TOOLS_WRAPPER_NONE
+    bool
+    prompt "none"
+    help
+      If for you're host it is known that the wrapper script and executable
+      do not work, then you should say 'Y' here.
+      Manual actions need to be taken on the host to verify that the correct
+      libraries are used run-time.
+
+      See docs/overview.txt, section "Tools wrapper".
+
 endchoice
 
 config TOOLS_WRAPPER
     string
     default "script" if TOOLS_WRAPPER_SCRIPT
     default "exec"   if TOOLS_WRAPPER_EXEC
+    default "none"   if TOOLS_WRAPPER_NONE
 
 endmenu
Index: crosstool-ng/scripts/build/internals.sh
===================================================================
--- crosstool-ng.orig/scripts/build/internals.sh
+++ crosstool-ng/scripts/build/internals.sh
@@ -39,44 +39,46 @@ do_finish() {
     # If using the companion libraries, we need a wrapper
     # that will set LD_LIBRARY_PATH approriately
     if [ "${CT_WRAPPER_NEEDED}" = "y" ]; then
-        CT_DoLog EXTRA "Installing toolchain wrappers"
-        CT_Pushd "${CT_PREFIX_DIR}/bin"
-
-        # Install the wrapper
-        case "${CT_TOOLS_WRAPPER}" in
-            script)
-                CT_DoExecLog DEBUG install                              \
-                                   -m 0755                              \
-                                   "${CT_LIB_DIR}/scripts/wrapper.in"   \
-                                   ".${CT_TARGET}-wrapper"
-                ;;
-            exec)
-                _t="-s"
-                if [ "${CT_DEBUG_CT}" = "y" ]; then
-                  _t="" # If debugging crosstool-NG, don't strip the wrapper
-                fi
-                CT_DoExecLog DEBUG "${CT_HOST}-gcc"                           \
-                                   -Wall -Wextra -Wunreachable-code -Werror   \
-                                   -O3 -static ${_t}                          \
-                                   "${CT_LIB_DIR}/scripts/wrapper.c"          \
-                                   -o ".${CT_TARGET}-wrapper"
-                ;;
-        esac
-
-        # Replace every tools with the wrapper
-        # Do it unconditionally, even for those tools that happen to be shell
-        # scripts, we don't know if they would in the end spawn a binary...
-        # Just skip symlinks
-        for _t in "${CT_TARGET}-"*; do
-            if [ "$( LANG=C stat -c '%F' "${_t}" )" != "symbolic link" ]; then
-                CT_DoExecLog ALL mv "${_t}" ".${_t}"
-                CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${_t}"
-            fi
-        done
-
-        # Get rid of the wrapper, we're using hardlinks
-        CT_DoExecLog DEBUG rm -f ".${CT_TARGET}-wrapper"
-        CT_Popd
+        if [ "${CT_TOOLS_WRAPPER}" != "none" ]; then
+          CT_DoLog EXTRA "Installing toolchain wrappers"
+          CT_Pushd "${CT_PREFIX_DIR}/bin"
+
+          # Install the wrapper
+          case "${CT_TOOLS_WRAPPER}" in
+              script)
+                  CT_DoExecLog DEBUG install                              \
+                                     -m 0755                              \
+                                     "${CT_LIB_DIR}/scripts/wrapper.in"   \
+                                     ".${CT_TARGET}-wrapper"
+                  ;;
+              exec)
+                  _t="-s"
+                  if [ "${CT_DEBUG_CT}" = "y" ]; then
+                    _t="" # If debugging crosstool-NG, don't strip the wrapper
+                  fi
+                  CT_DoExecLog DEBUG "${CT_HOST}-gcc"                           \
+                                     -Wall -Wextra -Wunreachable-code -Werror   \
+                                     -O3 -static ${_t}                          \
+                                     "${CT_LIB_DIR}/scripts/wrapper.c"          \
+                                     -o ".${CT_TARGET}-wrapper"
+                  ;;
+          esac
+
+          # Replace every tools with the wrapper
+          # Do it unconditionally, even for those tools that happen to be shell
+          # scripts, we don't know if they would in the end spawn a binary...
+          # Just skip symlinks
+          for _t in "${CT_TARGET}-"*; do
+              if [ "$( LANG=C stat -c '%F' "${_t}" )" != "symbolic link" ]; then
+                  CT_DoExecLog ALL mv "${_t}" ".${_t}"
+                  CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${_t}"
+              fi
+          done
+
+          # Get rid of the wrapper, we're using hardlinks
+          CT_DoExecLog DEBUG rm -f ".${CT_TARGET}-wrapper"
+          CT_Popd
+      fi
     fi
 
     CT_DoLog EXTRA "Removing access to the build system tools"

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 10/19] Add ARCH_CPU for m68k architecture
       [not found] <20100409190419.325379428@bohmer.net>
  2010-04-09 19:33 ` [CT-NG:patch 06/19] Update CT_DoSaveState and CT_DoRestoreState to check for existence 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-09 19:33 ` 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
                   ` (15 subsequent siblings)
  18 siblings, 1 reply; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:33 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc, Remy Bohmer

[-- Attachment #1: update-m68k-config.patch --]
[-- Type: text/plain, Size: 4096 bytes --]

Add config option to configure the ARCH_CPU define for
the m68k CPU's that we known

Signed-off-by: Remy Bohmer <linux@bohmer.net>
---
 config/arch/m68k.in |  176 ++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 170 insertions(+), 6 deletions(-)

Index: crosstool-ng/config/arch/m68k.in
===================================================================
--- crosstool-ng.orig/config/arch/m68k.in
+++ crosstool-ng/config/arch/m68k.in
@@ -2,9 +2,173 @@
 # depends on EXPERIMENTAL
 
 config ARCH_m68k
-    select ARCH_SUPPORTS_32
-    select ARCH_DEFAULT_32
-    select ARCH_DEFAULT_BE
-    select ARCH_SUPPORT_CPU
-     help
-      The m68k architecture
+	select ARCH_SUPPORT_CPU
+	select ARCH_SUPPORTS_32
+	select ARCH_DEFAULT_32
+	select ARCH_DEFAULT_BE
+	help
+	  The Motorola 68k architecture (http://) or
+	  The Freescale Coldfire architecture (http://)
+
+choice
+	bool
+	prompt "CPU"
+
+config ARCH_CPU_68000
+	bool
+	prompt "Motorola 68000"
+
+config ARCH_CPU_68010
+	bool
+	prompt "Motorola 68010"
+
+config ARCH_CPU_68020
+	bool
+	prompt "Motorola 68020"
+
+config ARCH_CPU_68030
+	bool
+	prompt "Motorola 68030"
+
+config ARCH_CPU_68040
+	bool
+	prompt "Motorola 68040"
+
+config ARCH_CPU_68060
+	bool
+	prompt "Motorola 68060"
+
+config ARCH_CPU_68302
+	bool
+	prompt "Motorola 68302"
+
+config ARCH_CPU_68332
+	bool
+	prompt "Motorola 68332"
+
+config ARCH_CPU_CPU32
+	bool
+	prompt "Motorola cpu32"
+
+config ARCH_CPU_51QE
+	bool
+	prompt "ColdFire 51qe"
+
+config ARCH_CPU_5206
+	bool
+	prompt "ColdFire 5202, 5204, 5206"
+
+config ARCH_CPU_5206E
+	bool
+	prompt "ColdFire 5206e"
+
+config ARCH_CPU_5208
+	bool
+	prompt "ColdFire 5207, 5208"
+
+config ARCH_CPU_5211A
+	bool
+	prompt "ColdFire 5210a, 5211a"
+
+config ARCH_CPU_5213
+	bool
+	prompt "ColdFire 5211, 5212, 5213"
+
+config ARCH_CPU_5216
+	bool
+	prompt "ColdFire 5214, 5216"
+
+config ARCH_CPU_52235
+	bool
+	prompt "ColdFire 52230, 52231, 52232, 52233, 52234, 52235"
+
+config ARCH_CPU_5225
+	bool
+	prompt "ColdFire 5224, 5225"
+
+config ARCH_CPU_5235
+	bool
+	prompt "ColdFire 5232, 5233, 5234, 5235, 523x"
+
+config ARCH_CPU_5249
+	bool
+	prompt "ColdFire 5249"
+
+config ARCH_CPU_5250
+	bool
+	prompt "ColdFire 5250"
+
+config ARCH_CPU_5271
+	bool
+	prompt "ColdFire 5270, 5271"
+
+config ARCH_CPU_5272
+	bool
+	prompt "ColdFire 5272"
+
+config ARCH_CPU_5275
+	bool
+	prompt "ColdFire 5274, 5275"
+
+config ARCH_CPU_5282
+	bool
+	prompt "ColdFire 5280, 5281, 5282, 528x"
+
+config ARCH_CPU_5307
+	bool
+	prompt "ColdFire 5307"
+
+config ARCH_CPU_5329
+	bool
+	prompt "ColdFire 5327, 5328, 5329, 532x"
+
+config ARCH_CPU_5373
+	bool
+	prompt "ColdFire 5372, 5373, 537x"
+
+config ARCH_CPU_5407
+	bool
+	prompt "ColdFire 5407"
+
+config ARCH_CPU_5475
+	bool
+	prompt "ColdFire 547x, 548x"
+	help
+	  5470, 5471, 5472, 5473, 5474, 5475, 547x, 5480, 5481, 5482, 5483,
+	  5484, 5485
+
+endchoice
+
+config ARCH_CPU
+	string
+	default "68000"  if ARCH_CPU_68000
+	default "68010"  if ARCH_CPU_68010
+	default "68020"  if ARCH_CPU_68020
+	default "68030"  if ARCH_CPU_68030
+	default "68040"  if ARCH_CPU_68040
+	default "68060"  if ARCH_CPU_68060
+	default "68302"  if ARCH_CPU_68302
+	default "68332"  if ARCH_CPU_68332
+	default "cpu32"  if ARCH_CPU_CPU32
+	default "51qe"   if ARCH_CPU_51QE
+	default "5206"   if ARCH_CPU_5206
+	default "5206e"  if ARCH_CPU_5206E
+	default "5208"   if ARCH_CPU_5208
+	default "5211a"  if ARCH_CPU_5211A
+	default "5213"   if ARCH_CPU_5213
+	default "5216"   if ARCH_CPU_5216
+	default "52235"  if ARCH_CPU_52235
+	default "5225"   if ARCH_CPU_5225
+	default "5235"   if ARCH_CPU_5235
+	default "5249"   if ARCH_CPU_5249
+	default "5250"   if ARCH_CPU_5250
+	default "5271"   if ARCH_CPU_5271
+	default "5272"   if ARCH_CPU_5272
+	default "5275"   if ARCH_CPU_5275
+	default "5282"   if ARCH_CPU_5282
+	default "5307"   if ARCH_CPU_5307
+	default "5329"   if ARCH_CPU_5329
+	default "5373"   if ARCH_CPU_5373
+	default "5407"   if ARCH_CPU_5407
+	default "5475"   if ARCH_CPU_5475
+

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 03/19] Build candian baremetal compiler
       [not found] <20100409190419.325379428@bohmer.net>
                   ` (2 preceding siblings ...)
  2010-04-09 19:33 ` [CT-NG:patch 10/19] Add ARCH_CPU for m68k architecture Remy Bohmer
@ 2010-04-09 19:33 ` Remy Bohmer
  2010-04-11 13:40   ` Yann E. MORIN
  2010-04-09 19:33 ` [CT-NG:patch 13/19] Add Linux - Mingw32 sample Remy Bohmer
                   ` (14 subsequent siblings)
  18 siblings, 1 reply; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:33 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc

[-- Attachment #1: several-canadian-build-fixes.patch --]
[-- Type: text/plain, Size: 2867 bytes --]

Previous addition of the canadian cross compiler did not allow
to build a baremetal only variant, no reason why this is not
allowed

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
---
 scripts/build/cc/gcc.sh |   29 ++++++++++-------------------
 1 file changed, 10 insertions(+), 19 deletions(-)

Index: crosstool-ng/scripts/build/cc/gcc.sh
===================================================================
--- crosstool-ng.orig/scripts/build/cc/gcc.sh
+++ crosstool-ng/scripts/build/cc/gcc.sh
@@ -41,35 +41,31 @@ do_cc_extract() {
 #------------------------------------------------------------------------------
 # Core gcc pass 1
 do_cc_core_pass_1() {
-    # If we're building a canadian compiler no use to build the CC
-    # core compiler, we're not using it
-    [ -n "${CT_CANADIAN}" ] && return 0
-
     # If we're building for bare metal, build the static core gcc,
     # with libgcc.
+    # In case we're not bare metal and building a canadian compiler, do nothing
     # In case we're not bare metal, and we're NPTL, build the static core gcc.
     # In any other case, do nothing.
-    case "${CT_BARE_METAL},${CT_THREADS}" in
-        y,*)    do_cc_core mode=baremetal build_libgcc=yes;;
-        ,nptl)  do_cc_core mode=static build_libgcc=no;;
+    case "${CT_BARE_METAL},${CT_CANADIAN},${CT_THREADS}" in
+        y,*,*)  do_cc_core mode=baremetal build_libgcc=yes;;
+        ,y,*)   ;;
+        ,,nptl) do_cc_core mode=static build_libgcc=no;;
         *)      ;;
     esac
 }
 
 # Core gcc pass 2
 do_cc_core_pass_2() {
-    # If we're building a canadian compiler no use to build the CC
-    # core compiler, we're not using it
-    [ -n "${CT_CANADIAN}" ] && return 0
-
     # In case we're building for bare metal, do nothing, we already have
     # our compiler.
+    # In case we're not bare metal and building a canadian compiler, do nothing
     # In case we're NPTL, build the shared core gcc and the target libgcc.
     # In any other case, build the static core gcc and, if using gcc-4.3+,
     # also build the target libgcc.
-    case "${CT_BARE_METAL},${CT_THREADS}" in
-        y,*)    ;;
-        ,nptl)
+    case "${CT_BARE_METAL},${CT_CANADIAN},${CT_THREADS}" in
+        y,*,*)   ;;
+        ,y,*)    ;;
+        ,,nptl)
             do_cc_core mode=shared build_libgcc=yes
             ;;
         *)  if [ "${CT_CC_GCC_4_3_or_later}" = "y" ]; then
@@ -233,11 +229,6 @@ do_cc_core() {
             install_rules="install-gcc"
     fi   # ! build libgcc
 
-    if [ "${CT_CANADIAN}" = "y" ]; then
-        CT_DoLog EXTRA "Building libiberty"
-        CT_DoExecLog ALL make ${PARALLELMFLAGS} all-build-libiberty
-    fi
-
     CT_DoLog EXTRA "Building ${mode} core C compiler"
     CT_DoExecLog ALL make ${PARALLELMFLAGS} ${build_rules}
 

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 05/19] Force autoreconf for mpfr
       [not found] <20100409190419.325379428@bohmer.net>
                   ` (5 preceding siblings ...)
  2010-04-09 19:33 ` [CT-NG:patch 11/19] Add mingw as kernel type Remy Bohmer
@ 2010-04-09 19:33 ` 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 12/19] Add mingw target libraries Remy Bohmer
                   ` (11 subsequent siblings)
  18 siblings, 2 replies; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:33 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc

[-- Attachment #1: force-autoreconf-for-mpfr.patch --]
[-- Type: text/plain, Size: 1069 bytes --]

In some exotic case the autoreconf step of mpfr is not executed (correctly)
leaving an incorrect version number for libtool in the configure script.

After extracting the sources files, force autoreconf to be executed.

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
---
 scripts/build/companion_libs/mpfr.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: crosstool-ng/scripts/build/companion_libs/mpfr.sh
===================================================================
--- crosstool-ng.orig/scripts/build/companion_libs/mpfr.sh
+++ crosstool-ng/scripts/build/companion_libs/mpfr.sh
@@ -34,7 +34,7 @@ do_mpfr_extract() {
             CT_Pushd "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}"
             if [ ! -f .autoreconf.ct-ng ]; then
                 CT_DoLog DEBUG "Running autoreconf"
-                CT_DoExecLog ALL autoreconf
+                CT_DoExecLog ALL autoreconf -fi
                 touch .autoreconf.ct-ng
             fi
             CT_Popd

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 08/19] Prevent trailing - in CT_TARGET
       [not found] <20100409190419.325379428@bohmer.net>
                   ` (15 preceding siblings ...)
  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 ` 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-09 19:34 ` [CT-NG:patch 19/19] The m68k processor does not like unaligned access in memcpy Remy Bohmer
  18 siblings, 1 reply; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:34 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc

[-- Attachment #1: prevent_trailing_-_in_CT_TARGET.patch --]
[-- Type: text/plain, Size: 1193 bytes --]

Not all target tuples consist of an VENDOR, KERNEL and SYSTEM part, build up the
tuple in such a way to no extra or trailing dashes are added to CT_TARGET

Signed-off-by: Bart vdr Meulen <bartvdrmeulen@gmail.com>
---
 scripts/functions |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: crosstool-ng/scripts/functions
===================================================================
--- crosstool-ng.orig/scripts/functions
+++ crosstool-ng/scripts/functions
@@ -870,10 +870,10 @@ CT_DoBuildTargetTuple() {
     CT_DoKernelTupleValues
 
     # Finish the target tuple construction
-    CT_TARGET="${CT_TARGET_ARCH}-"
-    CT_TARGET="${CT_TARGET}${CT_TARGET_VENDOR:+${CT_TARGET_VENDOR}-}"
-    CT_TARGET="${CT_TARGET}${CT_TARGET_KERNEL:+${CT_TARGET_KERNEL}-}"
-    CT_TARGET="${CT_TARGET}${CT_TARGET_SYS}"
+    CT_TARGET="${CT_TARGET_ARCH}"
+    CT_TARGET="${CT_TARGET}${CT_TARGET_VENDOR:+-${CT_TARGET_VENDOR}}"
+    CT_TARGET="${CT_TARGET}${CT_TARGET_KERNEL:+-${CT_TARGET_KERNEL}}"
+    CT_TARGET="${CT_TARGET}${CT_TARGET_SYS:+-${CT_TARGET_SYS}}"
 
     # Sanity checks
     __sed_alias=""

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 17/19] Fix linking of PPL (it does not link with  stdc++ automaticly)
       [not found] <20100409190419.325379428@bohmer.net>
                   ` (13 preceding siblings ...)
  2010-04-09 19:34 ` [CT-NG:patch 15/19] First setup for cygwin as target Remy Bohmer
@ 2010-04-09 19:34 ` Remy Bohmer
  2010-04-09 19:34 ` [CT-NG:patch 18/19] Fix wrong host compiler usage on canadian build with baremetal target Remy Bohmer
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:34 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc

[-- Attachment #1: build-cloog-with-stdcxx-for-mingw.patch --]
[-- Type: text/plain, Size: 2036 bytes --]

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
---
 scripts/build/cc/gcc.sh               |    4 ++++
 scripts/build/companion_libs/cloog.sh |    9 ++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

Index: crosstool-ng/scripts/build/companion_libs/cloog.sh
===================================================================
--- crosstool-ng.orig/scripts/build/companion_libs/cloog.sh
+++ crosstool-ng/scripts/build/companion_libs/cloog.sh
@@ -48,6 +48,13 @@ do_cloog() {
 
     CT_DoStep INFO "Installing CLooG/ppl"
 
+    cloog_opt=
+    # Appearantly under Mingw ppl won't link with stdc++ automaticly
+    case "${CT_HOST}" in
+        *mingw*)    cloog_opt="--with-host-libstdcxx=-lstdc++";;
+        *)          cloog_opt="";;
+    esac
+
     CT_DoLog EXTRA "Configuring CLooG/ppl"
     CFLAGS="${CT_CFLAGS_FOR_HOST}"              \
     CT_DoExecLog ALL                            \
@@ -57,10 +64,10 @@ do_cloog() {
         --prefix="${CT_PREFIX_DIR}"             \
         --with-gmp="${CT_PREFIX_DIR}"           \
         --with-ppl="${CT_PREFIX_DIR}"           \
+	${cloog_opt}                            \
         --enable-shared                         \
         --disable-static                        \
         --with-bits=gmp
-
     CT_DoLog EXTRA "Building CLooG/ppl"
     CT_DoExecLog ALL make ${PARALLELMFLAGS}
 
Index: crosstool-ng/scripts/build/cc/gcc.sh
===================================================================
--- crosstool-ng.orig/scripts/build/cc/gcc.sh
+++ crosstool-ng/scripts/build/cc/gcc.sh
@@ -315,6 +315,10 @@ do_cc() {
         extra_config+=("--with-ppl=${CT_PREFIX_DIR}")
         extra_config+=("--with-cloog=${CT_PREFIX_DIR}")
         extra_config+=("--with-mpc=${CT_PREFIX_DIR}")
+        case "${CT_HOST}" in
+            *mingw*)    extra_config+=("--with-host-libstdcxx=-lstdc++");;
+            *)          ;;
+        esac
     fi
 
     if [ "${CT_THREADS}" = "none" ]; then

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 19/19] The m68k processor does not like unaligned  access in memcpy
       [not found] <20100409190419.325379428@bohmer.net>
                   ` (17 preceding siblings ...)
  2010-04-09 19:34 ` [CT-NG:patch 14/19] add bugurl and compiler version to core gcc compiler Remy Bohmer
@ 2010-04-09 19:34 ` Remy Bohmer
  2010-04-12 20:56   ` Yann E. MORIN
  18 siblings, 1 reply; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:34 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc, Remy Bohmer

[-- Attachment #1: fix-unaligned-access-m68k.patch --]
[-- Type: text/plain, Size: 1582 bytes --]

Disable unaligned access at least for mcpu32, m68010 and m68020.
These processors certainly do not like unaligned accesses.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
---
 patches/newlib/1.18.0/100-fix-unaligned-access-memcpy-m68k.patch |   23 ++++++++++
 1 file changed, 23 insertions(+)

Index: crosstool-ng/patches/newlib/1.18.0/100-fix-unaligned-access-memcpy-m68k.patch
===================================================================
--- /dev/null
+++ crosstool-ng/patches/newlib/1.18.0/100-fix-unaligned-access-memcpy-m68k.patch
@@ -0,0 +1,23 @@
+The m68k mcpu processor does not like unaligned access
+
+Disable at least mcpu32, m68010 and m68020. These processors certainly
+do not like unaligned accesses.
+
+Signed-off-by: Remy Bohmer <linux@bohmer.net>
+---
+ newlib/libc/machine/m68k/memcpy.S |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: newlib-1.18.0/newlib/libc/machine/m68k/memcpy.S
+===================================================================
+--- newlib-1.18.0.orig/newlib/libc/machine/m68k/memcpy.S
++++ newlib-1.18.0/newlib/libc/machine/m68k/memcpy.S
+@@ -15,7 +15,7 @@
+ 
+ #include "m68kasm.h"
+ 
+-#if defined (__mcoldfire__) || defined (__mcpu32__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__)
++#if defined (__mcoldfire__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__)
+ # define MISALIGNED_OK 1
+ #else
+ # define MISALIGNED_OK 0

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 18/19] Fix wrong host compiler usage on canadian  build with baremetal target
       [not found] <20100409190419.325379428@bohmer.net>
                   ` (14 preceding siblings ...)
  2010-04-09 19:34 ` [CT-NG:patch 17/19] Fix linking of PPL (it does not link with stdc++ automaticly) Remy Bohmer
@ 2010-04-09 19:34 ` Remy Bohmer
  2010-04-09 19:34 ` [CT-NG:patch 08/19] Prevent trailing - in CT_TARGET Remy Bohmer
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:34 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc, Remy Bohmer

[-- Attachment #1: fix-canadian-baremetal-compiler-build-for-win32-hosts.patch --]
[-- Type: text/plain, Size: 1727 bytes --]

While compiling a canadian toolchain for host=mingw32, build=linux,
target=m68k-elf the build fails because in this step of the gcc build
the Host compiler is used in this stage with the build-flags for the
build system. This results in an error where the header <sys/wait.h>
cannot be found.
This problem happens at least in the GCC-4.3.x and GCC-4.4.x range.

This is solved by passing the proper compilers on the Make cmd-line

Signed-off-by: Remy Bohmer <linux@bohmer.net>
---
 scripts/build/cc/gcc.sh |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

Index: crosstool-ng/scripts/build/cc/gcc.sh
===================================================================
--- crosstool-ng.orig/scripts/build/cc/gcc.sh
+++ crosstool-ng/scripts/build/cc/gcc.sh
@@ -228,7 +228,19 @@ do_cc_core() {
             install_rules="install-gcc"
         fi
 
-        CT_DoExecLog ALL make ${PARALLELMFLAGS} -C gcc ${libgcc_rule}
+        # On bare metal and canadian build the host-compiler is used when
+        # actually the build-system compiler is required. Choose the correct
+        # compilers for canadian build and use the defaults on other
+        # configurations.
+        if [ "${CT_BARE_METAL},${CT_CANADIAN}" = "y,y" ]; then
+            repair_cc="CC_FOR_BUILD=${CT_BUILD}-gcc \
+                       GCC_FOR_TARGET=${CT_TARGET}-gcc"
+        else
+            repair_cc=""
+        fi
+
+        CT_DoExecLog ALL make ${PARALLELMFLAGS} -C gcc ${libgcc_rule} \
+                              ${repair_cc}
         sed -r -i -e 's@-lc@@g' gcc/${libgcc_rule}
     else # build_libgcc
             build_rules="all-gcc"

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 14/19] add bugurl and compiler version to core gcc  compiler
       [not found] <20100409190419.325379428@bohmer.net>
                   ` (16 preceding siblings ...)
  2010-04-09 19:34 ` [CT-NG:patch 08/19] Prevent trailing - in CT_TARGET Remy Bohmer
@ 2010-04-09 19:34 ` Remy Bohmer
  2010-04-11 15:50   ` Yann E. MORIN
  2010-04-09 19:34 ` [CT-NG:patch 19/19] The m68k processor does not like unaligned access in memcpy Remy Bohmer
  18 siblings, 1 reply; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:34 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc, Remy Bohmer

[-- Attachment #1: add-bugurl-to-stage1-gcc.patch --]
[-- Type: text/plain, Size: 1112 bytes --]

When building for bare-metal the core-gcc compiler is delivered
as final compiler, so the version info and bugurl is useful
in the core compiler as well.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
---
 scripts/build/cc/gcc.sh |    4 ++++
 1 file changed, 4 insertions(+)

Index: crosstool-ng/scripts/build/cc/gcc.sh
===================================================================
--- crosstool-ng.orig/scripts/build/cc/gcc.sh
+++ crosstool-ng/scripts/build/cc/gcc.sh
@@ -129,6 +129,10 @@ do_cc_core() {
             ;;
     esac
 
+    # Bare metal delivers the core compiler as final compiler, so add version info and bugurl
+    [ -n "${CT_CC_BUGURL}" ]     && extra_config+=("--with-bugurl=${CT_CC_BUGURL}")
+    [ -n "${CT_CC_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_CC_PKGVERSION}")
+
     if [ "${copy_headers}" = "y" ]; then
         CT_DoLog DEBUG "Copying headers to install area of bootstrap gcc, so it can build libgcc2"
         CT_DoExecLog ALL mkdir -p "${core_prefix_dir}/${CT_TARGET}/include"

-- 


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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [CT-NG:patch 15/19] First setup for cygwin as target
       [not found] <20100409190419.325379428@bohmer.net>
                   ` (12 preceding siblings ...)
  2010-04-09 19:33 ` [CT-NG:patch 16/19] Fix PPL build for MINGW Remy Bohmer
@ 2010-04-09 19:34 ` Remy Bohmer
  2010-04-11 20:30   ` Yann E. MORIN
  2010-04-09 19:34 ` [CT-NG:patch 17/19] Fix linking of PPL (it does not link with stdc++ automaticly) Remy Bohmer
                   ` (4 subsequent siblings)
  18 siblings, 1 reply; 43+ messages in thread
From: Remy Bohmer @ 2010-04-09 19:34 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bart vdr. Meulen, crossgcc

[-- 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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 01/19] Add option to not install the wrapper scripts
  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
  1 sibling, 0 replies; 43+ messages in thread
From: Arnaud Lacombe @ 2010-04-09 22:25 UTC (permalink / raw)
  To: Remy Bohmer; +Cc: Yann E. MORIN, crossgcc

Hi,

On Fri, Apr 9, 2010 at 3:04 PM, Remy Bohmer <linux@bohmer.net> wrote:
> On certain hosts (ie. mingw) the default wrapper scripts and binary do not work
> due to incompatible paths, path syntax, executable extensions
>
Why not making the script/exec MinGW-friendly ?

I find dangerous to offer that option to everyone. If mingw
specifically has to disable the wrapper (ie. if it can't be fixed),
this can certainly be done in pure kconfig logic (!FOO_MINGW at the
right place), without touching the build script. Having both
${CT_WRAPPER_NEEDED} and ${CT_TOOLS_WRAPPER_NONE} set seems quite
illogical to me.

Note that this wrapper stuff can be worked around by using the patch I
send in a previous thread[0]. Yann, do you want a clean version of
that patch ?

Thanks,
 - Arnaud

[0]: http://sourceware.org/ml/crossgcc/2010-04/msg00008.html

> Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
> ---
>  config/companion_libs.in   |   14 +++++++-
>  scripts/build/internals.sh |   78 +++++++++++++++++++++++----------------------
>  2 files changed, 53 insertions(+), 39 deletions(-)
>

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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 01/19] Add option to not install the wrapper scripts
  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
  1 sibling, 0 replies; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-11 13:20 UTC (permalink / raw)
  To: Remy Bohmer; +Cc: Bart vdr. Meulen, crossgcc, Arnaud Lacombe

Remy, Bart, Arnaud, All,

On Friday 09 April 2010 21:04:20 Remy Bohmer wrote:
> On certain hosts (ie. mingw) the default wrapper scripts and binary do not work
> due to incompatible paths, path syntax, executable extensions

As Arnaud said previously, offering the option 'none' when at the same time
the wrapper is needed is a bit dubious.

Now that I managed to properly build the companion libraries statically [*]
and link gcc (and the others) against those, then the wrapper is no longer
required. I kept the ability to build static/shared libraries, and the
wrapper is now installed only if shared libs are built.

So this patch is no longer needed, or so I hope. :-)

Regards,
Yann E. MORIN.

[*] will be pushed soon, I still have a few stuff to polish.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 02/19] Symlink to cc not always installed correctly
  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
  0 siblings, 0 replies; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-11 13:26 UTC (permalink / raw)
  To: Remy Bohmer; +Cc: Bart vdr. Meulen, crossgcc

Remy, Bart, All,

On Friday 09 April 2010 21:04:21 Remy Bohmer wrote:
> When building an cross-compiler for a host which depends
> on file extensions the symlink for cc was not installed correctly

Yes, this is needed. But a typo and a few style fixes...

> Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
> ---
>  scripts/build/cc/gcc.sh |   18 ++++++++++++++++--
>  1 file changed, 16 insertions(+), 2 deletions(-)
> 
> Index: crosstool-ng/scripts/build/cc/gcc.sh
> ===================================================================
> --- crosstool-ng.orig/scripts/build/cc/gcc.sh
> +++ crosstool-ng/scripts/build/cc/gcc.sh
> @@ -246,7 +246,14 @@ do_cc_core() {
>  
>      # Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-gcc to always be able
>      # to call the C compiler with the same, somewhat canonical name.
> -    CT_DoExecLog ALL ln -sv "${CT_TARGET}"-gcc "${core_prefix_dir}/bin/${CT_TARGET}"-cc
> +    # check whether compiler as an extension

as --> has

> +    file=$(ls -1 ${core_prefix_dir}/bin/${CT_TARGET}-gcc.* 2>/dev/null || echo "")

- Properly quote the filename you're listing.
- echo "" --> true

> +    if [ "x${file}" = "x" ]; then

the 'x' stuff is ugly. In this case: [ -z "${file}" ]

> +        CT_DoExecLog ALL ln -sv "${CT_TARGET}"-gcc "${core_prefix_dir}/bin/${CT_TARGET}"-cc
> +    else
> +        ext=${file##*.}
> +        CT_DoExecLog ALL ln -sv "${CT_TARGET}-gcc.${ext}" "${core_prefix_dir}/bin/${CT_TARGET}-cc.${ext}"
> +    fi
>  
>      CT_EndStep
>  }
> @@ -362,7 +369,14 @@ do_cc() {
>  
>      # Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-gcc to always be able
>      # to call the C compiler with the same, somewhat canonical name.
> -    CT_DoExecLog ALL ln -sv "${CT_TARGET}"-gcc "${CT_PREFIX_DIR}/bin/${CT_TARGET}"-cc
> +    # check whether compiler as an extension
> +    file=$(ls -1 ${CT_TARGET}/bin/${CT_TARGET}-gcc.* 2>/dev/null || echo "")
> +    if [ "x${file}" = "x" ]; then
> +        CT_DoExecLog ALL ln -sv "${CT_TARGET}"-gcc "${CT_PREFIX_DIR}/bin/${CT_TARGET}"-cc
> +    else
> +        ext=${file##*.}
> +        CT_DoExecLog ALL ln -sv "${CT_TARGET}-gcc.${ext}" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-cc.${ext}"
> +    fi

3x Ditto.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 03/19] Build candian baremetal compiler
  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>
  0 siblings, 1 reply; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-11 13:40 UTC (permalink / raw)
  To: Remy Bohmer; +Cc: Bart vdr. Meulen, crossgcc

Remy, Bart, All,

On Friday 09 April 2010 21:04:22 Remy Bohmer wrote:
> Previous addition of the canadian cross compiler did not allow
> to build a baremetal only variant, no reason why this is not
> allowed
> 
> Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
> ---
>  scripts/build/cc/gcc.sh |   29 ++++++++++-------------------
>  1 file changed, 10 insertions(+), 19 deletions(-)
> 
> Index: crosstool-ng/scripts/build/cc/gcc.sh
> ===================================================================
> --- crosstool-ng.orig/scripts/build/cc/gcc.sh
> +++ crosstool-ng/scripts/build/cc/gcc.sh
[--SNIP--]
> @@ -233,11 +229,6 @@ do_cc_core() {
>              install_rules="install-gcc"
>      fi   # ! build libgcc
>  
> -    if [ "${CT_CANADIAN}" = "y" ]; then
> -        CT_DoLog EXTRA "Building libiberty"
> -        CT_DoExecLog ALL make ${PARALLELMFLAGS} all-build-libiberty
> -    fi
> -

This chunk seems unrelated.

>      CT_DoLog EXTRA "Building ${mode} core C compiler"
>      CT_DoExecLog ALL make ${PARALLELMFLAGS} ${build_rules}

Looks good.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 04/19] Update check for need of g++
  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
  0 siblings, 0 replies; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-11 13:43 UTC (permalink / raw)
  To: Remy Bohmer; +Cc: Bart vdr. Meulen, crossgcc

Remy, Bart, All,

On Friday 09 April 2010 21:04:23 Remy Bohmer wrote:
> g++ is only needed when building additonal libs on the HOST,
> so check wheter g++ is available for the HOST compiler only
> 
> Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
> ---
>  scripts/crosstool-NG.sh.in |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> Index: crosstool-ng/scripts/crosstool-NG.sh.in
> ===================================================================
> --- crosstool-ng.orig/scripts/crosstool-NG.sh.in
> +++ crosstool-ng/scripts/crosstool-NG.sh.in
> @@ -416,11 +416,15 @@ if [ -z "${CT_RESTART}" ]; then
>              else
>                  case "${tool}" in
>                      # We'll at least need some of them...
> -                    ar|as|gcc|g++|ld|nm|objcopy|objdump|ranlib)
> +                    ar|as|gcc|ld|nm|objcopy|objdump|ranlib)
>                          CT_Abort "Missing: '${t}${tool}${!s}' or '${t}${tool}' or '${tool}' : either needed!"
>                          ;;
>                      # Some are conditionnally required
>                      # Add them in alphabetical (C locale) ordering
> +		    #g++ (needed for companion lib), only needed for HOST
> +		    g++)
> +			CT_TestAndAbort "Missing: '${t}${tool}${!s}' or '${t}${tool}' or '${tool}' : either needed!" "${m}" = "HOST"
> +			;;

Space-damage: use spaces, not tabs.

Looks good otherwise.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 05/19] Force autoreconf for mpfr
  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
  1 sibling, 0 replies; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-11 13:56 UTC (permalink / raw)
  To: Remy Bohmer; +Cc: Bart vdr. Meulen, crossgcc

Remy, Bar, All,

On Friday 09 April 2010 21:04:24 Remy Bohmer wrote:
> In some exotic case the autoreconf step of mpfr is not executed (correctly)
> leaving an incorrect version number for libtool in the configure script.
> 
> After extracting the sources files, force autoreconf to be executed.
> 
> Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
> ---
>  scripts/build/companion_libs/mpfr.sh |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied as 3ea4e6f7b85f. Thank you!

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 06/19] Update CT_DoSaveState and CT_DoRestoreState to check for existence
  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
  0 siblings, 1 reply; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-11 13:59 UTC (permalink / raw)
  To: Remy Bohmer; +Cc: Bart vdr. Meulen, crossgcc

Remy, Bart, All,

On Friday 09 April 2010 21:04:25 Remy Bohmer wrote:
> In some configuration not all directories that are saved by
> CT_DoSaveState exist, add a check so only existing directories
> are saved.
> 
> Same applies when Restoring, check wheter the save files has
> been created during an previous DoSave.

The patch no longer applies, as we have a new directory to save/restore.

Let's just save/restore:
- the prefix directory (where things get installed): CT_PREFIX_DIR
- the build directory in its entirety: CT_BUILD_DIR

That makes things much much more easy.

Care to change your patch to this effect?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 07/19] Adapt CTPatch function to handle dash in  package name
  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
  0 siblings, 0 replies; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-11 14:06 UTC (permalink / raw)
  To: crossgcc; +Cc: Remy Bohmer, Bart vdr. Meulen

Remy, Bart, All,

On Friday 09 April 2010 21:04:26 Remy Bohmer wrote:
> Some packages have a dash ('-') in their package name, other
> packages have a dash in their version number. In order to handle this
> first look for a patch directory split on the last dash, in not found
> check for a patch direcory split on the fist dash.

CT_Patch has to stop being smart. It is failing.

Let's change the API to:
  CT_Patch [nochdir] <pkgname> <pkgversion>

And the package dir is constructed with: pkgname-pkgversion
If that is wrong, then the caller is responsible for cd-ing into the proper
directory, and call CT_Patch with 'nochdir'.

I will do that.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 08/19] Prevent trailing - in CT_TARGET
  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
  0 siblings, 0 replies; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-11 14:11 UTC (permalink / raw)
  To: crossgcc; +Cc: Remy Bohmer, Bart vdr. Meulen

Remy, Bart, All,

On Friday 09 April 2010 21:04:27 Remy Bohmer wrote:
> Not all target tuples consist of an VENDOR, KERNEL and SYSTEM part, build up the
> tuple in such a way to no extra or trailing dashes are added to CT_TARGET
> 
> Signed-off-by: Bart vdr Meulen <bartvdrmeulen@gmail.com>

Applied as 7e81cd6ca0b6. Thank you!

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 09/19] Allow choice for elf format when building bare  metal cross compiler
  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
  0 siblings, 0 replies; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-11 14:47 UTC (permalink / raw)
  To: crossgcc; +Cc: Remy Bohmer, Bart vdr. Meulen

Remy, Bart, All,

On Friday 09 April 2010 21:04:28 Remy Bohmer wrote:
> When building a baremetal cross compiler I want to be able to select
> the elf format and not be forced to build the elf2flt package.

Applied as 0a3b9af21490. Thank you!

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 10/19] Add ARCH_CPU for m68k architecture
  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
  0 siblings, 0 replies; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-11 15:03 UTC (permalink / raw)
  To: crossgcc; +Cc: Remy Bohmer, Bart vdr. Meulen

Remy, Bart, All,

On Friday 09 April 2010 21:04:29 Remy Bohmer wrote:
> Add config option to configure the ARCH_CPU define for
> the m68k CPU's that we known
[--SNIP--]
>  config ARCH_m68k
> -    select ARCH_SUPPORTS_32
> -    select ARCH_DEFAULT_32
> -    select ARCH_DEFAULT_BE
> -    select ARCH_SUPPORT_CPU
> -     help
> -      The m68k architecture
> +	select ARCH_SUPPORT_CPU
> +	select ARCH_SUPPORTS_32
> +	select ARCH_DEFAULT_32
> +	select ARCH_DEFAULT_BE

Gratuitous re-ordering.
Space-damage: use spaces, not tabs.

> +	help
> +	  The Motorola 68k architecture (http://) or
> +	  The Freescale Coldfire architecture (http://)
> +
> +choice
> +	bool
> +	prompt "CPU"
[--SNIP--]

I don't want to maintain a list of possible values. It is a nightmare to
maintain, it breaks when a new version of gcc recognises a new value.

The user is responsible for properly setting this in the menuconfig.
Dropped.

(Yes, I know that alpha is doing it, but that's an error. And sh just sets
a variant to be used to to build the tuple.)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 11/19] Add mingw as kernel type
  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
  0 siblings, 0 replies; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-11 15:25 UTC (permalink / raw)
  To: crossgcc; +Cc: Remy Bohmer, Bart vdr. Meulen

Remy, Bart, All,

On Friday 09 April 2010 21:04:30 Remy Bohmer wrote:
> Add the option to build a cross-compiler for kernel type 'mingw'.
> The resulting cross-compiler can be used to build applications on a Linux host
> that can be run on a Windows target.
> 
> Compiler is build using the mingwrt and w32-api packages aviable from the
> MinGW project (http://sourceforge.net/projects/mingw).
> 
> The windows headers (w32-api package) are extracting with the kernel_headers
> step The libraries and other headers from both packages are build and
> installed in the various steps of libc
[--SNIP--]
> Index: crosstool-ng/config/kernel/mingw32.in
> ===================================================================
> --- /dev/null
> +++ crosstool-ng/config/kernel/mingw32.in
> @@ -0,0 +1,33 @@
> +# Bare metal config options
> +
> +config KERNEL_mingw32
> +    select MINGW32
> +    help
> +      Build a toolchain targeting systems running Windows as host
> +
> +choice
> +	bool
> +	prompt "Windows api version"
> +
> +config W32API_V_3_13
> +	bool
> +	prompt "3.13"
> +
> +# CT_INSERT_VERSION_ABOVE
> +# Don't remove above line!

This is now the opposite: CT_INSERT_VERSION_BELOW
Eg., see in config/cc/gcc.in

> +
> +config W32API_V_select
> +    bool
> +    prompt "Other version"
> +
> +endchoice
> +
> +config W32API_VERSION
> +	string
> +	prompt "W32 api version" if W32API_V_select
> +	default "3.13" if W32API_V_3_13
> +# CT_INSERT_VERSION_STRING_ABOVE
> +# Don't remove above line!

Ditto.

> +    help
> +	Enter the version number of the windows api files to use
> +
[--SNIP--]
> Index: crosstool-ng/config/libc/mingw.in
> ===================================================================
> --- /dev/null
> +++ crosstool-ng/config/libc/mingw.in
> @@ -0,0 +1,35 @@
> +# mingw options
> +# depends on MINGW32
> +
> +config LIBC_mingw
> +    bool
> +    select LIBC_SUPPORT_WIN32THREADS
> +    help
> +      The de-facto standard for Mingw distributions.
> +
> +choice
> +	bool
> +	prompt "Mingw runtime version"
> +
> +config MINGWRT_V_3_15_2
> +    bool
> +    prompt "3.15.2"
> +
> +# CT_INSERT_VERSION_ABOVE
> +# Don't remove above line!

Ditto.

> +
> +config MINGWRT_V_select
> +    bool
> +    prompt "Other version"
> +
> +endchoice
> +
> +config MINGWRT_VERSION
> +	string
> +	prompt "Mingw runtime version" if MINGWRT_V_select
> +	default "3.15.2" if MINGWRT_V_3_15_2
> +# CT_INSERT_VERSION_STRING_ABOVE
> +# Don't remove above line!

Ditto.

> +    help
> +	Enter the version number of the mingw runtime files to use
> +
[--SNIP--]
> Index: crosstool-ng/scripts/build/cc/gcc.sh
> ===================================================================
> --- crosstool-ng.orig/scripts/build/cc/gcc.sh
> +++ crosstool-ng/scripts/build/cc/gcc.sh
> @@ -68,6 +68,8 @@ do_cc_core_pass_2() {
>          ,,nptl)
>              do_cc_core mode=shared build_libgcc=yes
>              ;;
> +        ,,win32) do_cc_core mode=static build_libgcc=yes
> +            ;;
>          *)  if [ "${CT_CC_GCC_4_3_or_later}" = "y" ]; then
>                  do_cc_core mode=static build_libgcc=yes
>              else
> @@ -317,7 +319,12 @@ do_cc() {
>              extra_config+=("--disable-libgomp")
>          fi
>      else
> -        extra_config+=("--enable-threads=posix")
> +	if [ "${CT_THREADS}" = "win32" ]; then
> +		extra_config+=("--enable-threads=win32")
> +		extra_config+=("--disable-win32-registry")
> +	else
> +		extra_config+=("--enable-threads=posix")
> +	fi

Space-damage: use spaces, not tabs.

>      fi
>  
>      CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
> Index: crosstool-ng/scripts/build/kernel/mingw32.sh
> ===================================================================
> --- /dev/null
> +++ crosstool-ng/scripts/build/kernel/mingw32.sh
> @@ -0,0 +1,30 @@
> +# 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="mingw32"
> +    CT_TARGET_SYS=
> +}
> +
> +do_kernel_get() {
> +    CT_GetFile "w32api-${CT_W32API_VERSION}-mingw32-src" \
> +        http://downloads.sourceforge.net/sourceforge/mingw
> +
> +    return 0
> +}
> +
> +do_kernel_extract() {
> +    CT_Extract "w32api-${CT_W32API_VERSION}-mingw32-src"
> +    return 0
> +}
> +
> +do_kernel_headers() {
> +    CT_DoStep INFO "Installing kernel headers"
> +
> +    mkdir -p "${CT_SYSROOT_DIR}/include"
> +    cp -r ${CT_SRC_DIR}/w32api-${CT_W32API_VERSION}-mingw32/include \
> +          ${CT_SYSROOT_DIR}
> +
> +  CT_EndStep

Space-damage: bad indent.

> +}
> Index: crosstool-ng/scripts/build/libc/mingw.sh
> ===================================================================
> --- /dev/null
> +++ crosstool-ng/scripts/build/libc/mingw.sh
> @@ -0,0 +1,75 @@
> +do_libc_get() {
> +    CT_GetFile "mingwrt-${CT_MINGWRT_VERSION}-mingw32-src" \
> +        http://downloads.sourceforge.net/sourceforge/mingw
> +}
> +
> +do_libc_extract() {
> +

Un-needed empty line.

[--SNIP--]

Globally looks good. Care to address the few issues?
Thank you!

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 12/19] Add mingw target libraries
  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
  0 siblings, 1 reply; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-11 15:45 UTC (permalink / raw)
  To: crossgcc; +Cc: Remy Bohmer, Bart vdr. Meulen

Remy, Bart, All,

On Friday 09 April 2010 21:04:31 Remy Bohmer wrote:
> Add several development libraries to the build of the mingw cross-compiler
> to be used on target
> Libraries:
> PDCurses (port of the ncurses library)
> GnuRX (the regex library)
> DirectX
> OpenGL
[--SNIP--]

That one is huge, and I am a bit reluctant to include it. I did not say
I won't include it.

I would think that we have to draw the line between what gets in and
what does not. Typically, this patch is the proper "why not" example.

I'll come back on that one a bit later...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 14/19] add bugurl and compiler version to core gcc  compiler
  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
  0 siblings, 0 replies; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-11 15:50 UTC (permalink / raw)
  To: crossgcc; +Cc: Remy Bohmer, Bart vdr. Meulen

Remy, Bart, All,

On Friday 09 April 2010 21:04:33 Remy Bohmer wrote:
> When building for bare-metal the core-gcc compiler is delivered
> as final compiler, so the version info and bugurl is useful
> in the core compiler as well.

Applied as 47710588f1b1. Thank you!

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 12/19] Add mingw target libraries
  2010-04-11 15:45   ` Yann E. MORIN
@ 2010-04-11 16:10     ` Arnaud Lacombe
  0 siblings, 0 replies; 43+ messages in thread
From: Arnaud Lacombe @ 2010-04-11 16:10 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc, Remy Bohmer, Bart vdr. Meulen

Hi,

On Sun, Apr 11, 2010 at 11:44 AM, Yann E. MORIN
<yann.morin.1998@anciens.enib.fr> wrote:
> Remy, Bart, All,
>
> On Friday 09 April 2010 21:04:31 Remy Bohmer wrote:
>> Add several development libraries to the build of the mingw cross-compiler
>> to be used on target
>> Libraries:
>> PDCurses (port of the ncurses library)
>> GnuRX (the regex library)
>> DirectX
>> OpenGL
> [--SNIP--]
>
> That one is huge, and I am a bit reluctant to include it. I did not say
> I won't include it.
>
> I would think that we have to draw the line between what gets in and
> what does not. Typically, this patch is the proper "why not" example.
>
> I'll come back on that one a bit later...
>
I was waiting for you review on that patch before commenting. I don't
see why these [optional] libraries should be imported/installed[0] as
a part of the libc target. This is likely to create a mess for
dependency later on.

 - Arnaud

[0]: if they do, which is still to be answered

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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 15/19] First setup for cygwin as target
  2010-04-09 19:34 ` [CT-NG:patch 15/19] First setup for cygwin as target Remy Bohmer
@ 2010-04-11 20:30   ` Yann E. MORIN
  2010-04-12 12:44     ` Bart van der Meulen
  0 siblings, 1 reply; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-11 20:30 UTC (permalink / raw)
  To: crossgcc; +Cc: Remy Bohmer, Bart vdr. Meulen

Remy, Bart, All,

On Friday 09 April 2010 21:04:34 Remy Bohmer wrote:
> This is the first attempt to add cygwin as target
> 
> Note the cygwin 'kernel' files are downloaded pre-compiled

Why that? Can't we build them from source?

> 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!

BELOW. Same as for the mingw kernel.

The idea is that we add the latest versions at the top of the list,
not at the bottom.

> +
> +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!

Ditto.

> +    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/

Missing the legacy release dir:
  ftp://ftp.easynet.be/cygwin/release-legacy/cygwin/

Let's keep the two locations, for when we update the version later.

> +    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"

You have to 'get' it before you can extract it.

[--SNIP--]

Otherwise looks good.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 06/19] Update CT_DoSaveState and CT_DoRestoreState   to check for existence
  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:42       ` Yann E. MORIN
  0 siblings, 2 replies; 43+ messages in thread
From: Bart van der Meulen @ 2010-04-12 12:28 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Remy Bohmer, crossgcc

Yann, All

2010/4/11 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>:
>
> Let's just save/restore:
> - the prefix directory (where things get installed): CT_PREFIX_DIR
> - the build directory in its entirety: CT_BUILD_DIR
>
> That makes things much much more easy.
>
> Care to change your patch to this effect?
>

The CT_PREFIX_DIR is already being saved and restored, about saving the
complete CT_BUILD_DIR I'm not sure.

I think that saving the complete CT_BUILD_DIR is to much, for example
when I want to restart at the build at step gcc, I'm no longer
intressed
in the build directories of the companion libs, and binutils. They
have already been build successfully and are there installed installed
in the CT_PREFIX_DIR
(and thus restored).

This means that if I save / restore the complete CT_BUILD_DIR they
build directories only take up space in the zip-file and time when
saving / restoring them.

Bart

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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 03/19] Build candian baremetal compiler
       [not found]     ` <i2l87271a2c1004120533g10be9d4ge8c5d8bdb69742f8@mail.gmail.com>
@ 2010-04-12 12:35       ` Bart van der Meulen
  0 siblings, 0 replies; 43+ messages in thread
From: Bart van der Meulen @ 2010-04-12 12:35 UTC (permalink / raw)
  To: crossgcc

Yann, All

2010/4/11 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>:
> Remy, Bart, All,
>
> On Friday 09 April 2010 21:04:22 Remy Bohmer wrote:
>> Previous addition of the canadian cross compiler did not allow
>> to build a baremetal only variant, no reason why this is not
>> allowed
>>
>> Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
>> ---
>>  scripts/build/cc/gcc.sh |   29 ++++++++++-------------------
>>  1 file changed, 10 insertions(+), 19 deletions(-)
>>
>> Index: crosstool-ng/scripts/build/cc/gcc.sh
>> ===================================================================
>> --- crosstool-ng.orig/scripts/build/cc/gcc.sh
>> +++ crosstool-ng/scripts/build/cc/gcc.sh
> [--SNIP--]
>> @@ -233,11 +229,6 @@ do_cc_core() {
>>              install_rules="install-gcc"
>>      fi   # ! build libgcc
>>
>> -    if [ "${CT_CANADIAN}" = "y" ]; then
>> -        CT_DoLog EXTRA "Building libiberty"
>> -        CT_DoExecLog ALL make ${PARALLELMFLAGS} all-build-libiberty
>> -    fi
>> -
>
> This chunk seems unrelated.
>

You're right.
This chunk should have been placed in a separate patch.

One of the first patches that added the canadian build option added
this piece of code, which is incorrect.
I think I made the mistake myself by copy/pasting some canadian
specific code from the final gcc step to the core build step

When building the core_cc compiler there is no need for building
libiberty, (and before the changes to build a canadian baremetal
compiler, this code would never be called).

Bart

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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 15/19] First setup for cygwin as target
  2010-04-11 20:30   ` Yann E. MORIN
@ 2010-04-12 12:44     ` Bart van der Meulen
  0 siblings, 0 replies; 43+ messages in thread
From: Bart van der Meulen @ 2010-04-12 12:44 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc, Remy Bohmer

Yann, All

2010/4/11 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>:
> Remy, Bart, All,
>
> On Friday 09 April 2010 21:04:34 Remy Bohmer wrote:
>> This is the first attempt to add cygwin as target
>>
>> Note the cygwin 'kernel' files are downloaded pre-compiled
>
> Why that? Can't we build them from source?
>

I think that is possible,
for me this patch was a simple exercise to see if it was possible to
also add cygwin as a target after having added the mingw target.

I looked very briefly at the source files and was unable to see how to
build the files I wanted, and getting them pre-compiled was enough for
me to prove
that building a cygwin-hosted compiler was possible.

Maybe somebody more at home in the cygwin source files is able to add
the correct steps to build the needed kernel-files from cygwin source
files

[-SNIP]
>> +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"
>
> You have to 'get' it before you can extract it.

Simply overlooked this one,
the step worked for me, because I already have the correct w32api
files after building the mingw-hosted compiler


Bart

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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 06/19] Update CT_DoSaveState and CT_DoRestoreState   to check for existence
  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
  1 sibling, 1 reply; 43+ messages in thread
From: Arnaud Lacombe @ 2010-04-12 15:12 UTC (permalink / raw)
  To: Bart van der Meulen; +Cc: Yann E. MORIN, Remy Bohmer, crossgcc

On Mon, Apr 12, 2010 at 8:28 AM, Bart van der Meulen
<bartvdrmeulen@gmail.com> wrote:
> Yann, All
>
> 2010/4/11 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>:
>>
>> Let's just save/restore:
>> - the prefix directory (where things get installed): CT_PREFIX_DIR
>> - the build directory in its entirety: CT_BUILD_DIR
>>
>> That makes things much much more easy.
>>
>> Care to change your patch to this effect?
>>
>
> The CT_PREFIX_DIR is already being saved and restored, about saving the
> complete CT_BUILD_DIR I'm not sure.
>
> I think that saving the complete CT_BUILD_DIR is to much, ...
>
I'd tend to agree on that point [thought I didn't read the code..
yet]. Having a more tighter state saving policy would avoid spending
the end of the build saving and restoring context if a step has
nothing to do.

Moreover, that would fix the libc issue, which is if `cc' fails, the
`libc-finish' will fail to restart as ${CT_BUILD_DIR}/build-libc would
have been removed. I have a quick and dirty patch, but its well...
dirty.

 - Arnaud

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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 06/19] Update CT_DoSaveState and CT_DoRestoreState   to check for existence
  2010-04-12 12:28     ` Bart van der Meulen
  2010-04-12 15:12       ` Arnaud Lacombe
@ 2010-04-12 20:42       ` Yann E. MORIN
  1 sibling, 0 replies; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-12 20:42 UTC (permalink / raw)
  To: crossgcc; +Cc: Bart van der Meulen, Remy Bohmer

Bart, Remy, All,

On Monday 12 April 2010 14:28:37 Bart van der Meulen wrote:
> The CT_PREFIX_DIR is already being saved and restored, about saving the
> complete CT_BUILD_DIR I'm not sure.
> 
> I think that saving the complete CT_BUILD_DIR is to much, for example
> when I want to restart at the build at step gcc, I'm no longer
> intressed
> in the build directories of the companion libs, and binutils. They
> have already been build successfully and are there installed installed
> in the CT_PREFIX_DIR
> (and thus restored).
> 
> This means that if I save / restore the complete CT_BUILD_DIR they
> build directories only take up space in the zip-file and time when
> saving / restoring them.

Yes you are right.

Nonetheless, we need a better way to handle that. What about adding a
helper function that checks whether the directory to save really exists,
and conversely checks that a tarball exists before restoring?

I'll handle that.

Thanks for your comments.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 06/19] Update CT_DoSaveState and CT_DoRestoreState   to check for existence
  2010-04-12 15:12       ` Arnaud Lacombe
@ 2010-04-12 20:43         ` Yann E. MORIN
  0 siblings, 0 replies; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-12 20:43 UTC (permalink / raw)
  To: crossgcc; +Cc: Arnaud Lacombe, Bart van der Meulen, Remy Bohmer

Arnaud, Bart, Remy, All,

On Monday 12 April 2010 17:12:34 Arnaud Lacombe wrote:
> > 2010/4/11 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>:
> >> Let's just save/restore:
> >> - the prefix directory (where things get installed): CT_PREFIX_DIR
> >> - the build directory in its entirety: CT_BUILD_DIR
> Moreover, that would fix the libc issue, which is if `cc' fails, the
> `libc-finish' will fail to restart as ${CT_BUILD_DIR}/build-libc would
> have been removed. I have a quick and dirty patch, but its well...
> dirty.

Oh, I understand. Please share your fix, we'll see how to clean it up, if
needed.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 19/19] The m68k processor does not like unaligned  access in memcpy
  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
  0 siblings, 0 replies; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-12 20:56 UTC (permalink / raw)
  To: crossgcc; +Cc: Remy Bohmer, Bart vdr. Meulen

Remy, Bart, All,

On Friday 09 April 2010 21:04:38 Remy Bohmer wrote:
> Disable unaligned access at least for mcpu32, m68010 and m68020.
> These processors certainly do not like unaligned accesses.
> 
> Signed-off-by: Remy Bohmer <linux@bohmer.net>

Applied as faade25219ed, thank you!

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [CT-NG:patch 05/19] Force autoreconf for mpfr
  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
  1 sibling, 0 replies; 43+ messages in thread
From: Yann E. MORIN @ 2010-04-12 22:24 UTC (permalink / raw)
  To: crossgcc; +Cc: Remy Bohmer, Bart vdr. Meulen

Remy, Bart, All,

On Friday 09 April 2010 21:04:24 Remy Bohmer wrote:
> In some exotic case the autoreconf step of mpfr is not executed (correctly)
> leaving an incorrect version number for libtool in the configure script.

Can you elaborate on these "exotic cases", please?

It just breaks on my machine now, so I'll have to revert this change.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



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

^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2010-04-12 22:24 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20100409190419.325379428@bohmer.net>
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 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 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 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 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 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: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 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 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:34 ` [CT-NG:patch 15/19] First setup for cygwin as target Remy Bohmer
2010-04-11 20:30   ` Yann E. MORIN
2010-04-12 12:44     ` Bart van der Meulen
2010-04-09 19:34 ` [CT-NG:patch 17/19] Fix linking of PPL (it does not link with stdc++ automaticly) Remy Bohmer
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 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 19/19] The m68k processor does not like unaligned access in memcpy Remy Bohmer
2010-04-12 20:56   ` Yann E. MORIN

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).