public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Generation of *.s files from *.S files in kbuild
@ 2004-08-12 19:25 Dan Aloni
  2004-08-13  0:37 ` Benno
  0 siblings, 1 reply; 12+ messages in thread
From: Dan Aloni @ 2004-08-12 19:25 UTC (permalink / raw)
  To: Linux Kernel List

Hello, 

Is the generation of *.s files from *.S files in the kernel
build system a wide spread phenomenon? As far as I can see
only vmlinux.lds.s is built that way in my default i386 config.

It causes problems when trying to cross-build a kernel on a 
file system that has case-insensitive filenames, or on a GNU
port that is case insensitive (such as Cygwin).

If anyone wondered, I'm trying to cross build a Linux kernel
on a Cygwin system using a Linux native toolchain, in order
to make development of the Windows port of coLinux easier
for some people.

-- 
Dan Aloni
da-x@colinux.org

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

* Re: Generation of *.s files from *.S files in kbuild
  2004-08-12 19:25 Generation of *.s files from *.S files in kbuild Dan Aloni
@ 2004-08-13  0:37 ` Benno
  2004-08-13  5:04   ` Sam Ravnborg
  0 siblings, 1 reply; 12+ messages in thread
From: Benno @ 2004-08-13  0:37 UTC (permalink / raw)
  To: Dan Aloni; +Cc: Linux Kernel List

On Thu Aug 12, 2004 at 22:25:35 +0300, Dan Aloni wrote:
>Hello, 
>
>Is the generation of *.s files from *.S files in the kernel
>build system a wide spread phenomenon? As far as I can see
>only vmlinux.lds.s is built that way in my default i386 config.
>
>It causes problems when trying to cross-build a kernel on a 
>file system that has case-insensitive filenames, or on a GNU
>port that is case insensitive (such as Cygwin).
>
>If anyone wondered, I'm trying to cross build a Linux kernel
>on a Cygwin system using a Linux native toolchain, in order
>to make development of the Windows port of coLinux easier
>for some people.

Hi Dan, 

I'm having the exact same problem on Mac OSX with the case-insensitive
HFS+ filesystem.

After looking the only files that use this rule are the vmlinux.lds
files. (Although there is one of them for each architecture.)

It is actually a bit frustrating because due to the way make works
this is a problem even if you use a separate build directory.

The solution is fairly striaght forward -- just change the suffixes,
the problem is exactly how to change them. I would propose changing it
such that was stick with "vmlinux.lds.S" and have it generate "vmlinux.lds"

This would require the fewest changes to implement, just
1/ change %.s %.S rule to %.lds %.lds.S
2/ change the link flags from "-T vmlinux.lds.s" -> "-T vmlinux.lds"

Cheers,

Benno


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

* Re: Generation of *.s files from *.S files in kbuild
  2004-08-13  0:37 ` Benno
@ 2004-08-13  5:04   ` Sam Ravnborg
  2004-08-13  8:09     ` [PATCH 1/2] " Dan Aloni
  2004-08-13  8:12     ` Generation of *.s files from *.S files in kbuild Dan Aloni
  0 siblings, 2 replies; 12+ messages in thread
From: Sam Ravnborg @ 2004-08-13  5:04 UTC (permalink / raw)
  To: Benno; +Cc: Dan Aloni, Linux Kernel List

On Fri, Aug 13, 2004 at 10:37:43AM +1000, Benno wrote:
> 
> The solution is fairly striaght forward -- just change the suffixes,
> the problem is exactly how to change them. I would propose changing it
> such that was stick with "vmlinux.lds.S" and have it generate "vmlinux.lds"
> 
> This would require the fewest changes to implement, just
> 1/ change %.s %.S rule to %.lds %.lds.S
> 2/ change the link flags from "-T vmlinux.lds.s" -> "-T vmlinux.lds"

I agree with this approach, and see no defencies.

Care to send two patches.
One that do what you suggest for i386, and another that cover the rest
of the architectures?

	Sam

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

* [PATCH 1/2] Re: Generation of *.s files from *.S files in kbuild
  2004-08-13  5:04   ` Sam Ravnborg
@ 2004-08-13  8:09     ` Dan Aloni
  2004-08-13  9:24       ` [PATCH 1/2] #2 (Generation of *.s files from *.S files in kbuild) Dan Aloni
  2004-08-13  8:12     ` Generation of *.s files from *.S files in kbuild Dan Aloni
  1 sibling, 1 reply; 12+ messages in thread
From: Dan Aloni @ 2004-08-13  8:09 UTC (permalink / raw)
  To: Benno, Linux Kernel List

On Fri, Aug 13, 2004 at 07:04:24AM +0200, Sam Ravnborg wrote:
> On Fri, Aug 13, 2004 at 10:37:43AM +1000, Benno wrote:
> > 
> > The solution is fairly striaght forward -- just change the suffixes,
> > the problem is exactly how to change them. I would propose changing it
> > such that was stick with "vmlinux.lds.S" and have it generate "vmlinux.lds"
> > 
> > This would require the fewest changes to implement, just
> > 1/ change %.s %.S rule to %.lds %.lds.S
> > 2/ change the link flags from "-T vmlinux.lds.s" -> "-T vmlinux.lds"
> 
> I agree with this approach, and see no defencies.
> 
> Care to send two patches.
> One that do what you suggest for i386, and another that cover the rest
> of the architectures?

Here's the first patch:

Signed-off-by: Dan Aloni <da-x@colinux.org>

diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/Makefile linux-2.6.7-work/Makefile
--- linux-2.6.7/Makefile	2004-08-13 10:26:11.000000000 +0300
+++ linux-2.6.7-work/Makefile	2004-08-13 10:59:19.000000000 +0300
@@ -549,7 +549,7 @@
 	$(NM) $@ | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
 endef
 
-LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.s
+LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds
 
 #	Generate section listing all symbols and add it into vmlinux
 #	It's a three stage process:
@@ -575,23 +575,23 @@
 .tmp_kallsyms%.S: .tmp_vmlinux%
 	$(call cmd,kallsyms)
 
-.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
+.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds FORCE
 	+$(call if_changed_rule,vmlinux__)
 
-.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
+.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds FORCE
 	$(call if_changed_rule,vmlinux__)
 
 endif
 
 #	Finally the vmlinux rule
 
-vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
+vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds FORCE
 	$(call if_changed_rule,vmlinux)
 
 #	The actual objects are generated when descending, 
 #	make sure no implicit rule kicks in
 
-$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.s: $(vmlinux-dirs) ;
+$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds: $(vmlinux-dirs) ;
 
 # 	Handle descending into subdirectories listed in $(vmlinux-dirs)
 
@@ -632,10 +632,10 @@
 # All the preparing..
 prepare-all: prepare0 prepare
 
-#	Leave this as default for preprocessing vmlinux.lds.s, which is now
+#	Leave this as default for preprocessing vmlinux.lds, which is now
 #	done in arch/$(ARCH)/kernel/Makefile
 
-export AFLAGS_vmlinux.lds.o += -P -C -U$(ARCH)
+export AFLAGS_vmlinux.o += -P -C -U$(ARCH)
 
 # Single targets
 # ---------------------------------------------------------------------------
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/i386/kernel/Makefile linux-2.6.7-work/arch/i386/kernel/Makefile
--- linux-2.6.7/arch/i386/kernel/Makefile	2004-06-22 09:23:56.000000000 +0300
+++ linux-2.6.7-work/arch/i386/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y := head.o init_task.o vmlinux.lds.s
+extra-y := head.o init_task.o vmlinux.lds
 
 obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
 		ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/scripts/Makefile.build linux-2.6.7-work/scripts/Makefile.build
--- linux-2.6.7/scripts/Makefile.build	2004-06-16 08:19:52.000000000 +0300
+++ linux-2.6.7-work/scripts/Makefile.build	2004-08-13 10:23:52.000000000 +0300
@@ -194,11 +194,11 @@
 $(real-objs-m)      : modkern_aflags := $(AFLAGS_MODULE)
 $(real-objs-m:.o=.s): modkern_aflags := $(AFLAGS_MODULE)
 
-quiet_cmd_as_s_S = CPP $(quiet_modtag) $@
-cmd_as_s_S       = $(CPP) $(a_flags)   -o $@ $< 
+quiet_cmd_as_lds_lds_S = CPP $(quiet_modtag) $@
+cmd_as_lds_lds_S       = $(CPP) $(a_flags)   -o $@ $< 
 
-%.s: %.S FORCE
-	$(call if_changed_dep,as_s_S)
+%.lds: %.lds.S FORCE
+	$(call if_changed_dep,as_lds_lds_S)
 
 quiet_cmd_as_o_S = AS $(quiet_modtag)  $@
 cmd_as_o_S       = $(CC) $(a_flags) -c -o $@ $<


-- 
Dan Aloni
da-x@colinux.org

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

* Re: Generation of *.s files from *.S files in kbuild
  2004-08-13  5:04   ` Sam Ravnborg
  2004-08-13  8:09     ` [PATCH 1/2] " Dan Aloni
@ 2004-08-13  8:12     ` Dan Aloni
  1 sibling, 0 replies; 12+ messages in thread
