【未解决】crosstool-ng编译arm的xscale时,编译gcc-4.2.4时出错:[libgcc/./_powisf2.o] Error 1,/tmp/cc7Xh6xp.s:21: Error: selected processor does not support ARM mode `fmsr s14,r0′

【问题】

折腾:

【记录】编译配置好的xscale版本的crosstool-ng-1.18.0

期间,继续去编译

ct-ng build

结果又遇到错误:

CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng build
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20130725.100447
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Installing user-supplied crosstool-NG configuration
[EXTRA]  =================================================================
[EXTRA]  Dumping internal crosstool-NG configuration
[EXTRA]    Building a toolchain for:
[EXTRA]      build  = i686-pc-cygwin
[EXTRA]      host   = i686-pc-cygwin
[EXTRA]      target = arm-xscale-linux-gnueabi
[EXTRA]  Dumping internal crosstool-NG configuration: done in 0.96s (at 00:45)
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[EXTRA]    Using 'linux-custom' from custom location
[INFO ]  Retrieving needed toolchain components' tarballs: done in 2.93s (at 00:48)
[INFO ]  =================================================================
[INFO ]  Extracting and patching toolchain components
[INFO ]  Extracting and patching toolchain components: done in 8.52s (at 00:57)
[EXTRA]  Saving state to restart at step 'libc_check_config'...
[EXTRA]  Saving state to restart at step 'companion_libs_for_build'...
[EXTRA]  Saving state to restart at step 'binutils_for_build'...
[EXTRA]  Saving state to restart at step 'companion_libs_for_host'...
[EXTRA]  Saving state to restart at step 'binutils_for_host'...
[INFO ]  =================================================================
[INFO ]  Installing binutils for host
[EXTRA]    Configuring binutils
[EXTRA]    Building binutils
[EXTRA]    Installing binutils
[INFO ]  Installing binutils for host: done in 591.41s (at 10:54)
[EXTRA]  Saving state to restart at step 'cc_core_pass_1'...
[INFO ]  =================================================================
[INFO ]  Installing pass-1 core C compiler
[EXTRA]    Configuring gcc
[EXTRA]    Building gcc
[ERROR]    make[3]: *** [libgcc/./_powisf2.o] Error 1
[ERROR]    make[3]: *** [libgcc/./_powidf2.o] Error 1
[ERROR]    make[2]: *** [stmp-multilib] Error 2
[ERROR]    make[1]: *** [all-gcc] Error 2
[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing pass-1 core C compiler'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_cc_core_backend[scripts/build/cc/gcc.sh@448]
[ERROR]  >>        called from: do_cc_core_pass_1[scripts/build/cc/gcc.sh@101]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@632]


Current command:
  'make' '-j4' '-l' 'all-gcc'
exited with error code: 2
Please fix it up and finish by exiting the shell with one of these values:
    1  fixed, continue with next build command
    2  repeat this build command
    3  abort build

ct-ng:~/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-xscale-linux-gnueabi/build/build-cc-core-pass-1>

【解决过程】

1. 然后去看看log:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\crosstool-ng-1.18.0_build\build.log

中的相关内容是:

[ALL  ]    /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-xscale-linux-gnueabi/build/build-cc-core-pass-1/./gcc/xgcc -B/home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-xscale-linux-gnueabi/build/build-cc-core-pass-1/./gcc/ -B/home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-xscale-linux-gnueabi/buildtools/arm-xscale-linux-gnueabi/bin/ -B/home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-xscale-linux-gnueabi/buildtools/arm-xscale-linux-gnueabi/lib/ -isystem /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-xscale-linux-gnueabi/buildtools/arm-xscale-linux-gnueabi/include -isystem /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-xscale-linux-gnueabi/buildtools/arm-xscale-linux-gnueabi/sys-include -O2  -g -Os -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC  -g   -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -Dinhibit_libc -I. -I. -I/home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gcc-4.2.2/gcc -I/home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gcc-4.2.2/gcc/.  -I/home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gcc-4.2.2/gcc/../include   -I/home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gcc-4.2.2/gcc/../libcpp/include  -I/home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gcc-4.2.2/gcc/../libdecnumber -I../libdecnumber -DL_powixf2 -c /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gcc-4.2.2/gcc/libgcc2.c -o libgcc/./_powixf2.o
[ALL  ]    /tmp/cc7Xh6xp.s: Assembler messages:
[ALL  ]    /tmp/cc7Xh6xp.s:21: Error: selected processor does not support ARM mode `fmsr s14,r0'
[ALL  ]    /tmp/cc7Xh6xp.s:27: Error: selected processor does not support ARM mode `flds s15,.L16'
[ALL  ]    /tmp/cc7Xh6xp.s:28: Error: selected processor does not support ARM mode `fcpyseq s13,s15'
[ALL  ]    /tmp/cc7Xh6xp.s:29: Error: selected processor does not support ARM mode `fcpysne s13,s14'
[ALL  ]    /tmp/cc7Xh6xp.s:39: Error: selected processor does not support ARM mode `fmuls s14,s14,s14'
[ALL  ]    /tmp/cc7Xh6xp.s:41: Error: selected processor does not support ARM mode `fmulsne s13,s13,s14'
[ALL  ]    /tmp/cc7Xh6xp.s:49: Error: selected processor does not support ARM mode `fldslt s15,.L16'
[ALL  ]    /tmp/cc7Xh6xp.s:50: Error: selected processor does not support ARM mode `fdivslt s13,s15,s13'
[ALL  ]    /tmp/cc7Xh6xp.s:52: Error: selected processor does not support ARM mode `fmrs r0,s13'
[ALL  ]    libgcc.mk:223: recipe for target `libgcc/./_powisf2.o' failed
[ERROR]    make[3]: *** [libgcc/./_powisf2.o] Error 1
[ALL  ]    make[3]: *** Waiting for unfinished jobs....
[ALL  ]    /tmp/ccSq3fkb.s: Assembler messages:
[ALL  ]    /tmp/ccSq3fkb.s:21: Error: selected processor does not support ARM mode `fmdrr d6,r0,r1'
[ALL  ]    /tmp/ccSq3fkb.s:23: Error: selected processor does not support ARM mode `fldd d7,.L16'
[ALL  ]    /tmp/ccSq3fkb.s:29: Error: selected processor does not support ARM mode `fcpydeq d5,d7'
[ALL  ]    /tmp/ccSq3fkb.s:30: Error: selected processor does not support ARM mode `fcpydne d5,d6'
[ALL  ]    /tmp/ccSq3fkb.s:40: Error: selected processor does not support ARM mode `fmuld d6,d6,d6'
[ALL  ]    /tmp/ccSq3fkb.s:42: Error: selected processor does not support ARM mode `fmuldne d5,d5,d6'
[ALL  ]    /tmp/ccSq3fkb.s:50: Error: selected processor does not support ARM mode `flddlt d7,.L16'
[ALL  ]    /tmp/ccSq3fkb.s:51: Error: selected processor does not support ARM mode `fdivdlt d5,d7,d5'
[ALL  ]    /tmp/ccSq3fkb.s:54: Error: selected processor does not support ARM mode `fmrrd r0,r1,d5'
[ALL  ]    libgcc.mk:226: recipe for target `libgcc/./_powidf2.o' failed
[ERROR]    make[3]: *** [libgcc/./_powidf2.o] Error 1
[ALL  ]    make[4]: `crtend.o' is up to date.
[ALL  ]    make[4]: `crtbeginS.o' is up to date.
[ALL  ]    make[4]: `crtendS.o' is up to date.
[ALL  ]    make[4]: `crtbeginT.o' is up to date.
[ALL  ]    make[4]: Leaving directory `/home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-xscale-linux-gnueabi/build/build-cc-core-pass-1/gcc'
[ALL  ]    make[3]: Leaving directory `/home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-xscale-linux-gnueabi/build/build-cc-core-pass-1/gcc'
[ALL  ]    Makefile:1540: recipe for target `stmp-multilib' failed
[ERROR]    make[2]: *** [stmp-multilib] Error 2
[ALL  ]    rm gcc.pod
[ALL  ]    make[2]: Leaving directory `/home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-xscale-linux-gnueabi/build/build-cc-core-pass-1/gcc'
[ALL  ]    Makefile:4314: recipe for target `all-gcc' failed
[ERROR]    make[1]: *** [all-gcc] Error 2
[ALL  ]    make[1]: Leaving directory `/home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-xscale-linux-gnueabi/build/build-cc-core-pass-1'
[ERROR]  
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing pass-1 core C compiler'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_cc_core_backend[scripts/build/cc/gcc.sh@448]
[ERROR]  >>        called from: do_cc_core_pass_1[scripts/build/cc/gcc.sh@101]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@632]

所以,错误是:

/tmp/cc7Xh6xp.s:21: Error: selected processor does not support ARM mode `fmsr s14,r0′

