Skip to contentSkip to conversation

Lossage do to #ifndef __ASSEMBLY__ in mipsregs.h

PATCH David Daney 2 participants 3 messages Jan 22, 2004 – Jan 23, 2004 MIPS

lore
Share & tools
lore
#0 lore raw

I am using gcc 3.3.1 to compile the linux_2_4 kernel obtained from cvs a couple of days ago.

My gcc defines these assemble related macros:

[daney@dl xilleon]$ mipsel-linux-gcc -D__KERNEL__ -I/newdisk/programs/linux-mips.org/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -I /newdisk/programs/linux-mips.org/linux/include/asm/gcc -G 0 -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap -DLINUX_RAM_START=0x80100000 -dM -E -c xilleonIRQ.S | grep ASS #define __ASSEMBLER__ 1
#define LANGUAGE_ASSEMBLY 1
#define __LANGUAGE_ASSEMBLY 1
#define __LANGUAGE_ASSEMBLY__ 1
#define _LANGUAGE_ASSEMBLY 1

Now in mipsregs.h we have:
.
.
.
#ifndef __ASSEMBLY__
.
.
.

So I get a ton of errors trying to assemble the file.

Now back on 2002/06/27 we have:

===================================================================
RCS file: /home/cvs/linux/include/asm-mips/mipsregs.h,v retrieving revision 1.30.2.8
retrieving revision 1.30.2.9

include/asm-mips/mipsregs.h +0 -0
diff -u -p -r1.30.2.8 -r1.30.2.9
@@ -445,7 +445,7 @@

#define CEB_KERNEL 2 /* Count events in kernel mode EXL = ERL = 0 */
#define CEB_EXL 1 /* Count events with EXL = 1, ERL = 0 */

-#ifndef _LANGUAGE_ASSEMBLY
+#ifndef __ASSEMBLY__

/*
* Functions to access the r10k performance counter and control registers

@@ -1023,6 +1023,6 @@ do {									\
		__disable_fpu();					\
} while (0)

-#endif /* !defined (_LANGUAGE_ASSEMBLY) */
+#endif /* !__ASSEMBLY__ */

#endif /* _ASM_MIPSREGS_H */

Why the change?

I will fix my local mipsregs.h so that I can continue, but it seems like the sources in CVS should be changed to allow gcc 3.3.1 to work.

David Daney.

#1 lore raw
Quoted 2 lines · David Daney

I am using gcc 3.3.1 to compile the linux_2_4 kernel obtained from cvs a couple of days ago.

[snip]

Quoted 6 lines
(quoted diff) +1 -1
-#endif /* !defined (_LANGUAGE_ASSEMBLY) */
+#endif /* !__ASSEMBLY__ */

#endif /* _ASM_MIPSREGS_H */

Why the change?

__ASSEMBLY__ is defined by the Linux build system in order to have a compiler independent test.

Quoted 2 lines

I will fix my local mipsregs.h so that I can continue, but it seems like the sources in CVS should be changed to allow gcc 3.3.1 to work.

It works here (for my configs). Your linux tree seems to be broken.

Thiemo

#2 lore raw
Quoted 12 lines · Thiemo Seufer
Quoted 3 lines · David Daney

I am using gcc 3.3.1 to compile the linux_2_4 kernel obtained from cvs a couple of days ago.

[snip]

Quoted 3 lines
(quoted diff) +1 -1
-#endif /* !defined (_LANGUAGE_ASSEMBLY) */
+#endif /* !__ASSEMBLY__ */
Quoted 9 lines
Quoted 5 lines

#endif /* _ASM_MIPSREGS_H */

Why the change?

__ASSEMBLY__ is defined by the Linux build system in order to have a compiler independent test.

I am starting to understand this.

Quoted 13 lines
Quoted 6 lines

I will fix my local mipsregs.h so that I can continue, but it seems like the sources in CVS should be changed to allow gcc 3.3.1 to work.

It works here (for my configs). Your linux tree seems to be broken.

Thiemo

I am porting my BSP from 2.4.18 to the latest, and it seems I may have some Makefile incompatibility. So I withdraw my criticism of defined(__ASSEMBLY__).

David Daney