From: Dan Aloni @ 2004-08-13  8:12 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Benno, Linux Kernel List

On Fri, Aug 13, 2004 at 07:04:24AM +0200, Sam Ravnborg wrote:
> On Fri, Aug 13, 2004 at 10:37:43AM +1000, Benno wrote:
> > 
> > The solution is fairly striaght forward -- just change the suffixes,
> > the problem is exactly how to change them. I would propose changing it
> > such that was stick with "vmlinux.lds.S" and have it generate "vmlinux.lds"
> > 
> > This would require the fewest changes to implement, just
> > 1/ change %.s %.S rule to %.lds %.lds.S
> > 2/ change the link flags from "-T vmlinux.lds.s" -> "-T vmlinux.lds"
> 
> I agree with this approach, and see no defencies.
> 
> Care to send two patches.
> One that do what you suggest for i386, and another that cover the rest
> of the architectures?

.. and the second patch:

Signed-off-by: Dan Aloni <da-x@colinux.org>

diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/alpha/kernel/Makefile linux-2.6.7-work/arch/alpha/kernel/Makefile
--- linux-2.6.7/arch/alpha/kernel/Makefile	2004-06-16 08:19:22.000000000 +0300
+++ linux-2.6.7-work/arch/alpha/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y		:= head.o vmlinux.lds.s
+extra-y		:= head.o vmlinux.lds
 EXTRA_AFLAGS	:= $(CFLAGS)
 EXTRA_CFLAGS	:= -Werror -Wno-sign-compare
 
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/arm/kernel/Makefile linux-2.6.7-work/arch/arm/kernel/Makefile
--- linux-2.6.7/arch/arm/kernel/Makefile	2004-06-16 08:20:03.000000000 +0300
+++ linux-2.6.7-work/arch/arm/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -27,7 +27,7 @@
 head-y			:= head.o
 obj-$(CONFIG_DEBUG_LL)	+= debug.o
 
-extra-y := $(head-y) init_task.o vmlinux.lds.s
+extra-y := $(head-y) init_task.o vmlinux.lds
 
 # Spell out some dependencies that aren't automatically figured out
 $(obj)/entry-armv.o: 	$(obj)/entry-header.S include/asm-arm/constants.h
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/arm26/kernel/Makefile linux-2.6.7-work/arch/arm26/kernel/Makefile
--- linux-2.6.7/arch/arm26/kernel/Makefile	2004-06-16 08:19:22.000000000 +0300
+++ linux-2.6.7-work/arch/arm26/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -14,5 +14,5 @@
 obj-$(CONFIG_FIQ)		+= fiq.o
 obj-$(CONFIG_MODULES)		+= armksyms.o
 
-extra-y := init_task.o vmlinux.lds.s
+extra-y := init_task.o vmlinux.lds
 
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/cris/kernel/Makefile linux-2.6.7-work/arch/cris/kernel/Makefile
--- linux-2.6.7/arch/cris/kernel/Makefile	2004-06-16 08:19:36.000000000 +0300
+++ linux-2.6.7-work/arch/cris/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -3,7 +3,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y	:= vmlinux.lds.s
+extra-y	:= vmlinux.lds
 
 obj-y   := process.o traps.o irq.o ptrace.o setup.o \
 	   time.o sys_cris.o semaphore.o
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/h8300/kernel/Makefile linux-2.6.7-work/arch/h8300/kernel/Makefile
--- linux-2.6.7/arch/h8300/kernel/Makefile	2004-06-16 08:19:36.000000000 +0300
+++ linux-2.6.7-work/arch/h8300/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y := vmlinux.lds.s
+extra-y := vmlinux.lds
 
 obj-y := process.o traps.o ptrace.o ints.o \
 	 sys_h8300.o time.o semaphore.o signal.o \
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/ia64/kernel/Makefile linux-2.6.7-work/arch/ia64/kernel/Makefile
--- linux-2.6.7/arch/ia64/kernel/Makefile	2004-06-16 08:20:26.000000000 +0300
+++ linux-2.6.7-work/arch/ia64/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y	:= head.o init_task.o vmlinux.lds.s
+extra-y	:= head.o init_task.o vmlinux.lds
 
 obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o	\
 	 irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o		\
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/m68k/kernel/Makefile linux-2.6.7-work/arch/m68k/kernel/Makefile
--- linux-2.6.7/arch/m68k/kernel/Makefile	2004-06-16 08:19:44.000000000 +0300
+++ linux-2.6.7-work/arch/m68k/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -7,7 +7,7 @@
 else
   extra-y := sun3-head.o
 endif
-extra-y	+= vmlinux.lds.s
+extra-y	+= vmlinux.lds
 
 obj-y		:= entry.o process.o traps.o ints.o signal.o ptrace.o \
 			sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/m68knommu/kernel/Makefile linux-2.6.7-work/arch/m68knommu/kernel/Makefile
--- linux-2.6.7/arch/m68knommu/kernel/Makefile	2004-06-16 08:19:03.000000000 +0300
+++ linux-2.6.7-work/arch/m68knommu/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for arch/m68knommu/kernel.
 #
 
-extra-y := vmlinux.lds.s
+extra-y := vmlinux.lds
 
 obj-y += dma.o entry.o init_task.o m68k_ksyms.o process.o ptrace.o semaphore.o \
 	 setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/mips/kernel/Makefile linux-2.6.7-work/arch/mips/kernel/Makefile
--- linux-2.6.7/arch/mips/kernel/Makefile	2004-06-16 08:19:22.000000000 +0300
+++ linux-2.6.7-work/arch/mips/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the Linux/MIPS kernel.
 #
 
-extra-y		:= head.o init_task.o vmlinux.lds.s
+extra-y		:= head.o init_task.o vmlinux.lds
 
 obj-y		+= cpu-probe.o branch.o entry.o genex.o irq.o process.o \
 		   ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/parisc/kernel/Makefile linux-2.6.7-work/arch/parisc/kernel/Makefile
--- linux-2.6.7/arch/parisc/kernel/Makefile	2004-06-16 08:19:09.000000000 +0300
+++ linux-2.6.7-work/arch/parisc/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -4,7 +4,7 @@
 
 head-y			:= head.o
 head-$(CONFIG_PARISC64)	:= head64.o
-extra-y			:= init_task.o $(head-y) vmlinux.lds.s
+extra-y			:= init_task.o $(head-y) vmlinux.lds
 
 AFLAGS_entry.o	:= -traditional
 AFLAGS_pacache.o := -traditional
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/ppc/kernel/Makefile linux-2.6.7-work/arch/ppc/kernel/Makefile
--- linux-2.6.7/arch/ppc/kernel/Makefile	2004-06-16 08:19:53.000000000 +0300
+++ linux-2.6.7-work/arch/ppc/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -15,7 +15,7 @@
 extra-$(CONFIG_8xx)		:= head_8xx.o
 extra-$(CONFIG_6xx)		+= idle_6xx.o
 extra-$(CONFIG_POWER4)		+= idle_power4.o
