免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3730 | 回复: 0
打印 上一主题 下一主题

求解答,交叉编译glibc-2.8时出现impossible constraint in 'asm' [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-12-18 13:49 |只看该作者 |倒序浏览
configure参数-->
CC=/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/bin/powerpc-none-linux-gnuspe-gcc CXX=/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/bin/powerpc-none-linux-gnuspe-g++ AR=/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/bin/powerpc-none-linux-gnuspe-ar AS=/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/bin/powerpc-none-linux-gnuspe-as LD=/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/bin/powerpc-none-linux-gnuspe-ld ../glibc-2.8/configure --prefix=/home/zhangy/other/gcc9799/glibc-2.8/glibc --target=powerpc-none-linux-gnuspe --host=powerpc-none-linux-gnuspe --with-headers=/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/powerpc-none-linux-gnuspe/include --build=i686-pc-linux-gnu


make 报错信息-->
make[2]: Entering directory `/home/zhangy/other/gcc9799/glibc-2.8/glibc-2.8/math'
/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/bin/powerpc-none-linux-gnuspe-gcc ../sysdeps/powerpc/fpu/fclrexcpt.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -g -mnew-mnemonics -Wstrict-prototypes -mlong-double-128    -Wno-uninitialized -D__NO_MATH_INLINES -D__LIBC_INTERNAL_MATH_INLINES -I../include -I/home/zhangy/other/gcc9799/glibc-2.8/build/math -I/home/zhangy/other/gcc9799/glibc-2.8/build -I../sysdeps/powerpc/powerpc32/elf -I../sysdeps/powerpc/elf -I../sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu -I../sysdeps/powerpc/powerpc32/fpu -I../nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32 -I../sysdeps/unix/sysv/linux/powerpc/powerpc32 -I../nptl/sysdeps/unix/sysv/linux/powerpc -I../sysdeps/unix/sysv/linux/powerpc -I../sysdeps/ieee754/ldbl-128ibm -I../sysdeps/ieee754/ldbl-opt -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/powerpc -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/powerpc/powerpc32 -I../sysdeps/wordsize-32 -I../sysdeps/powerpc/fpu -I../nptl/sysdeps/powerpc -I../sysdeps/powerpc -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl  -I.. -I../libio -I. -nostdinc -isystem /opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/lib/gcc/powerpc-none-linux-gnuspe/4.3.2/include -isystem /opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/lib/gcc/powerpc-none-linux-gnuspe/4.3.2/include-fixed -isystem /opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/powerpc-none-linux-gnuspe/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1 -DIS_IN_libm=1    -o /home/zhangy/other/gcc9799/glibc-2.8/build/math/fclrexcpt.o -MD -MP -MF /home/zhangy/other/gcc9799/glibc-2.8/build/math/fclrexcpt.o.dt -MT /home/zhangy/other/gcc9799/glibc-2.8/build/math/fclrexcpt.o
../sysdeps/powerpc/fpu/fclrexcpt.c: In function '__feclearexcept':
../sysdeps/powerpc/fpu/fclrexcpt.c:29: error: impossible constraint in 'asm'
../sysdeps/powerpc/fpu/fclrexcpt.c:36: error: impossible constraint in 'asm'
make[2]: *** [/home/zhangy/other/gcc9799/glibc-2.8/build/math/fclrexcpt.o] 错误 1
make[2]: Leaving directory `/home/zhangy/other/gcc9799/glibc-2.8/glibc-2.8/math'
make[1]: *** [math/others] 错误 2
make[1]: Leaving directory `/home/zhangy/other/gcc9799/glibc-2.8/glibc-2.8'
make: *** [all] 错误 2


../sysdeps/powerpc/fpu/fclrexcpt.c错误相关代码
#include <fenv_libc.h>

#undef feclearexcept
int
__feclearexcept (int excepts)
{
  fenv_union_t u;

  /* Get the current state.  */
u.fenv = fegetenv_register ();

  /* Clear the relevant bits.  */
  u.l[1] = u.l[1] & ~((-(excepts >> (31 - FPSCR_VX) & 1) & FE_ALL_INVALID)
                      | (excepts & FPSCR_STICKY_BITS));

  /* Put the new state in effect.  */
  fesetenv_register (u.fenv);

  /* Success.  */
  return 0;
}

fegetenv_register ();实际调用代码
fenv_libc.h中
#ifndef _FENV_LIBC_H
#define _FENV_LIBC_H    1

#include <fenv.h>

libm_hidden_proto (__fe_nomask_env)

/* The sticky bits in the FPSCR indicating exceptions have occurred.  */
#define FPSCR_STICKY_BITS ((FE_ALL_EXCEPT | FE_ALL_INVALID) & ~FE_INVALID)

/* Equivalent to fegetenv, but returns a fenv_t instead of taking a
   pointer.  */
#define fegetenv_register() \
        ({ fenv_t env; asm volatile ("mffs %0" : "=f" (env)); env; })


/* Equivalent to fesetenv, but takes a fenv_t instead of a pointer.  */
#define fesetenv_register(env) \
        ({ double d = (env); asm volatile ("mtfsf 0xff,%0" : : "f" (d)); })

报这个错误是表示那段asm汇编指令有问题吗?被这个问题困扰很久了,不知道如何解决~~~
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP