Re: [GIT PULL (updated)] kbuild updates

Previous thread: [PATCH] Map volume and brightness events on thinkpads by Jeremy Katz on Monday, October 15, 2007 - 1:45 pm. (47 messages)

Next thread: Killing a network connection by Stefan Monnier on Monday, October 15, 2007 - 11:40 am. (4 messages)
From: Sam Ravnborg
Date: Monday, October 15, 2007 - 1:50 pm

Hi Linus.

The kbuild patches has been rebased on top of -linus after
the x86 merge.
The patch that caused ARCH to be unset has been withdrawn for
now. It had additional issues and I need to do additional changes
to get it included - in other words it will await next merge window.

The following patches does almost clear my patch queue. I have some
fixes pending but need some more time to check them out.
On top of this I have a few reports from -mm that needs attention too.
So in other words I expect a smaller set of patches for -rc1 or -rc2
as my time permits.

In addition to latest pull request this one includes:
- rename of
	CFLAGS => KBUILD_CFLAGS
	AFLAGS => KBUILD_AFLAGS
	CPPFLAGS => KBUILD_CPPFLAGS
    rationale behind this was two-fold:
    1) Do not let the CFLAGS environment variable impact all builds
    2) Allow one to specify addition gcc options on the commandline
       as make CLFAGS=-Os ...
- introducing ccflags-y, asflags-y and ldflags-y as the future
  replacement of the EXTRA_* variants.


The majority (line wise) is update of generated files.
The rest is almost all one-liners so nothing controversial.
The file with most lines changed is makefiles.txt!

Please pull from:

	git://git.kernel.org/pub/scm/linux/kernel/sam/kbuild.git
	[Just pushed - It may need an additional hour to sync out...]
	
	Sam


 CREDITS                                |    6 +
 Documentation/kbuild/makefiles.txt     |   62 +-
 MAINTAINERS                            |    4 -
 Makefile                               |   57 +-
 arch/alpha/Makefile                    |    2 +-
 arch/alpha/kernel/Makefile             |    2 +-
 arch/alpha/lib/Makefile                |    2 +-
 arch/arm/Makefile                      |   14 +-
 arch/arm/boot/compressed/Makefile      |    2 +-
 arch/arm/vfp/Makefile                  |    2 +-
 arch/avr32/Makefile                    |    8 +-
 arch/blackfin/Kconfig                  |    2 +-
 arch/blackfin/Makefile                 |    4 +-
 ...
From: Markus Trippelsdorf
Date: Tuesday, October 16, 2007 - 2:11 pm

Bisecting shows that:

commit f77bf01425b11947eeb3b5b54685212c302741b8
	Author: Sam Ravnborg <sam@neptun.(none)>
 	Date:   Mon Oct 15 22:25:06 2007 +0200

    kbuild: introduce ccflags-y, asflags-y and ldflags-y

breaks booting with grub here. Grub stops with error 28: 
Selected item cannot fit into memory.

Reverting the commit fixes the problem.
-- 
Markus
-

From: Randy Dunlap
Date: Tuesday, October 16, 2007 - 2:23 pm

Wow.  I had a similar issue with lilo, but I had no idea
what may have caused it.  Thanks.


Fatal: Kernel /boot/kernel-2.6.23-git10 is too big
ERROR:  Failed to run lilo.


---
~Randy
-

From: Ismail
Date: Tuesday, October 16, 2007 - 2:34 pm

Wednesday 17 October 2007 Tarihinde 00:11:01 yazmıştı:

Same issue here.

-- 
Faith is believing what you know isn't so -- Mark Twain
-

From: Sam Ravnborg
Date: Tuesday, October 16, 2007 - 3:04 pm

Thanks for this excellent report!
Following patch fixes the issue.
The target specific assignmnet used in x86/boot fooled kbuild.
I have audited the kernel for similar uses and found no
other places this was used.

Linus please pull the fix below from:

	ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/kbuild.git

	Sam

diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index d6ed8e5..e8756e5 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -64,10 +64,10 @@ KBUILD_CFLAGS	:= $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
 KBUILD_AFLAGS	:= $(KBUILD_CFLAGS) -D__ASSEMBLY__
 
 $(obj)/zImage:  IMAGE_OFFSET := 0x1000
-$(obj)/zImage:  EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK)
+$(obj)/zImage:  asflags-y := $(SVGA_MODE) $(RAMDISK)
 $(obj)/bzImage: IMAGE_OFFSET := 0x100000
-$(obj)/bzImage: EXTRA_CFLAGS := -D__BIG_KERNEL__
-$(obj)/bzImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__
+$(obj)/bzImage: ccflags-y := -D__BIG_KERNEL__
+$(obj)/bzImage: asflags-y := $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__
 $(obj)/bzImage: BUILDFLAGS   := -b
 
 quiet_cmd_image = BUILD   $@
-

From: Eric W. Biederman
Date: Tuesday, October 16, 2007 - 4:24 pm

With the Makefile changes dealing with EXTRA_AFLAGS and
EXTRA_CFLAGS when we attempt to build a bzImage
we get a zImage instead.  Ouch!

Fixup the makefile to use the new ccflags-y and asflags-y
so that we can build a bzImage again.  Making it possible
to actually test the recent kernel changes.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/x86/boot/Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index d6ed8e5..0e4912f 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -64,10 +64,10 @@ KBUILD_CFLAGS	:= $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
 KBUILD_AFLAGS	:= $(KBUILD_CFLAGS) -D__ASSEMBLY__
 
 $(obj)/zImage:  IMAGE_OFFSET := 0x1000
-$(obj)/zImage:  EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK)
+$(obj)/zImage:  asflags-y += $(SVGA_MODE) $(RAMDISK)
 $(obj)/bzImage: IMAGE_OFFSET := 0x100000
-$(obj)/bzImage: EXTRA_CFLAGS := -D__BIG_KERNEL__
-$(obj)/bzImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__
+$(obj)/bzImage: ccflags-y += -D__BIG_KERNEL__
+$(obj)/bzImage: asflags-y += $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__
 $(obj)/bzImage: BUILDFLAGS   := -b
 
 quiet_cmd_image = BUILD   $@
-- 
1.5.3.rc6.17.g1911

-

Previous thread: [PATCH] Map volume and brightness events on thinkpads by Jeremy Katz on Monday, October 15, 2007 - 1:45 pm. (47 messages)

Next thread: Killing a network connection by Stefan Monnier on Monday, October 15, 2007 - 11:40 am. (4 messages)