-extra-y				+= vmlinux.lds.s
+extra-y				+= vmlinux.lds
 
 obj-y				:= entry.o traps.o irq.o idle.o time.o misc.o \
 					process.o signal.o ptrace.o align.o \
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/ppc64/kernel/Makefile linux-2.6.7-work/arch/ppc64/kernel/Makefile
--- linux-2.6.7/arch/ppc64/kernel/Makefile	2004-06-16 08:20:19.000000000 +0300
+++ linux-2.6.7-work/arch/ppc64/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -3,7 +3,7 @@
 #
 
 EXTRA_CFLAGS	+= -mno-minimal-toc
-extra-y		:= head.o vmlinux.lds.s
+extra-y		:= head.o vmlinux.lds
 
 obj-y               :=	setup.o entry.o traps.o irq.o idle.o dma.o \
 			time.o process.o signal.o syscalls.o misc.o ptrace.o \
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/s390/kernel/Makefile linux-2.6.7-work/arch/s390/kernel/Makefile
--- linux-2.6.7/arch/s390/kernel/Makefile	2004-06-16 08:20:04.000000000 +0300
+++ linux-2.6.7-work/arch/s390/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -10,7 +10,7 @@
 
 extra-$(CONFIG_ARCH_S390_31)	+= head.o 
 extra-$(CONFIG_ARCH_S390X)	+= head64.o 
-extra-y				+= init_task.o vmlinux.lds.s
+extra-y				+= init_task.o vmlinux.lds
 
 obj-$(CONFIG_MODULES)		+= s390_ksyms.o module.o
 obj-$(CONFIG_SMP)		+= smp.o
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/sh/boot/compressed/Makefile linux-2.6.7-work/arch/sh/boot/compressed/Makefile
--- linux-2.6.7/arch/sh/boot/compressed/Makefile	2004-06-16 08:19:26.000000000 +0300
+++ linux-2.6.7-work/arch/sh/boot/compressed/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -18,7 +18,7 @@
 #
 IMAGE_OFFSET := $(shell printf "0x%8x" $$[0x80000000+$(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET)])
 
-LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds.s
+LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds
 
 $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
 	$(call if_changed,ld)
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/sh/kernel/Makefile linux-2.6.7-work/arch/sh/kernel/Makefile
--- linux-2.6.7/arch/sh/kernel/Makefile	2004-06-16 08:19:36.000000000 +0300
+++ linux-2.6.7-work/arch/sh/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the Linux/SuperH kernel.
 #
 
-extra-y	:= head.o init_task.o vmlinux.lds.s
+extra-y	:= head.o init_task.o vmlinux.lds
 
 obj-y	:= process.o signal.o entry.o traps.o irq.o \
 	ptrace.o setup.o time.o sys_sh.o semaphore.o \
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/sparc/boot/Makefile linux-2.6.7-work/arch/sparc/boot/Makefile
--- linux-2.6.7/arch/sparc/boot/Makefile	2004-06-16 08:20:03.000000000 +0300
+++ linux-2.6.7-work/arch/sparc/boot/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -19,7 +19,7 @@
 
 BTOBJS := $(HEAD_Y) $(INIT_Y)
 BTLIBS := $(CORE_Y) $(LIBS_Y) $(DRIVERS_Y) $(NET_Y)
-LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds.s $(BTOBJS) --start-group $(BTLIBS) --end-group $(kallsyms.o)
+LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds $(BTOBJS) --start-group $(BTLIBS) --end-group $(kallsyms.o)
 
 # Actual linking
 $(obj)/image: $(obj)/btfix.o FORCE
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/sparc/kernel/Makefile linux-2.6.7-work/arch/sparc/kernel/Makefile
--- linux-2.6.7/arch/sparc/kernel/Makefile	2004-06-16 08:19:52.000000000 +0300
+++ linux-2.6.7-work/arch/sparc/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y		:= head.o init_task.o vmlinux.lds.s
+extra-y		:= head.o init_task.o vmlinux.lds
 
 EXTRA_AFLAGS	:= -ansi
 
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/sparc64/kernel/Makefile linux-2.6.7-work/arch/sparc64/kernel/Makefile
--- linux-2.6.7/arch/sparc64/kernel/Makefile	2004-06-16 08:19:01.000000000 +0300
+++ linux-2.6.7-work/arch/sparc64/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -5,7 +5,7 @@
 EXTRA_AFLAGS := -ansi
 EXTRA_CFLAGS := -Werror
 
-extra-y		:= head.o init_task.o vmlinux.lds.s
+extra-y		:= head.o init_task.o vmlinux.lds
 
 obj-y		:= process.o setup.o cpu.o idprom.o \
 		   traps.o devices.o auxio.o \
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/um/kernel/Makefile linux-2.6.7-work/arch/um/kernel/Makefile
--- linux-2.6.7/arch/um/kernel/Makefile	2004-06-16 08:19:42.000000000 +0300
+++ linux-2.6.7-work/arch/um/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -3,7 +3,7 @@
 # Licensed under the GPL
 #
 
-extra-y := vmlinux.lds.s
+extra-y := vmlinux.lds
 
 obj-y = checksum.o config.o exec_kern.o exitcode.o frame_kern.o frame.o \
 	helper.o init_task.o irq.o irq_user.o ksyms.o mem.o mem_user.o \
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/v850/kernel/Makefile linux-2.6.7-work/arch/v850/kernel/Makefile
--- linux-2.6.7/arch/v850/kernel/Makefile	2004-06-16 08:20:26.000000000 +0300
+++ linux-2.6.7-work/arch/v850/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -9,7 +9,7 @@
 # for more details.
 #
 
-extra-y := head.o init_task.o vmlinux.lds.s
+extra-y := head.o init_task.o vmlinux.lds
 
 obj-y += intv.o entry.o process.o syscalls.o time.o semaphore.o setup.o \
 	 signal.o irq.o mach.o ptrace.o bug.o
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/x86_64/kernel/Makefile linux-2.6.7-work/arch/x86_64/kernel/Makefile
--- linux-2.6.7/arch/x86_64/kernel/Makefile	2004-06-16 08:19:43.000000000 +0300
+++ linux-2.6.7-work/arch/x86_64/kernel/Makefile	2004-08-13 10:32:15.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y 	:= head.o head64.o init_task.o vmlinux.lds.s
+extra-y 	:= head.o head64.o init_task.o vmlinux.lds
 EXTRA_AFLAGS	:= -traditional
 obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o \
 		ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \
diff -X /home/karrde/colinux/bin/dontdiff -urN linux-2.6.7/arch/x86_64/kernel/Makefile-HEAD linux-2.6.7-work/arch/x86_64/kernel/Makefile-HEAD
--- linux-2.6.7/arch/x86_64/kernel/Makefile-HEAD	2004-06-16 08:19:52.000000000 +0300
+++ linux-2.6.7-work/arch/x86_64/kernel/Makefile-HEAD	2004-08-13 10:32:15.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y 	:= head.o head64.o init_task.o vmlinux.lds.s
+extra-y 	:= head.o head64.o init_task.o vmlinux.lds
 EXTRA_AFLAGS	:= -traditional
 obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o \
 		ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \


-- 
Dan Aloni
da-x@colinux.org

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

