[uClibc] __ASSEMBLER__
happrak2
happrak2 at thomson.net
Mon Nov 17 10:25:00 UTC 2003
Hi,
I still have the problem when I compile assembler code.
On the web I found allways the same: __ASSEMBLER__ is
defined if the compiler compiles assembler code (filename.S
or filename.s). But not with my toolchain. Do I have to
set some flags when I compile the toolchain?
Thanks, Sven
This was the original message:
I compiled the toolchain for sparc. Now the assembler
makes the following error:
.
.
AS arch/sparc/kernel/entry.o
include/asm/leon.h: Assembler messages:
include/asm/leon.h:10: Error: Unknown opcode: `struct'
include/asm/leon.h:11: Error: Unknown opcode: `volatile'
include/asm/leon.h:12: Error: Unknown opcode: `volatile'
.
.
But in leon.h is an #ifndef __ASSEMBLER__
I never had this problem with other toolchains.
The assembler does not define __ASSEMBLER__, I think.
How can I fix this problem?
Thanks, Sven
---------------leon.h------------------
#ifndef LEON_H_INCLUDE
#define LEON_H_INCLUDE
#include <linux/config.h>
#include <asm/vaddrs.h>
#ifndef __ASSEMBLER__
struct lregs {
volatile unsigned int memcfg1; /* 0x00 */
volatile unsigned int memcfg2;
volatile unsigned int ectrl;
volatile unsigned int failaddr;
volatile unsigned int memstatus; /* 0x10 */
volatile unsigned int cachectrl;
volatile unsigned int powerdown;
volatile unsigned int writeprot1;
volatile unsigned int writeprot2; /* 0x20 */
volatile unsigned int leonconf;
volatile unsigned int dummy2;
volatile unsigned int dummy3;
volatile unsigned int dummy4; /* 0x30 */
volatile unsigned int dummy5;
volatile unsigned int dummy6;
volatile unsigned int dummy7;
volatile unsigned int timercnt1; /* 0x40 */
volatile unsigned int timerload1;
volatile unsigned int timerctrl1;
volatile unsigned int wdog;
volatile unsigned int timercnt2;
volatile unsigned int timerload2;
volatile unsigned int timerctrl2;
volatile unsigned int dummy8;
volatile unsigned int scalercnt;
volatile unsigned int scalerload;
volatile unsigned int dummy9;
volatile unsigned int dummy10;
volatile unsigned int uartdata1;
volatile unsigned int uartstatus1;
volatile unsigned int uartctrl1;
volatile unsigned int uartscaler1;
volatile unsigned int uartdata2;
volatile unsigned int uartstatus2;
volatile unsigned int uartctrl2;
volatile unsigned int uartscaler2;
volatile unsigned int irqmask;
volatile unsigned int irqpend;
volatile unsigned int irqforce;
volatile unsigned int irqclear;
volatile unsigned int piodata;
volatile unsigned int piodir;
volatile unsigned int pioirq;
volatile unsigned int dummy11;
volatile unsigned int imask2;
volatile unsigned int ipend2;
volatile unsigned int istat2;
volatile unsigned int dummy12;
volatile unsigned int dcomdata;
volatile unsigned int dcomstatus;
volatile unsigned int dcomctrl;
volatile unsigned int dcomscaler;
};
#endif
.
.
assemblercode
.
.
More information about the uClibc
mailing list