Patchwork [2/5] sparc: define __linux__ to fix defconfig build

login
register
mail settings
Submitter Sam Ravnborg
Date March 30, 2013, 9:44 p.m.
Message ID <1364679866-29982-2-git-send-email-sam@ravnborg.org>
Download mbox | patch
Permalink /patch/232576/
State Rejected
Delegated to: David Miller
Headers show

Comments

Sam Ravnborg - March 30, 2013, 9:44 p.m.
The gcc version I use do not include a definition of __linux__.
Like many other archs add this to CFLAGS.

This fixes at least the following build error:
include/uapi/linux/coda.h:221: error: expected specifier-qualifier-list before 'u_quad_t'

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 arch/sparc/Makefile |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
David Miller - March 30, 2013, 9:46 p.m.
From: Sam Ravnborg <sam@ravnborg.org>
Date: Sat, 30 Mar 2013 22:44:23 +0100

> The gcc version I use do not include a definition of __linux__.

Then it's not a gcc targetting Linux.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sam Ravnborg - March 30, 2013, 9:57 p.m.
On Sat, Mar 30, 2013 at 05:46:22PM -0400, David Miller wrote:
> From: Sam Ravnborg <sam@ravnborg.org>
> Date: Sat, 30 Mar 2013 22:44:23 +0100
> 
> > The gcc version I use do not include a definition of __linux__.
> 
> Then it's not a gcc targetting Linux.

It was built some time ago using crosstool-ng. I added ssupport for sparc
some time ago - but seems I got it wrong. I should fix that...

Do you have a configure command I can use to build my own gcc's
for sparc32 + sparc64 for now?

	Sam
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - March 30, 2013, 10:01 p.m.
From: Sam Ravnborg <sam@ravnborg.org>
Date: Sat, 30 Mar 2013 22:57:50 +0100

> On Sat, Mar 30, 2013 at 05:46:22PM -0400, David Miller wrote:
>> From: Sam Ravnborg <sam@ravnborg.org>
>> Date: Sat, 30 Mar 2013 22:44:23 +0100
>> 
>> > The gcc version I use do not include a definition of __linux__.
>> 
>> Then it's not a gcc targetting Linux.
> 
> It was built some time ago using crosstool-ng. I added ssupport for sparc
> some time ago - but seems I got it wrong. I should fix that...
> 
> Do you have a configure command I can use to build my own gcc's
> for sparc32 + sparc64 for now?

The only critical option is "--enable-targets=all" which, when building
a 32-bit compiler binary, will enable support for 64-bit code generation.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index 541b8b0..f489626 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -14,6 +14,8 @@  else
         KBUILD_DEFCONFIG := sparc64_defconfig
 endif
 
+KBUILD_CFLAGS  += -D__linux__
+
 ifeq ($(CONFIG_SPARC32),y)
 #####
 # sparc32