* Re: [PATCH 1/2] #2 (Generation of *.s files from *.S files in kbuild)
  2004-08-13  8:09     ` [PATCH 1/2] " Dan Aloni
@ 2004-08-13  9:24       ` Dan Aloni
  2004-08-13 18:33         ` Sam Ravnborg
  0 siblings, 1 reply; 12+ messages in thread
From: Dan Aloni @ 2004-08-13  9:24 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Benno, Linux Kernel List

On Fri, Aug 13, 2004 at 11:09:42AM +0300, Dan Aloni wrote:
> On Fri, Aug 13, 2004 at 07:04:24AM +0200, Sam Ravnborg wrote:
> > On Fri, Aug 13, 2004 at 10:37:43AM +1000, Benno wrote:
> > > 
> > > The solution is fairly striaght forward -- just change the suffixes,
> > > the problem is exactly how to change them. I would propose changing it
> > > such that was stick with "vmlinux.lds.S" and have it generate "vmlinux.lds"
> > > 
> > > This would require the fewest changes to implement, just
> > > 1/ change %.s %.S rule to %.lds %.lds.S
> > > 2/ change the link flags from "-T vmlinux.lds.s" -> "-T vmlinux.lds"
> > 
> > I agree with this approach, and see no defencies.
> > 
> > Care to send two patches.
> > One that do what you suggest for i386, and another that cover the rest
> > of the architectures?
> 
> Here's the first patch:

There was a small typo in my source tree. Second try:

Signed-off-by: Dan Aloni <da-x@colinux.org>

diff -urN linux-2.6.7/Makefile linux-2.6.7-work/Makefile
--- linux-2.6.7/Makefile	2004-08-13 12:18:52.000000000 +0300
+++ linux-2.6.7-work/Makefile	2004-08-13 12:19:00.000000000 +0300
@@ -549,7 +549,7 @@
 	$(NM) $@ | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
 endef
 
-LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.s
+LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds
 
 #	Generate section listing all symbols and add it into vmlinux
 #	It's a three stage process:
@@ -575,23 +575,23 @@
 .tmp_kallsyms%.S: .tmp_vmlinux%
 	$(call cmd,kallsyms)
 
-.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
+.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds FORCE
 	+$(call if_changed_rule,vmlinux__)
 
-.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
+.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds FORCE
 	$(call if_changed_rule,vmlinux__)
 
 endif
 
 #	Finally the vmlinux rule
 
-vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
+vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds FORCE
 	$(call if_changed_rule,vmlinux)
 
 #	The actual objects are generated when descending, 
 #	make sure no implicit rule kicks in
 
-$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.s: $(vmlinux-dirs) ;
+$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds: $(vmlinux-dirs) ;
 
 # 	Handle descending into subdirectories listed in $(vmlinux-dirs)
 
@@ -635,7 +635,7 @@
 #	Leave this as default for preprocessing vmlinux.lds.S, which is now
 #	done in arch/$(ARCH)/kernel/Makefile
 
-export AFLAGS_vmlinux.lds.o += -P -C -U$(ARCH)
+export AFLAGS_vmlinux.o += -P -C -U$(ARCH)
 
 # Single targets
 # ---------------------------------------------------------------------------
diff -urN linux-2.6.7/arch/i386/kernel/Makefile linux-2.6.7-work/arch/i386/kernel/Makefile
--- linux-2.6.7/arch/i386/kernel/Makefile	2004-08-13 12:18:52.000000000 +0300
+++ linux-2.6.7-work/arch/i386/kernel/Makefile	2004-08-13 12:19:00.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y := head.o init_task.o vmlinux.lds.s
+extra-y := head.o init_task.o vmlinux.lds
 
 obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
 		ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \
diff -urN linux-2.6.7/scripts/Makefile.build linux-2.6.7-work/scripts/Makefile.build
--- linux-2.6.7/scripts/Makefile.build	2004-08-13 12:18:52.000000000 +0300
+++ linux-2.6.7-work/scripts/Makefile.build	2004-08-13 12:19:00.000000000 +0300
@@ -194,11 +194,11 @@
 $(real-objs-m)      : modkern_aflags := $(AFLAGS_MODULE)
 $(real-objs-m:.o=.s): modkern_aflags := $(AFLAGS_MODULE)
 
-quiet_cmd_as_s_S = CPP $(quiet_modtag) $@
-cmd_as_s_S       = $(CPP) $(a_flags)   -o $@ $< 
+quiet_cmd_as_lds_lds_S = CPP $(quiet_modtag) $@
+cmd_as_lds_lds_S       = $(CPP) $(a_flags)   -o $@ $< 
 
-%.s: %.S FORCE
-	$(call if_changed_dep,as_s_S)
+%.lds: %.lds.S FORCE
+	$(call if_changed_dep,as_lds_lds_S)
 
 quiet_cmd_as_o_S = AS $(quiet_modtag)  $@
 cmd_as_o_S       = $(CC) $(a_flags) -c -o $@ $<


-- 
Dan Aloni
da-x@colinux.org

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

* Re: [PATCH 1/2] #2 (Generation of *.s files from *.S files in kbuild)
  2004-08-13  9:24       ` [PATCH 1/2] #2 (Generation of *.s files from *.S files in kbuild) Dan Aloni
@ 2004-08-13 18:33         ` Sam Ravnborg
  2004-08-13 19:09           ` Dan Aloni
                             ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Sam Ravnborg @ 2004-08-13 18:33 UTC (permalink / raw)
  To: Dan Aloni; +Cc: Sam Ravnborg, Benno, Linux Kernel List

On Fri, Aug 13, 2004 at 12:24:26PM +0300, Dan Aloni wrote:
> diff -urN linux-2.6.7/scripts/Makefile.build linux-2.6.7-work/scripts/Makefile.build
> --- linux-2.6.7/scripts/Makefile.build	2004-08-13 12:18:52.000000000 +0300
> +++ linux-2.6.7-work/scripts/Makefile.build	2004-08-13 12:19:00.000000000 +0300
> @@ -194,11 +194,11 @@
>  $(real-objs-m)      : modkern_aflags := $(AFLAGS_MODULE)
>  $(real-objs-m:.o=.s): modkern_aflags := $(AFLAGS_MODULE)
>  
> -quiet_cmd_as_s_S = CPP $(quiet_modtag) $@
> -cmd_as_s_S       = $(CPP) $(a_flags)   -o $@ $< 
> +quiet_cmd_as_lds_lds_S = CPP $(quiet_modtag) $@
> +cmd_as_lds_lds_S       = $(CPP) $(a_flags)   -o $@ $< 
>  
> -%.s: %.S FORCE
> -	$(call if_changed_dep,as_s_S)
> +%.lds: %.lds.S FORCE
> +	$(call if_changed_dep,as_lds_lds_S)


This is not good.
The .S -> .s is used for assembly.

An additional rule is needed:

Something like:
quiet_cmd_cpp_lds_S    = LDS    $@
      cmd_cpp_lds_S    = $(CPP) $(cpp_flags) -o $@ $<

%.lds: %.lds.S FORCE
	$(call if_changed_dep,cpp_lds_S)


Adding a new rule it no longer are acceptable to misuse
AFLAGS for this. So you have to add support for a new
set of flags.
Better name them with CPP so they can be used for other
preprocessings tasks later if needed.

So in Makefile.lib you need to add cpp_flags like a_flags
but using CPPFLAGS, EXTRA_CPPFLAGS, and CPPFLAGS_@

Try building a clean kernel after implementing this.

Thanks,

	Sam

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

