From 9ae95bce73ef2d12fbe32a03ed230a9bef667328 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Mon, 7 Jul 2008 22:30:35 +0200 Subject: sparc: add -m64 when building vmlinux.lds David Miller noticed that the build of vmlinux.lds failed to use the -m64 specifier. This caused the build to break with a bi-arch gcc with unified headers. Add the -m64 option to CPPFLAGS_vmlinux.lds so we have the correct defines available when building vmliux.lds. Signed-off-by: Sam Ravnborg --- arch/sparc64/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'arch/sparc64/Makefile') diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile index 4b8f2b084c2..b785a395b12 100644 --- a/arch/sparc64/Makefile +++ b/arch/sparc64/Makefile @@ -9,7 +9,9 @@ CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -m64 -CPPFLAGS_vmlinux.lds += -Usparc +# Undefine sparc when processing vmlinux.lds - it is used +# And teach CPP we are doing 64 bit builds (for this case) +CPPFLAGS_vmlinux.lds += -m64 -Usparc LDFLAGS := -m elf64_sparc -- cgit v1.2.3-70-g09d2 From 4845afac95a653f8e64c45024cbb94264df54b8f Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 11 Sep 2008 23:14:52 -0700 Subject: sparc64: Add __arch64__ to CHECKFLAGS Otherwise sparse doesn't work. The 32 vs. 64 header ifdef used under arch/sparc/include/asm/ is: #if defined(__sparc__) && defined(__arch64__) And that doesn't work for sparse unless we give it __arch64__ Signed-off-by: David S. Miller --- arch/sparc64/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/sparc64/Makefile') diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile index b785a395b12..c7214abc0d8 100644 --- a/arch/sparc64/Makefile +++ b/arch/sparc64/Makefile @@ -7,7 +7,7 @@ # Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) # -CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -m64 +CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -D__arch64__ -m64 # Undefine sparc when processing vmlinux.lds - it is used # And teach CPP we are doing 64 bit builds (for this case) -- cgit v1.2.3-70-g09d2