Skip to contentSkip to conversation

m32r: build fix for 2.6.30-rc3-git2

GIT PULL Hirokazu Takata 1 participant 1 message May 2, 2009

lore
Share & tools
lore
#0 lore raw

(was Re: [PATCH 07/15] m32r: convert to use __HEAD and HEAD_TEXT macros.)
In-Reply-To: <swfd4ax1meq.wl%[email protected]>
References: <[email protected]>

	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<swfd4ax1meq.wl%[email protected]>

User-Agent: Wanderlust/2.14.0 (Africa) Emacs/22.2 Mule/5.0 (SAKAKI)

Hello, Linus and folks,

[PATCH 07/15] m32r: convert to use __HEAD and HEAD_TEXT macros.
commit: 34963696629b6d1e0066a5f2e67993e409c9434b

The above patch causes the following build error of 2.6.30-rc3-git2:

AS arch/m32r/kernel/head.o
In file included from /include/linux/init.h:7,
from /arch/m32r/kernel/head.S:11:
/include/linux/stringify.h:9: error: syntax error in macro parameter list /include/linux/stringify.h:10: error: syntax error in macro parameter list

It is because __HEAD macro uses a __stringify() macro and the __stringify() macro depends on the gcc's variadic macro extension function, though -traditional option is specified as EXTRA_AFLAGS in the m32r kernel.

Make __stringify support variable argument macros too
commit: 8f7c2c37319a81ef4c2bfdec67b1ccd5744d97e4

I think we can remove -traditional option from EXTRA_AFLAGS for the m32r.

Please pull from the m32r git tree:
git://www.linux-m32r.org/git/takata/linux-2.6_dev.git for-linus

Thank you.

-- Takata

Hirokazu Takata (2):
m32r: build fix for __stringify macro
m32r: use __stringify() macro in assembler.h

commit 9cd67243de582c206758adff152c5fcc1b2aa069

Author: Hirokazu Takata <[email protected]>
Date:   Sat May 2 22:08:33 2009 +0900

m32r: use __stringify() macro in assembler.h

Replace #x with __stringify(x).
Also, #ifndef __STR is removed and undefine __STR macro at the beginning.

The __STR() macro is still remained, because the assembler.h might be included from assembly codes as well as C codes.

---
 arch/m32r/include/asm/assembler.h |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
arch/m32r/include/asm/assembler.h +4 -3
index 2635153..728799f 100644
@@ -9,14 +9,15 @@
  * This file contains M32R architecture specific macro definitions.
  */
 
+#include <linux/stringify.h>
+
+#undef __STR
 
-#ifndef __STR
 #ifdef __ASSEMBLY__
 #define __STR(x) x
 #else
-#define __STR(x) #x
+#define __STR(x) __stringify(x)
 #endif
-#endif /* __STR */
 
 #ifdef CONFIG_SMP
 #define M32R_LOCK	__STR(lock)

commit 9c88b06dc7589fb0bccd617c4659066fb803cfda

Author: Hirokazu Takata <[email protected]>
Date:   Sat May 2 20:29:00 2009 +0900

m32r: build fix for __stringify macro

This patch fixes the following build error of 2.6.30-rc3-git2:

AS arch/m32r/kernel/head.o
In file included from /include/linux/init.h:7,
from /arch/m32r/kernel/head.S:11:
/include/linux/stringify.h:9: error: syntax error in macro parameter list /include/linux/stringify.h:10: error: syntax error in macro parameter list

This build error was caused at __HEAD macro in arch/m32r/kernel/head.S, which uses __stringify() macro.

Remove -traditional option from EXTRA_AFLAGS for the m32r, because the __stringify() macro depends on the gcc's variadic macro extension function, due to commit:

Make __stringify support variable argument macros too
commit: 8f7c2c37319a81ef4c2bfdec67b1ccd5744d97e4

---
 arch/m32r/boot/compressed/Makefile |    1 -
 arch/m32r/kernel/Makefile          |    2 --
 2 files changed, 0 insertions(+), 3 deletions(-)
arch/m32r/boot/compressed/Makefile +0 -1
index d908e1d..560484a 100644
@@ -6,7 +6,6 @@
 
 targets		:= vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o \
 		   piggy.o vmlinux.lds
-EXTRA_AFLAGS	:= -traditional
 
 OBJECTS = $(obj)/head.o $(obj)/misc.o
 
arch/m32r/kernel/Makefile +0 -2
index 09200d4..b1a4b60 100644
@@ -9,5 +9,3 @@ obj-y	:= process.o entry.o traps.o align.o irq.o setup.o time.o \
 
 obj-$(CONFIG_SMP)		+= smp.o smpboot.o
 obj-$(CONFIG_MODULES)		+= module.o
-
-EXTRA_AFLAGS	:= -traditional
Quoted 49 lines

From: Sam Ravnborg <[email protected]>
Subject: Re: [PATCH 07/15] m32r: convert to use __HEAD and HEAD_TEXT macros.
Date: Sun, 26 Apr 2009 13:21:45 +0200

Quoted 8 lines · Tim Abbott
Quoted 6 lines

This has the consequence of changing the section name use for head code from ".text.head" to ".head.text". Since this commit changes all users in the architecture, this change should be harmless.

Cc Hirokazu Takata <[email protected]>
Quoted 35 lines
Quoted 34 lines
---
 arch/m32r/kernel/head.S        |    2 +-
 arch/m32r/kernel/vmlinux.lds.S |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/m32r/kernel/head.S +1 -1
index 9091606..0a71944 100644
@@ -23,7 +23,7 @@ __INITDATA
 /*
  * References to members of the boot_cpu_data structure.
  */
-.section .text.head, "ax"
+__HEAD
 	.global	start_kernel
 	.global __bss_start
 	.global _end
arch/m32r/kernel/vmlinux.lds.S +1 -1
index 9db05df..4179adf 100644
@@ -27,7 +27,7 @@ SECTIONS
   _text = .;			/* Text and read-only data */
   .boot : { *(.boot) } = 0
   .text : {
-	*(.text.head)
+	HEAD_TEXT
 	TEXT_TEXT
 	SCHED_TEXT
 	LOCK_TEXT
Signature · 1 line
1.6.2.1