* Re: [PATCH 1/2] #2 (Generation of *.s files from *.S files in kbuild)
  2004-08-13 18:33         ` Sam Ravnborg
@ 2004-08-13 19:09           ` Dan Aloni
  2004-08-13 19:17             ` Sam Ravnborg
  2004-08-14 19:46           ` [PATCH] [#3 1/2] Generate vmlinux.lds instead of vmlinux.lds.s Dan Aloni
  2004-08-14 19:49           ` [PATCH] [#3 2/2] " Dan Aloni
  2 siblings, 1 reply; 12+ messages in thread
From: Dan Aloni @ 2004-08-13 19:09 UTC (permalink / raw)
  To: Sam Ravnborg, Benno, Linux Kernel List

On Fri, Aug 13, 2004 at 08:33:47PM +0200, Sam Ravnborg wrote:
> On Fri, Aug 13, 2004 at 12:24:26PM +0300, Dan Aloni wrote:
> > diff -urN linux-2.6.7/scripts/Makefile.build linux-2.6.7-work/scripts/Makefile.build
> > --- linux-2.6.7/scripts/Makefile.build	2004-08-13 12:18:52.000000000 +0300
> > +++ linux-2.6.7-work/scripts/Makefile.build	2004-08-13 12:19:00.000000000 +0300
> > @@ -194,11 +194,11 @@
> >  $(real-objs-m)      : modkern_aflags := $(AFLAGS_MODULE)
> >  $(real-objs-m:.o=.s): modkern_aflags := $(AFLAGS_MODULE)
> >  
> > -quiet_cmd_as_s_S = CPP $(quiet_modtag) $@
> > -cmd_as_s_S       = $(CPP) $(a_flags)   -o $@ $< 
> > +quiet_cmd_as_lds_lds_S = CPP $(quiet_modtag) $@
> > +cmd_as_lds_lds_S       = $(CPP) $(a_flags)   -o $@ $< 
> >  
> > -%.s: %.S FORCE
> > -	$(call if_changed_dep,as_s_S)
> > +%.lds: %.lds.S FORCE
> > +	$(call if_changed_dep,as_lds_lds_S)
> 
> 
> This is not good.
> The .S -> .s is used for assembly.

Actually the only rule I saw that is being used for 
assembly is the .S -> .o rule (examples under 
arch/i386/kernel).
 
> An additional rule is needed:
> 
> Something like:
> quiet_cmd_cpp_lds_S    = LDS    $@
>       cmd_cpp_lds_S    = $(CPP) $(cpp_flags) -o $@ $<
> 
> %.lds: %.lds.S FORCE
> 	$(call if_changed_dep,cpp_lds_S)
>
> Adding a new rule it no longer are acceptable to misuse
> AFLAGS for this. So you have to add support for a new
> set of flags.
> Better name them with CPP so they can be used for other
> preprocessings tasks later if needed.
> 
> So in Makefile.lib you need to add cpp_flags like a_flags
> but using CPPFLAGS, EXTRA_CPPFLAGS, and CPPFLAGS_@
> 
> Try building a clean kernel after implementing this.

Okay, I'll send a patch when it's ready.

-- 
Dan Aloni
da-x@colinux.org

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

* Re: [PATCH 1/2] #2 (Generation of *.s files from *.S files in kbuild)
  2004-08-13 19:09           ` Dan Aloni
@ 2004-08-13 19:17             ` Sam Ravnborg
  0 siblings, 0 replies; 12+ messages in thread
From: Sam Ravnborg @ 2004-08-13 19:17 UTC (permalink / raw)
  To: Dan Aloni; +Cc: Sam Ravnborg, Benno, Linux Kernel List

On Fri, Aug 13, 2004 at 10:09:53PM +0300, Dan Aloni wrote:
> > The .S -> .s is used for assembly.
> 
> Actually the only rule I saw that is being used for 
> assembly is the .S -> .o rule (examples under 
> arch/i386/kernel).

Meant to be used if someone do:
make arch/i386/crypto/aes-i586-asm.s

to see the preprocessed version of the .S file.
It's not used in the normal build process.

	Sam

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

* [PATCH] [#3 1/2] Generate vmlinux.lds instead of vmlinux.lds.s
  2004-08-13 18:33         ` Sam Ravnborg
  2004-08-13 19:09           ` Dan Aloni
@ 2004-08-14 19:46           ` Dan Aloni
  2004-08-15 18:35             ` Sam Ravnborg
  2004-08-14 19:49           ` [PATCH] [#3 2/2] " Dan Aloni
  2 siblings, 1 reply; 12+ messages in thread
From: Dan Aloni @ 2004-08-14 19:46 UTC (permalink / raw)
  To: Sam Ravnborg, Benno, Linux Kernel List

Hello Sam,

Here's the first patch. Note that I had to choose PPFLAGS instead 
of CPPFLAGS because otherwise it would have collided with the other
uses of CPPFLAGS.

I've test-built a clean kernel. 

This applies against 2.6.8.1 (the Olympic kernel :).

diff -urN -X dontdiff2 -X /home/karrde/colinux/bin/dontdiff linux-2.6.8.1-callisto/Makefile linux-2.6.8.1-callisto-work/Makefile
--- linux-2.6.8.1-callisto/Makefile	2004-08-14 18:00:44.000000000 +0300
+++ linux-2.6.8.1-callisto-work/Makefile	2004-08-14 21:09:34.000000000 +0300
@@ -300,6 +300,7 @@
 CFLAGS 		:= -Wall -Wstrict-prototypes -Wno-trigraphs \
 	  	   -fno-strict-aliasing -fno-common
 AFLAGS		:= -D__ASSEMBLY__
+PPFLAGS         := -D__ASSEMBLY__
 
 export	VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
 	CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
@@ -309,6 +310,7 @@
 export CPPFLAGS NOSTDINC_FLAGS OBJCOPYFLAGS LDFLAGS
 export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE 
 export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
+export PPFLAGS PPFLAGS_KERNEL PPFLAGS_MODULE
 
 # When compiling out-of-tree modules, put MODVERDIR in the module
 # tree rather than in the kernel tree. The kernel tree might
@@ -540,7 +542,7 @@
 
 do_system_map = $(NM) $(1) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > $(2)
 
-LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.s
+LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds
 
 #	Generate section listing all symbols and add it into vmlinux
 #	It's a three stage process:
@@ -584,13 +586,13 @@
 .tmp_kallsyms%.S: .tmp_vmlinux%
 	$(call cmd,kallsyms)
 
-.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
+.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds FORCE
 	$(call if_changed_rule,vmlinux__)
 
-.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
+.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds FORCE
 	$(call if_changed_rule,vmlinux__)
 
-.tmp_vmlinux3: $(vmlinux-objs) .tmp_kallsyms2.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
+.tmp_vmlinux3: $(vmlinux-objs) .tmp_kallsyms2.o arch/$(ARCH)/kernel/vmlinux.lds FORCE
 	$(call if_changed_rule,vmlinux__)
 
 endif
@@ -603,13 +605,13 @@
 	$(rule_verify_kallsyms)
 endef
 
-vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
+vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds FORCE
 	$(call if_changed_rule,vmlinux)
 
 #	The actual objects are generated when descending, 
 #	make sure no implicit rule kicks in
 
-$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.s: $(vmlinux-dirs) ;
+$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds: $(vmlinux-dirs) ;
 
 # Handle descending into subdirectories listed in $(vmlinux-dirs)
 # Preset locale variables to speed up the build process. Limit locale
@@ -667,7 +669,7 @@
 #	Leave this as default for preprocessing vmlinux.lds.S, which is now
 #	done in arch/$(ARCH)/kernel/Makefile
 
-export AFLAGS_vmlinux.lds.o += -P -C -U$(ARCH)
+export PPFLAGS_vmlinux.o += -P -C -U$(ARCH)
 
 # Single targets
 # ---------------------------------------------------------------------------
@@ -1106,6 +1108,10 @@
 	  $(NOSTDINC_FLAGS) $(CPPFLAGS) \
 	  $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o)
 
+pp_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(AFLAGS_KERNEL) \
+	  $(NOSTDINC_FLAGS) $(CPPFLAGS) \
+	  $(modkern_aflags) $(EXTRA_PPFLAGS) $(PPFLAGS_$(*F).o)
+
 quiet_cmd_as_o_S = AS      $@
 cmd_as_o_S       = $(CC) $(a_flags) -c -o $@ $<
 
diff -urN -X dontdiff2 -X /home/karrde/colinux/bin/dontdiff linux-2.6.8.1-callisto/arch/i386/kernel/Makefile linux-2.6.8.1-callisto-work/arch/i386/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/i386/kernel/Makefile	2004-08-14 18:00:04.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/i386/kernel/Makefile	2004-08-14 20:50:56.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y := head.o init_task.o vmlinux.lds.s
+extra-y := head.o init_task.o vmlinux.lds
 
 obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
 		ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \
diff -urN -X dontdiff2 -X /home/karrde/colinux/bin/dontdiff linux-2.6.8.1-callisto/scripts/Makefile.build linux-2.6.8.1-callisto-work/scripts/Makefile.build
--- linux-2.6.8.1-callisto/scripts/Makefile.build	2004-06-16 08:19:52.000000000 +0300
+++ linux-2.6.8.1-callisto-work/scripts/Makefile.build	2004-08-14 21:08:12.000000000 +0300
@@ -186,6 +186,20 @@
 %.lst: %.c FORCE
 	$(call if_changed_dep,cc_lst_c)
 
+# Linker scripts preprocessor (.lds.S -> .lds)
+# ---------------------------------------------------------------------------
+
+modkern_ppflags := $(PPFLAGS_KERNEL)
+
+$(real-objs-m)      : modkern_ppflags := $(PPFLAGS_MODULE)
+$(real-objs-m:.o=.s): modkern_ppflags := $(PPFLAGS_MODULE)
+
+quiet_cmd_cpp_lds_S    = LDS     $@
+      cmd_cpp_lds_S    = $(CPP) $(pp_flags) -o $@ $<
+
+%.lds: %.lds.S FORCE
+	$(call if_changed_dep,cpp_lds_S)
+
 # Compile assembler sources (.S)
 # ---------------------------------------------------------------------------
 
diff -urN -X dontdiff2 -X /home/karrde/colinux/bin/dontdiff linux-2.6.8.1-callisto/scripts/Makefile.lib linux-2.6.8.1-callisto-work/scripts/Makefile.lib
--- linux-2.6.8.1-callisto/scripts/Makefile.lib	2004-06-16 08:19:23.000000000 +0300
+++ linux-2.6.8.1-callisto-work/scripts/Makefile.lib	2004-08-14 21:07:00.000000000 +0300
@@ -139,6 +139,7 @@
 
 _c_flags       = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o)
 _a_flags       = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o)
