From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S267373AbUGVX05 (ORCPT ); Thu, 22 Jul 2004 19:26:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266124AbUGVX05 (ORCPT ); Thu, 22 Jul 2004 19:26:57 -0400 Received: from mail.timesys.com ([65.117.135.102]:23674 "EHLO exchange.timesys.com") by vger.kernel.org with ESMTP id S267373AbUGVX0F (ORCPT ); Thu, 22 Jul 2004 19:26:05 -0400 Subject: Re: case-sensitive file names during build From: Pragnesh Sampat To: dank@kegel.com Cc: sam@ravnborg.org, hollisb@us.ibm.com, christopher.faylor@timesys.com, "Povolotsky, Alexander" , crossgcc , "linuxppc-dev@lists.linuxppc.org" , Andrew Morton , bert hubert , Linux Kernel list In-Reply-To: <20040722221106.GD7073@mars.ravnborg.org> References: <3D848382FB72E249812901444C6BDB1D036EDF21@exchange.timesys.com> <1090524458.8679.23.camel@pss-pc.timesys> <20040722221106.GD7073@mars.ravnborg.org> Content-Type: text/plain Message-Id: <1090538760.8683.57.camel@pss-pc.timesys> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Thu, 22 Jul 2004 19:26:00 -0400 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 22 Jul 2004 23:26:02.0343 (UTC) FILETIME=[40AD3770:01C47043] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org OK, here they are. I applied them against 2.6.6 and can regen them if needed against current -mm. Also note that If you are using 2.6 versions earlier than 2.6.4, you will probably need 2-3 patches more. (These were generated by various people here at TimeSys and modified for different versions.) 1. Case insensitivity patch (rename files) (I can supply a patch to rename all, if needed) arch/alpha/kernel/vmlinux.lds.S arch/arm/kernel/vmlinux.lds.S arch/arm26/kernel/vmlinux.lds.S arch/cris/arch-v10/vmlinux.lds.S arch/h8300/kernel/vmlinux.lds.S arch/i386/kernel/vmlinux.lds.S arch/ia64/kernel/vmlinux.lds.S arch/m68k/kernel/vmlinux.lds.S arch/m68knommu/kernel/vmlinux.lds.S arch/mips/kernel/vmlinux.lds.S arch/parisc/kernel/vmlinux.lds.S arch/ppc/kernel/vmlinux.lds.S arch/ppc64/kernel/vmlinux.lds.S arch/s390/kernel/vmlinux.lds.S arch/sh/kernel/vmlinux.lds.S arch/sparc/kernel/vmlinux.lds.S arch/sparc64/kernel/vmlinux.lds.S arch/um/kernel/vmlinux.lds.S arch/v850/kernel/vmlinux.lds.S arch/x86_64/kernel/vmlinux.lds.S --- cygwin/scripts/Makefile.build-orig +++ cygwin/scripts/Makefile.build @@ -200,6 +200,9 @@ %.s: %.S FORCE $(call if_changed_dep,as_s_S) +%.s: %.S.h FORCE + $(call if_changed_dep,as_s_S) + quiet_cmd_as_o_S = AS $(quiet_modtag) $@ cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< 2. Command line length patch If the list of modules is long enough, modpost on cygwin fails. scripts/modpost is used to generate .mod.c files used for versioning. The long list seems to be caused by (combination of) if_changed macro expansion and the actual list of modules being long enough. The workaround calls $(cmd_modpost) unconditionally for cygwin and leaves other hosts unchanged. There's surely a better fix for this, I didn't understand the details of if_changed macro enough to come up with one. --- cygwin/scripts/Makefile.modpost-orig +++ cygwin/scripts/Makefile.modpost @@ -46,7 +46,21 @@ _modpost: $(modules) +# +# XXX cygwin hosts have issues with the length of command line +# parameters. The if_changed macro expansion and the actual command +# ends up exceeding the POSIX (?) limit of 32 K characters +# so let's try running the command unconditionally +# + +BUILD_HOST := $(shell uname | tr '[A-Z]' '[a-z]') +ifeq "$(findstring cygwin, $(BUILD_HOST))" "cygwin" +MODPOST_COMMAND = $(cmd_modpost) +else +MODPOST_COMMAND = $(call if_changed,modpost) +endif + # Step 2), invoke modpost # Includes step 3,4 quiet_cmd_modpost = MODPOST @@ -56,7 +70,7 @@ .PHONY: __modpost __modpost: $(wildcard vmlinux) $(modules:.ko=.o) FORCE - $(call cmd,modpost) + $(MODPOST_COMMAND) # Declare generated files as targets for modpost $(symverfile): __modpost ; 3. Some cygwin versions may need Older versions of cygwin lack inttypes.h, so include as needed. --- cygwin/arch/ppc/boot/utils/mkbugboot.c-orig +++ cygwin/arch/ppc/boot/utils/mkbugboot.c @@ -21,6 +21,11 @@ #include #include #include +#if defined(__CYGWIN__) +#include +#else +#include +#endif #ifdef __i386__ #define cpu_to_be32(x) le32_to_cpu(x) @@ -49,11 +54,6 @@ /* size of read buffer */ #define SIZE 0x1000 -/* typedef long int32_t; */ -typedef unsigned long uint32_t; -typedef unsigned short uint16_t; -typedef unsigned char uint8_t; - /* PPCBUG ROM boot header */ typedef struct bug_boot_header { uint8_t magic_word[4]; /* "BOOT" */ --- cygwin/lib/gen_crc32table.c-orig +++ cygwin/lib/gen_crc32table.c @@ -1,6 +1,10 @@ #include #include "crc32defs.h" +#if defined(__CYGWIN__) +#include +#else #include +#endif #define ENTRIES_PER_LINE 4 --- cygwin/scripts/sumversion.c-orig +++ cygwin/scripts/sumversion.c @@ -1,5 +1,9 @@ +#if defined(__CYGWIN__) +#include +#else +#include +#endif #include -#include #include #include #include Signed-off-by: Pragnesh Sampat under TS0086 -Pragnesh