Skip to contentSkip to conversation

c6x: Makefile: Add -D__linux__

PATCH New Chen Gang S 2 participants 2 messages Mar 2, 2015 – Mar 26, 2015 1 message not in the archive

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 c6x: Makefile: Add -D__linux__

In reply to a message not in the archive

Just forward mail.

-------- Forwarded Message --------
Subject: [PATCH] c6x: Makefile: Add -D__linux__
Date: Tue, 03 Mar 2015 06:33:42 +0800
From: Chen Gang <[email protected]>
To: Mark Salter <[email protected]>, [email protected]
CC: [email protected] <[email protected]>, [email protected] <[email protected]>

For gcc5 c6x raw compiler, at present, it may not define __linux__, so c6x kernel still needs to define __linux__ just like another archs have done. The related error:

CC [M] fs/coda/psdev.o
In file included from include/linux/coda.h:64:0,

                 from fs/coda/psdev.c:45:

include/uapi/linux/coda.h:221:2: error: unknown type name 'u_quad_t'
u_quad_t va_size; /* file size in bytes */
^
include/uapi/linux/coda.h:229:2: error: unknown type name 'u_quad_t'
u_quad_t va_bytes; /* bytes of disk space held by file */ ^
include/uapi/linux/coda.h:230:2: error: unknown type name 'u_quad_t'
u_quad_t va_filerev; /* file modification number */
^

---
 arch/c6x/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/c6x/Makefile +1 -1
index e72eb34..6b0be67 100644
@@ -8,7 +8,7 @@
 
 KBUILD_DEFCONFIG := dsk6455_defconfig
 
-cflags-y += -mno-dsbt -msdata=none
+cflags-y += -mno-dsbt -msdata=none -D__linux__
 
 cflags-$(CONFIG_C6X_BIG_KERNEL) += -mlong-calls
 
Signature · 1 line
1.9.3
#2 lore raw
In reply to a message not in the archive
Quoted 17 lines · Chen Gang

For gcc5 c6x raw compiler, at present, it may not define __linux__, so c6x kernel still needs to define __linux__ just like another archs have done. The related error:

CC [M] fs/coda/psdev.o
In file included from include/linux/coda.h:64:0,

                 from fs/coda/psdev.c:45:

include/uapi/linux/coda.h:221:2: error: unknown type name 'u_quad_t'
u_quad_t va_size; /* file size in bytes */
^
include/uapi/linux/coda.h:229:2: error: unknown type name 'u_quad_t'
u_quad_t va_bytes; /* bytes of disk space held by file */ ^
include/uapi/linux/coda.h:230:2: error: unknown type name 'u_quad_t'
u_quad_t va_filerev; /* file modification number */
^

Quoted 2 lines

---

Thanks! I added this to the c6x tree for next merge window.

Quoted 16 lines
 arch/c6x/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/c6x/Makefile +1 -1
index e72eb34..6b0be67 100644
@@ -8,7 +8,7 @@
 
 KBUILD_DEFCONFIG := dsk6455_defconfig
 
-cflags-y += -mno-dsbt -msdata=none
+cflags-y += -mno-dsbt -msdata=none -D__linux__
 
 cflags-$(CONFIG_C6X_BIG_KERNEL) += -mlong-calls