+_pp_flags      = $(PPFLAGS) $(EXTRA_PPFLAGS) $(PPFLAGS_$(*F).o)
 _hostc_flags   = $(HOSTCFLAGS)   $(HOST_EXTRACFLAGS)   $(HOSTCFLAGS_$(*F).o)
 _hostcxx_flags = $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) $(HOSTCXXFLAGS_$(*F).o)
 
@@ -149,6 +150,7 @@
 ifeq ($(KBUILD_SRC),)
 __c_flags	= $(_c_flags)
 __a_flags	= $(_a_flags)
+__pp_flags	= $(_pp_flags)
 __hostc_flags	= $(_hostc_flags)
 __hostcxx_flags	= $(_hostcxx_flags)
 else
@@ -164,6 +166,7 @@
 # FIXME: Replace both with specific CFLAGS* statements in the makefiles
 __c_flags	= $(call addtree,-I$(obj)) $(call flags,_c_flags)
 __a_flags	=                          $(call flags,_a_flags)
+__pp_flags	=                          $(call flags,_pp_flags)
 __hostc_flags	= -I$(obj)                 $(call flags,_hostc_flags)
 __hostcxx_flags	= -I$(obj)                 $(call flags,_hostcxx_flags)
 endif
@@ -175,6 +178,9 @@
 a_flags        = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \
 		 $(__a_flags) $(modkern_aflags)
 
+pp_flags       = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \
+		 $(__pp_flags) $(modkern_ppflags)
+
 hostc_flags    = -Wp,-MD,$(depfile) $(__hostc_flags)
 hostcxx_flags  = -Wp,-MD,$(depfile) $(__hostcxx_flags)
 


-- 
Dan Aloni
da-x@colinux.org

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

