From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fed1rmmtai02.cox.net (fed1rmmtai02.cox.net [68.230.241.57]) by ozlabs.org (Postfix) with ESMTP id 0C96367B25 for ; Sat, 9 Apr 2005 00:46:02 +1000 (EST) Date: Fri, 8 Apr 2005 07:46:00 -0700 From: Tom Rini To: "Robert P. J. Day" Message-ID: <20050408144600.GX3396@smtp.west.cox.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Cc: Embedded PPC Linux list Subject: Re: cross-compiling under cygwin? List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, Apr 08, 2005 at 10:13:09AM -0400, Robert P. J. Day wrote: > i've just had a request from a colleague who wants to do all the > cross-compilation for our 8xx board on a windows box, rather than > linux. > > there was talk of cygwin, and kdevelop as well. i'm still parsing > the rest of the email but is there a canonical URL that discusses > working in the windows environment? > > i'm just about to head over to denx.de to see what i can find. > thanks for any pointers. The cross-tool list has had some of this. As of 2.6.10 at least, the following was still needed, and too ugly and/or cygwin version specific to be submitted to the kernel proper (still applies cleanly to 2.6.12-rc2, but untested in Cygwin env): Source: MontaVista Software, Inc. MR: 8836 Type: Defect Fix Disposition: local Signed-off-by: Tom Rini Description: A collection of unmergeable Cygwin fixes: - Cygwin doesn't have nor , but doesn't need them for certain values anyhow. - For certain ELF things, we rely on libelf being provided by the MVL environment. - /usr/include/asm/byteorder.h provided ntohl/htonl. - defines PATH_MAX as an expression, which means it cannot be used in some places. Index: linux-2.6.11.2/arch/ppc/boot/utils/mktree.c =================================================================== --- linux-2.6.11.2.orig/arch/ppc/boot/utils/mktree.c +++ linux-2.6.11.2/arch/ppc/boot/utils/mktree.c @@ -15,9 +15,9 @@ #include #include #include -#ifdef __sun__ +#if defined(__sun__) #include -#else +#elif !defined(__CYGWIN__) #include #endif Index: linux-2.6.11.2/scripts/mod/modpost.h =================================================================== --- linux-2.6.11.2.orig/scripts/mod/modpost.h +++ linux-2.6.11.2/scripts/mod/modpost.h @@ -7,7 +7,11 @@ #include #include #include +#ifdef __CYGWIN__ +#include +#else #include +#endif #include "elfconfig.h" Index: linux-2.6.11.2/scripts/mod/mk_elfconfig.c =================================================================== --- linux-2.6.11.2.orig/scripts/mod/mk_elfconfig.c +++ linux-2.6.11.2/scripts/mod/mk_elfconfig.c @@ -1,7 +1,11 @@ #include #include #include +#ifdef __CYGWIN__ +#include +#else #include +#endif int main(int argc, char **argv) Index: linux-2.6.11.2/scripts/mod/sumversion.c =================================================================== --- linux-2.6.11.2.orig/scripts/mod/sumversion.c +++ linux-2.6.11.2/scripts/mod/sumversion.c @@ -1,7 +1,10 @@ +#if defined(__sun__) #include -#ifdef __sun__ #include +#elif defined(__CYGWIN__) +#include /* For ntohl/htonl */ #else +#include #include #endif #include Index: linux-2.6.11.2/scripts/mod/file2alias.c =================================================================== --- linux-2.6.11.2.orig/scripts/mod/file2alias.c +++ linux-2.6.11.2/scripts/mod/file2alias.c @@ -19,9 +19,9 @@ typedef Elf32_Addr kernel_ulong_t; #else typedef Elf64_Addr kernel_ulong_t; #endif -#ifdef __sun__ +#if defined(__sun__) #include -#else +#elif !defined(__CYGWIN__) #include #endif Index: linux-2.6.11.2/arch/ppc/boot/utils/mkbugboot.c =================================================================== --- linux-2.6.11.2.orig/arch/ppc/boot/utils/mkbugboot.c +++ linux-2.6.11.2/arch/ppc/boot/utils/mkbugboot.c @@ -21,9 +21,9 @@ #include #include #include -#ifdef __sun__ +#if defined(__sun__) #include -#else +#elif !defined(__CYGWIN__) #include #endif Index: linux-2.6.11.2/lib/gen_crc32table.c =================================================================== --- linux-2.6.11.2.orig/lib/gen_crc32table.c +++ linux-2.6.11.2/lib/gen_crc32table.c @@ -1,6 +1,8 @@ #include #include "crc32defs.h" +#ifndef __CYGWIN__ #include +#endif #define ENTRIES_PER_LINE 4 Index: linux-2.6.11.2/usr/gen_init_cpio.c =================================================================== --- linux-2.6.11.2.orig/usr/gen_init_cpio.c +++ linux-2.6.11.2/usr/gen_init_cpio.c @@ -10,6 +10,12 @@ #include #include +/* Cygwin's defines PATH_MAX as (260 - 1) which just won't do. */ +#ifdef __CYGWIN__ +#undef PATH_MAX +#define PATH_MAX 259 +#endif + /* * Original work by Jeff Garzik * -- Tom Rini http://gate.crashing.org/~trini/