2.所以去看看对应的代码:

结果:

(1)cygwin下的tmp中,没有cc7Xh6xp.s

(2)而

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\crosstool-ng-1.18.0_build\.build\src\gcc-4.2.2\gcc\libgcc2.c

中也没有和:

fmsr s14,r0

相关的代码。

所以,找不到对应的.s汇编文件,没法调试。

3.后来搜:

gcc fmsr s14,r0

找到:

Overwriting neon quad register does not clobber all included single registers

但是还是没完全看懂。

4. 另外,搜到:

Diff of /llvm-gcc-4.2/trunk/gcc/config/arm/ieee754-sf.S

中有类似的代码:

fmsr s14, r0

然后去:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\crosstool-ng-1.18.0_build\.build\src\gcc-4.2.2\gcc\config\arm\ieee754-sf.S

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\crosstool-ng-1.18.0_build\.build\src\gcc-4.2.2\gcc\config\arm\ieee754-df.S

看了看,但是不知道怎么解决此问题。

5. 这里:

[Bug target/29120] New: Arm cross-compiler could not be created (assember error)

遇到类似问题,但是无解。

 

【总结】

另外,网上搜了半天,也找到很多,

gcc-4.1.x

gcc-4.2.x

而遇到,交叉编译arm而出现类似错误的。

所以,猜测或许是gcc 4.2之前有此bug吧。

所以,实在不行,那就换个gcc版本再去试试。详见:

【记录】编译配置好的xscale版本的crosstool-ng-1.18.0



发表评论

电子邮件地址不会被公开。 必填项已用*标注

无觅相关文章插件,快速提升流量