* [PATCH] [#3 2/2] Generate vmlinux.lds instead of vmlinux.lds.s
  2004-08-13 18:33         ` Sam Ravnborg
  2004-08-13 19:09           ` Dan Aloni
  2004-08-14 19:46           ` [PATCH] [#3 1/2] Generate vmlinux.lds instead of vmlinux.lds.s Dan Aloni
@ 2004-08-14 19:49           ` Dan Aloni
  2 siblings, 0 replies; 12+ messages in thread
From: Dan Aloni @ 2004-08-14 19:49 UTC (permalink / raw)
  To: Sam Ravnborg, Benno, Linux Kernel List

Hello Sam,

This is for the other architectures. I haven't test-compiled it, though.

diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/alpha/kernel/Makefile linux-2.6.8.1-callisto-work/arch/alpha/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/alpha/kernel/Makefile	2004-06-16 08:19:22.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/alpha/kernel/Makefile	2004-08-14 21:15:28.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y		:= head.o vmlinux.lds.s
+extra-y		:= head.o vmlinux.lds
 EXTRA_AFLAGS	:= $(CFLAGS)
 EXTRA_CFLAGS	:= -Werror -Wno-sign-compare
 
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/arm/Makefile linux-2.6.8.1-callisto-work/arch/arm/Makefile
--- linux-2.6.8.1-callisto/arch/arm/Makefile	2004-08-14 18:00:03.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/arm/Makefile	2004-08-14 21:23:58.000000000 +0300
@@ -9,7 +9,7 @@
 
 LDFLAGS_vmlinux	:=-p --no-undefined -X
 LDFLAGS_BLOB	:=--format binary
-AFLAGS_vmlinux.lds.o = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
+PPFLAGS_vmlinux.o = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
 OBJCOPYFLAGS	:=-O binary -R .note -R .comment -S
 GZFLAGS		:=-9
 #CFLAGS		+=-pipe
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/arm/kernel/Makefile linux-2.6.8.1-callisto-work/arch/arm/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/arm/kernel/Makefile	2004-08-14 18:00:04.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/arm/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -26,7 +26,7 @@
 head-y			:= head.o
 obj-$(CONFIG_DEBUG_LL)	+= debug.o
 
-extra-y := $(head-y) init_task.o vmlinux.lds.s
+extra-y := $(head-y) init_task.o vmlinux.lds
 
 # Spell out some dependencies that aren't automatically figured out
 $(obj)/entry-armv.o: 	$(obj)/entry-header.S include/asm-arm/constants.h
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/arm26/Makefile linux-2.6.8.1-callisto-work/arch/arm26/Makefile
--- linux-2.6.8.1-callisto/arch/arm26/Makefile	2004-06-16 08:19:22.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/arm26/Makefile	2004-08-14 21:23:34.000000000 +0300
@@ -9,7 +9,7 @@
 
 LDFLAGS_vmlinux	:=-p -X
 LDFLAGS_BLOB	:=--format binary
-AFLAGS_vmlinux.lds.o = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
+PPFLAGS_vmlinux.o = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
 OBJCOPYFLAGS	:=-O binary -R .note -R .comment -S
 GZFLAGS		:=-9
 
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/arm26/kernel/Makefile linux-2.6.8.1-callisto-work/arch/arm26/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/arm26/kernel/Makefile	2004-06-16 08:19:22.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/arm26/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -14,5 +14,5 @@
 obj-$(CONFIG_FIQ)		+= fiq.o
 obj-$(CONFIG_MODULES)		+= armksyms.o
 
-extra-y := init_task.o vmlinux.lds.s
+extra-y := init_task.o vmlinux.lds
 
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/cris/Makefile linux-2.6.8.1-callisto-work/arch/cris/Makefile
--- linux-2.6.8.1-callisto/arch/cris/Makefile	2004-06-16 08:19:22.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/cris/Makefile	2004-08-14 21:22:49.000000000 +0300
@@ -29,7 +29,7 @@
 
 OBJCOPYFLAGS := -O binary -R .note -R .comment -S
 
-AFLAGS_vmlinux.lds.o = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
+PPFLAGS_vmlinux.o = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
 AFLAGS += -mlinux
 
 CFLAGS := $(CFLAGS) -mlinux -march=$(arch-y) -pipe
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/cris/kernel/Makefile linux-2.6.8.1-callisto-work/arch/cris/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/cris/kernel/Makefile	2004-06-16 08:19:36.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/cris/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -3,7 +3,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y	:= vmlinux.lds.s
+extra-y	:= vmlinux.lds
 
 obj-y   := process.o traps.o irq.o ptrace.o setup.o \
 	   time.o sys_cris.o semaphore.o
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/h8300/kernel/Makefile linux-2.6.8.1-callisto-work/arch/h8300/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/h8300/kernel/Makefile	2004-06-16 08:19:36.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/h8300/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y := vmlinux.lds.s
+extra-y := vmlinux.lds
 
 obj-y := process.o traps.o ptrace.o ints.o \
 	 sys_h8300.o time.o semaphore.o signal.o \
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/ia64/kernel/Makefile linux-2.6.8.1-callisto-work/arch/ia64/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/ia64/kernel/Makefile	2004-06-16 08:20:26.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/ia64/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y	:= head.o init_task.o vmlinux.lds.s
+extra-y	:= head.o init_task.o vmlinux.lds
 
 obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o	\
 	 irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o		\
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/m68k/kernel/Makefile linux-2.6.8.1-callisto-work/arch/m68k/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/m68k/kernel/Makefile	2004-06-16 08:19:44.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/m68k/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -7,7 +7,7 @@
 else
   extra-y := sun3-head.o
 endif
-extra-y	+= vmlinux.lds.s
+extra-y	+= vmlinux.lds
 
 obj-y		:= entry.o process.o traps.o ints.o signal.o ptrace.o \
 			sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/m68knommu/kernel/Makefile linux-2.6.8.1-callisto-work/arch/m68knommu/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/m68knommu/kernel/Makefile	2004-06-16 08:19:03.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/m68knommu/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for arch/m68knommu/kernel.
 #
 
-extra-y := vmlinux.lds.s
+extra-y := vmlinux.lds
 
 obj-y += dma.o entry.o init_task.o m68k_ksyms.o process.o ptrace.o semaphore.o \
 	 setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/mips/Makefile linux-2.6.8.1-callisto-work/arch/mips/Makefile
--- linux-2.6.8.1-callisto/arch/mips/Makefile	2004-08-14 18:00:05.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/mips/Makefile	2004-08-14 21:21:01.000000000 +0300
@@ -643,7 +643,7 @@
 # none has been choosen above.
 #
 
-AFLAGS_vmlinux.lds.o := \
+PPFLAGS_vmlinux.o := \
 	-D"LOADADDR=$(load-y)" \
 	-D"JIFFIES=$(JIFFIES)" \
 	-imacros $(srctree)/include/asm-$(ARCH)/sn/mapped_kernel.h
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/mips/kernel/Makefile linux-2.6.8.1-callisto-work/arch/mips/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/mips/kernel/Makefile	2004-08-14 18:00:05.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/mips/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the Linux/MIPS kernel.
 #
 
-extra-y		:= head.o init_task.o vmlinux.lds.s
+extra-y		:= head.o init_task.o vmlinux.lds
 
 obj-y		+= cpu-probe.o branch.o entry.o genex.o irq.o process.o \
 		   ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/parisc/kernel/Makefile linux-2.6.8.1-callisto-work/arch/parisc/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/parisc/kernel/Makefile	2004-06-16 08:19:09.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/parisc/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -4,7 +4,7 @@
 
 head-y			:= head.o
 head-$(CONFIG_PARISC64)	:= head64.o
-extra-y			:= init_task.o $(head-y) vmlinux.lds.s
+extra-y			:= init_task.o $(head-y) vmlinux.lds
 
 AFLAGS_entry.o	:= -traditional
 AFLAGS_pacache.o := -traditional
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/ppc/Makefile linux-2.6.8.1-callisto-work/arch/ppc/Makefile
--- linux-2.6.8.1-callisto/arch/ppc/Makefile	2004-08-14 18:00:05.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/ppc/Makefile	2004-08-14 21:20:56.000000000 +0300
@@ -70,7 +70,7 @@
 
 all: zImage
 
-AFLAGS_vmlinux.lds.o	:= -Upowerpc
+PPFLAGS_vmlinux.o	:= -Upowerpc
 
 # All the instructions talk about "make bzImage".
 bzImage: zImage
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/ppc/kernel/Makefile linux-2.6.8.1-callisto-work/arch/ppc/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/ppc/kernel/Makefile	2004-08-14 18:00:06.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/ppc/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -9,7 +9,7 @@
 extra-$(CONFIG_8xx)		:= head_8xx.o
 extra-$(CONFIG_6xx)		+= idle_6xx.o
 extra-$(CONFIG_POWER4)		+= idle_power4.o
-extra-y				+= vmlinux.lds.s
+extra-y				+= vmlinux.lds
 
 obj-y				:= entry.o traps.o irq.o idle.o time.o misc.o \
 					process.o signal.o ptrace.o align.o \
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/ppc64/kernel/Makefile linux-2.6.8.1-callisto-work/arch/ppc64/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/ppc64/kernel/Makefile	2004-08-14 18:00:06.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/ppc64/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -3,7 +3,7 @@
 #
 
 EXTRA_CFLAGS	+= -mno-minimal-toc
-extra-y		:= head.o vmlinux.lds.s
+extra-y		:= head.o vmlinux.lds
 
 obj-y               :=	setup.o entry.o traps.o irq.o idle.o dma.o \
 			time.o process.o signal.o syscalls.o misc.o ptrace.o \
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/s390/kernel/Makefile linux-2.6.8.1-callisto-work/arch/s390/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/s390/kernel/Makefile	2004-08-14 18:00:06.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/s390/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -10,7 +10,7 @@
 
 extra-$(CONFIG_ARCH_S390_31)	+= head.o 
 extra-$(CONFIG_ARCH_S390X)	+= head64.o 
-extra-y				+= init_task.o vmlinux.lds.s
+extra-y				+= init_task.o vmlinux.lds
 
 obj-$(CONFIG_MODULES)		+= s390_ksyms.o module.o
 obj-$(CONFIG_SMP)		+= smp.o
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/sh/Makefile linux-2.6.8.1-callisto-work/arch/sh/Makefile
--- linux-2.6.8.1-callisto/arch/sh/Makefile	2004-08-14 18:00:06.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/sh/Makefile	2004-08-14 21:21:32.000000000 +0300
@@ -122,7 +122,7 @@
 
 boot := arch/sh/boot
 
-AFLAGS_vmlinux.lds.o := -traditional
+PPFLAGS_vmlinux.o := -traditional
 
 prepare: target_links
 
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/sh/boot/compressed/Makefile linux-2.6.8.1-callisto-work/arch/sh/boot/compressed/Makefile
--- linux-2.6.8.1-callisto/arch/sh/boot/compressed/Makefile	2004-08-14 18:00:06.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/sh/boot/compressed/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -22,7 +22,7 @@
 CONFIG_BOOT_LINK_OFFSET ?= 0x00800000
 IMAGE_OFFSET := $(shell printf "0x%8x" $$[0x80000000+$(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET)])
 
-LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds.s
+LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds
 
 $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
 	$(call if_changed,ld)
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/sh/kernel/Makefile linux-2.6.8.1-callisto-work/arch/sh/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/sh/kernel/Makefile	2004-08-14 18:00:06.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/sh/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the Linux/SuperH kernel.
 #
 
-extra-y	:= head.o init_task.o vmlinux.lds.s
+extra-y	:= head.o init_task.o vmlinux.lds
 
 obj-y	:= process.o signal.o entry.o traps.o irq.o \
 	ptrace.o setup.o time.o sys_sh.o semaphore.o \
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/sparc/boot/Makefile linux-2.6.8.1-callisto-work/arch/sparc/boot/Makefile
--- linux-2.6.8.1-callisto/arch/sparc/boot/Makefile	2004-06-16 08:20:03.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/sparc/boot/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -19,7 +19,7 @@
 
 BTOBJS := $(HEAD_Y) $(INIT_Y)
 BTLIBS := $(CORE_Y) $(LIBS_Y) $(DRIVERS_Y) $(NET_Y)
-LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds.s $(BTOBJS) --start-group $(BTLIBS) --end-group $(kallsyms.o)
+LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds $(BTOBJS) --start-group $(BTLIBS) --end-group $(kallsyms.o)
 
 # Actual linking
 $(obj)/image: $(obj)/btfix.o FORCE
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/sparc/kernel/Makefile linux-2.6.8.1-callisto-work/arch/sparc/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/sparc/kernel/Makefile	2004-06-16 08:19:52.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/sparc/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y		:= head.o init_task.o vmlinux.lds.s
+extra-y		:= head.o init_task.o vmlinux.lds
 
 EXTRA_AFLAGS	:= -ansi
 
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/sparc64/Makefile linux-2.6.8.1-callisto-work/arch/sparc64/Makefile
--- linux-2.6.8.1-callisto/arch/sparc64/Makefile	2004-06-16 08:20:25.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/sparc64/Makefile	2004-08-14 21:20:46.000000000 +0300
@@ -10,7 +10,7 @@
 
 CHECK		:= $(CHECK) -D__sparc__=1 -D__sparc_v9__=1
 
-AFLAGS_vmlinux.lds.o += -Usparc
+PPFLAGS_vmlinux.o += -Usparc
 
 CC		:= $(shell if $(CC) -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo $(CC); else echo sparc64-linux-gcc; fi )
 
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/sparc64/kernel/Makefile linux-2.6.8.1-callisto-work/arch/sparc64/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/sparc64/kernel/Makefile	2004-06-16 08:19:01.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/sparc64/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -5,7 +5,7 @@
 EXTRA_AFLAGS := -ansi
 EXTRA_CFLAGS := -Werror
 
-extra-y		:= head.o init_task.o vmlinux.lds.s
+extra-y		:= head.o init_task.o vmlinux.lds
 
 obj-y		:= process.o setup.o cpu.o idprom.o \
 		   traps.o devices.o auxio.o \
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/um/Makefile linux-2.6.8.1-callisto-work/arch/um/Makefile
--- linux-2.6.8.1-callisto/arch/um/Makefile	2004-06-16 08:19:37.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/um/Makefile	2004-08-14 21:22:25.000000000 +0300
@@ -98,12 +98,12 @@
 CONFIG_KERNEL_STACK_ORDER ?= 2
 STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] )
 
