当前位置: 技术问答>linux和unix
交叉编译出错:impossible constraint in ‘asm’
来源: 互联网 发布时间:2017-02-12
本文导语: HOST:Suse11.0 交叉编译器:xscale-linux-gcc (将调用arm-linux-gcc -mbig-endian) 编译出错信息: xscale-linux-g++ -g -O2 -Wall -fPIC -I../../kernel -c pfring.c -o pfring.o pfring.c: In function ‘int pfring_read(pfring*, char*, u_int, pfring_pkthdr*,...
HOST:Suse11.0
交叉编译器:xscale-linux-gcc (将调用arm-linux-gcc -mbig-endian)
编译出错信息:
xscale-linux-g++ -g -O2 -Wall -fPIC -I../../kernel -c pfring.c -o pfring.o
pfring.c: In function ‘int pfring_read(pfring*, char*, u_int, pfring_pkthdr*, u_int8_t, u_int8_t)’:
pfring.c:982: warning: comparison between signed and unsigned integer expressions
pfring.c: In function ‘long long unsigned int rdtsc()’:
pfring.c:32: error: impossible constraint in ‘asm’
make: *** [pfring.o] Error 1
Makefile文件内容:
INSTDIR = ${DESTDIR}/usr/local
INCLUDE = -I../../kernel
DNA_OBJS = pfring_e1000e_dna.o
DNA_DEFINE =
OBJS = pfring.o ${DNA_OBJS}
CC = xscale-linux-gcc
CFLAGS = -g -O2 -Wall -fPIC ${INCLUDE} ${DNA_DEFINE}
LDFLAGS = -shared
SYSLIBS = -lpthread
%.o: %.c %.h
${CC} ${CFLAGS} -c $
交叉编译器:xscale-linux-gcc (将调用arm-linux-gcc -mbig-endian)
编译出错信息:
xscale-linux-g++ -g -O2 -Wall -fPIC -I../../kernel -c pfring.c -o pfring.o
pfring.c: In function ‘int pfring_read(pfring*, char*, u_int, pfring_pkthdr*, u_int8_t, u_int8_t)’:
pfring.c:982: warning: comparison between signed and unsigned integer expressions
pfring.c: In function ‘long long unsigned int rdtsc()’:
pfring.c:32: error: impossible constraint in ‘asm’
make: *** [pfring.o] Error 1
Makefile文件内容:
INSTDIR = ${DESTDIR}/usr/local
INCLUDE = -I../../kernel
DNA_OBJS = pfring_e1000e_dna.o
DNA_DEFINE =
OBJS = pfring.o ${DNA_OBJS}
CC = xscale-linux-gcc
CFLAGS = -g -O2 -Wall -fPIC ${INCLUDE} ${DNA_DEFINE}
LDFLAGS = -shared
SYSLIBS = -lpthread
%.o: %.c %.h
${CC} ${CFLAGS} -c $