-AFLAGS_vmlinux.lds.o = -U$(SUBARCH) \
+PPFLAGS_vmlinux.o = -U$(SUBARCH) \
 	-DSTART=$$(($(TOP_ADDR) - $(SIZE))) -DELF_ARCH=$(ELF_ARCH) \
 	-DELF_FORMAT=\"$(ELF_FORMAT)\" $(CPP_MODE_TT) \
 	-DKERNEL_STACK_SIZE=$(STACK_SIZE)
 
-AFLAGS_$(LD_SCRIPT-y:.s=).o = $(AFLAGS_vmlinux.lds.o) -P -C -Uum
+PPFLAGS_$(LD_SCRIPT-y:.s=).o = $(PPFLAGS_vmlinux.o) -P -C -Uum
 
 LD_SCRIPT-y := $(ARCH_DIR)/$(LD_SCRIPT-y)
 
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/um/kernel/Makefile linux-2.6.8.1-callisto-work/arch/um/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/um/kernel/Makefile	2004-06-16 08:19:42.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/um/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -3,7 +3,7 @@
 # Licensed under the GPL
 #
 
-extra-y := vmlinux.lds.s
+extra-y := vmlinux.lds
 
 obj-y = checksum.o config.o exec_kern.o exitcode.o frame_kern.o frame.o \
 	helper.o init_task.o irq.o irq_user.o ksyms.o mem.o mem_user.o \
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/v850/kernel/Makefile linux-2.6.8.1-callisto-work/arch/v850/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/v850/kernel/Makefile	2004-06-16 08:20:26.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/v850/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -9,7 +9,7 @@
 # for more details.
 #
 
-extra-y := head.o init_task.o vmlinux.lds.s
+extra-y := head.o init_task.o vmlinux.lds
 
 obj-y += intv.o entry.o process.o syscalls.o time.o semaphore.o setup.o \
 	 signal.o irq.o mach.o ptrace.o bug.o
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/x86_64/kernel/Makefile linux-2.6.8.1-callisto-work/arch/x86_64/kernel/Makefile
--- linux-2.6.8.1-callisto/arch/x86_64/kernel/Makefile	2004-06-16 08:19:43.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/x86_64/kernel/Makefile	2004-08-14 21:15:29.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y 	:= head.o head64.o init_task.o vmlinux.lds.s
+extra-y 	:= head.o head64.o init_task.o vmlinux.lds
 EXTRA_AFLAGS	:= -traditional
 obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o \
 		ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \
diff -X dontdiff -urN linux-2.6.8.1-callisto/arch/x86_64/kernel/Makefile-HEAD linux-2.6.8.1-callisto-work/arch/x86_64/kernel/Makefile-HEAD
--- linux-2.6.8.1-callisto/arch/x86_64/kernel/Makefile-HEAD	2004-06-16 08:19:52.000000000 +0300
+++ linux-2.6.8.1-callisto-work/arch/x86_64/kernel/Makefile-HEAD	2004-08-14 21:15:29.000000000 +0300
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-y 	:= head.o head64.o init_task.o vmlinux.lds.s
+extra-y 	:= head.o head64.o init_task.o vmlinux.lds
 EXTRA_AFLAGS	:= -traditional
 obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o \
 		ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \


-- 
Dan Aloni
da-x@colinux.org

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

* Re: [PATCH] [#3 1/2] Generate vmlinux.lds instead of vmlinux.lds.s
  2004-08-14 19:46           ` [PATCH] [#3 1/2] Generate vmlinux.lds instead of vmlinux.lds.s Dan Aloni
@ 2004-08-15 18:35             ` Sam Ravnborg
  0 siblings, 0 replies; 12+ messages in thread
From: Sam Ravnborg @ 2004-08-15 18:35 UTC (permalink / raw)
  To: Dan Aloni; +Cc: Sam Ravnborg, Benno, Linux Kernel List

On Sat, Aug 14, 2004 at 10:46:25PM +0300, Dan Aloni wrote:
> Hello Sam,
> 
> Here's the first patch. Note that I had to choose PPFLAGS instead 
> of CPPFLAGS because otherwise it would have collided with the other
> uses of CPPFLAGS.
That collision was intentional.
I have changed that to cppflags and added both your patches to my tree.
The 2/2 missed a few *lds files which added also.
Thanks for your effort!


	Sam

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

end of thread, other threads:[~2004-08-15 18:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-12 19:25 Generation of *.s files from *.S files in kbuild Dan Aloni
2004-08-13  0:37 ` Benno
2004-08-13  5:04   ` Sam Ravnborg
2004-08-13  8:09     ` [PATCH 1/2] " Dan Aloni
2004-08-13  9:24       ` [PATCH 1/2] #2 (Generation of *.s files from *.S files in kbuild) Dan Aloni
2004-08-13 18:33         ` Sam Ravnborg
2004-08-13 19:09           ` Dan Aloni
2004-08-13 19:17             ` Sam Ravnborg
2004-08-14 19:46           ` [PATCH] [#3 1/2] Generate vmlinux.lds instead of vmlinux.lds.s Dan Aloni
2004-08-15 18:35             ` Sam Ravnborg
2004-08-14 19:49           ` [PATCH] [#3 2/2] " Dan Aloni
2004-08-13  8:12     ` Generation of *.s files from *.S files in kbuild Dan Aloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox