免费注册 查看新帖 |

Chinaunix

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

[开发环境] 生成针对PowerPC 的GCC交叉编译器出错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-01-06 09:26 |只看该作者 |倒序浏览
我需要编译一个可针对PowerPC硬件平台,支持C和ADA语言的GCC编译器。
但是在编译的过程中报错,错误处在config的第83行
“/usr/local/ppc/gcc-4.8.2/powerpc-eabi/bin/ld: cannot find -lc”
说是没找到-lc,百思不得其解。大家看看,能否有什么解决办法,多谢!
  1. This file contains any messages produced by compilers while
  2. running configure, to aid debugging if configure makes a mistake.

  3. It was created by configure, which was
  4. generated by GNU Autoconf 2.64.  Invocation command line was

  5.   $ /home/maxiang/ppc_ada_workspace/gcc-4.8.2/libada/configure --cache-file=./config.cache --with-cross-host=i386-pc-linux-gnu --prefix=/usr/local/ppc/gcc-4.8.2 --disable-shared --without-headers --disable-threads --disable-decimal-float --disable-libmudflap --disable-libssp --with-newlib --disable-multilib --disable-nls --disable-libgomp --enable-languages=c,ada,lto --program-transform-name=s&^&powerpc-eabi-& --disable-option-checking --with-target-subdir=powerpc-eabi --build=i386-pc-linux-gnu --host=powerpc-eabi --target=powerpc-eabi --srcdir=../../../gcc-4.8.2/libada

  6. ## --------- ##
  7. ## Platform. ##
  8. ## --------- ##

  9. hostname = maxiang-ubuntu
  10. uname -m = i686
  11. uname -r = 3.13.0-32-generic
  12. uname -s = Linux
  13. uname -v = #57-Ubuntu SMP Tue Jul 15 03:51:12 UTC 2014

  14. /usr/bin/uname -p = unknown
  15. /bin/uname -X     = unknown

  16. /bin/arch              = unknown
  17. /usr/bin/arch -k       = unknown
  18. /usr/convex/getsysinfo = unknown
  19. /usr/bin/hostinfo      = unknown
  20. /bin/machine           = unknown
  21. /usr/bin/oslevel       = unknown
  22. /bin/universe          = unknown

  23. PATH: /usr/local/gcc-4.8.2/bin
  24. PATH: /usr/local/sbin
  25. PATH: /usr/local/bin
  26. PATH: /usr/sbin
  27. PATH: /usr/bin
  28. PATH: /sbin
  29. PATH: /bin
  30. PATH: /usr/games
  31. PATH: /usr/local/games


  32. ## ----------- ##
  33. ## Core tests. ##
  34. ## ----------- ##

  35. configure:1669: creating cache ./config.cache
  36. configure:1777: checking build system type
  37. configure:1791: result: i386-pc-linux-gnu
  38. configure:1811: checking host system type
  39. configure:1824: result: powerpc-unknown-eabi
  40. configure:1844: checking target system type
  41. configure:1857: result: powerpc-unknown-eabi
  42. configure:2035: checking for powerpc-eabi-gcc
  43. configure:2062: result: /home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/xgcc -B/home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/ -B/usr/local/ppc/gcc-4.8.2/powerpc-eabi/bin/ -B/usr/local/ppc/gcc-4.8.2/powerpc-eabi/lib/ -isystem /usr/local/ppc/gcc-4.8.2/powerpc-eabi/include -isystem /usr/local/ppc/gcc-4.8.2/powerpc-eabi/sys-include   
  44. configure:2331: checking for C compiler version
  45. configure:2340: /home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/xgcc -B/home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/ -B/usr/local/ppc/gcc-4.8.2/powerpc-eabi/bin/ -B/usr/local/ppc/gcc-4.8.2/powerpc-eabi/lib/ -isystem /usr/local/ppc/gcc-4.8.2/powerpc-eabi/include -isystem /usr/local/ppc/gcc-4.8.2/powerpc-eabi/sys-include    --version >&5
  46. xgcc (GCC) 4.8.2
  47. Copyright (C) 2013 Free Software Foundation, Inc.
  48. This is free software; see the source for copying conditions.  There is NO
  49. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  50. configure:2351: $? = 0
  51. configure:2340: /home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/xgcc -B/home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/ -B/usr/local/ppc/gcc-4.8.2/powerpc-eabi/bin/ -B/usr/local/ppc/gcc-4.8.2/powerpc-eabi/lib/ -isystem /usr/local/ppc/gcc-4.8.2/powerpc-eabi/include -isystem /usr/local/ppc/gcc-4.8.2/powerpc-eabi/sys-include    -v >&5
  52. Reading specs from /home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/specs
  53. COLLECT_GCC=/home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/xgcc
  54. COLLECT_LTO_WRAPPER=/home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/lto-wrapper
  55. Target: powerpc-eabi
  56. Configured with: ../gcc-4.8.2/configure --build=i386-pc-linux-gnu --prefix=/usr/local/ppc/gcc-4.8.2 --host=i386-pc-linux-gnu --target=powerpc-eabi --enable-languages=c,ada --disable-shared --without-headers --disable-threads --disable-decimal-float --disable-libmudflap --disable-libssp --with-newlib --disable-multilib --disable-nls --disable-libgomp
  57. Thread model: single
  58. gcc version 4.8.2 (GCC)
  59. configure:2351: $? = 0
  60. configure:2340: /home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/xgcc -B/home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/ -B/usr/local/ppc/gcc-4.8.2/powerpc-eabi/bin/ -B/usr/local/ppc/gcc-4.8.2/powerpc-eabi/lib/ -isystem /usr/local/ppc/gcc-4.8.2/powerpc-eabi/include -isystem /usr/local/ppc/gcc-4.8.2/powerpc-eabi/sys-include    -V >&5
  61. xgcc: error: unrecognized command line option '-V'
  62. xgcc: fatal error: no input files
  63. compilation terminated.
  64. configure:2351: $? = 1
  65. configure:2340: /home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/xgcc -B/home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/ -B/usr/local/ppc/gcc-4.8.2/powerpc-eabi/bin/ -B/usr/local/ppc/gcc-4.8.2/powerpc-eabi/lib/ -isystem /usr/local/ppc/gcc-4.8.2/powerpc-eabi/include -isystem /usr/local/ppc/gcc-4.8.2/powerpc-eabi/sys-include    -qversion >&5
  66. xgcc: error: unrecognized command line option '-qversion'
  67. xgcc: fatal error: no input files
  68. compilation terminated.
  69. configure:2351: $? = 1
  70. configure:2371: checking for C compiler default output file name
  71. configure:2393: /home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/xgcc -B/home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/ -B/usr/local/ppc/gcc-4.8.2/powerpc-eabi/bin/ -B/usr/local/ppc/gcc-4.8.2/powerpc-eabi/lib/ -isystem /usr/local/ppc/gcc-4.8.2/powerpc-eabi/include -isystem /usr/local/ppc/gcc-4.8.2/powerpc-eabi/sys-include    -g -O2   conftest.c  >&5
  72. /usr/local/ppc/gcc-4.8.2/powerpc-eabi/bin/ld: cannot find -lc
  73. collect2: error: ld returned 1 exit status
  74. configure:2397: $? = 1
  75. configure:2434: result:
  76. configure: failed program was:
  77. | /* confdefs.h */
  78. | #define PACKAGE_NAME ""
  79. | #define PACKAGE_TARNAME ""
  80. | #define PACKAGE_VERSION ""
  81. | #define PACKAGE_STRING ""
  82. | #define PACKAGE_BUGREPORT ""
  83. | #define PACKAGE_URL ""
  84. | /* end confdefs.h.  */
  85. |
  86. | int
  87. | main ()
  88. | {
  89. |
  90. |   ;
  91. |   return 0;
  92. | }
  93. configure:2440: error: in `/home/maxiang/ppc_ada_workspace/gcc_obj/powerpc-eabi/libada':
  94. configure:2444: error: C compiler cannot create executables
  95. See `config.log' for more details.

  96. ## ---------------- ##
  97. ## Cache variables. ##
  98. ## ---------------- ##

  99. ac_cv_build=i386-pc-linux-gnu
  100. ac_cv_env_build_alias_set=set
  101. ac_cv_env_build_alias_value=i386-pc-linux-gnu
  102. ac_cv_env_host_alias_set=set
  103. ac_cv_env_host_alias_value=powerpc-eabi
  104. ac_cv_env_target_alias_set=set
  105. ac_cv_env_target_alias_value=powerpc-eabi
  106. ac_cv_host=powerpc-unknown-eabi
  107. ac_cv_prog_CC='/home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/xgcc -B/home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/ -B/usr/local/ppc/gcc-4.8.2/powerpc-eabi/bin/ -B/usr/local/ppc/gcc-4.8.2/powerpc-eabi/lib/ -isystem /usr/local/ppc/gcc-4.8.2/powerpc-eabi/include -isystem /usr/local/ppc/gcc-4.8.2/powerpc-eabi/sys-include   '
  108. ac_cv_target=powerpc-unknown-eabi

  109. ## ----------------- ##
  110. ## Output variables. ##
  111. ## ----------------- ##

  112. AWK='gawk'
  113. CC='/home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/xgcc -B/home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/ -B/usr/local/ppc/gcc-4.8.2/powerpc-eabi/bin/ -B/usr/local/ppc/gcc-4.8.2/powerpc-eabi/lib/ -isystem /usr/local/ppc/gcc-4.8.2/powerpc-eabi/include -isystem /usr/local/ppc/gcc-4.8.2/powerpc-eabi/sys-include   '
  114. CFLAGS='-g -O2'
  115. CPPFLAGS=''
  116. DEFS=''
  117. ECHO_C=''
  118. ECHO_N='-n'
  119. ECHO_T=''
  120. EXEEXT=''
  121. LDFLAGS=''
  122. LIBOBJS=''
  123. LIBS=''
  124. LN_S=''
  125. LTLIBOBJS=''
  126. MAINT='#'
  127. OBJEXT=''
  128. PACKAGE_BUGREPORT=''
  129. PACKAGE_NAME=''
  130. PACKAGE_STRING=''
  131. PACKAGE_TARNAME=''
  132. PACKAGE_URL=''
  133. PACKAGE_VERSION=''
  134. PATH_SEPARATOR=':'
  135. PICFLAG=''
  136. SHELL='/bin/bash'
  137. ac_ct_CC=''
  138. bindir='${exec_prefix}/bin'
  139. build='i386-pc-linux-gnu'
  140. build_alias='i386-pc-linux-gnu'
  141. build_cpu='i386'
  142. build_libsubdir='build-i386-pc-linux-gnu'
  143. build_os='linux-gnu'
  144. build_subdir='build-i386-pc-linux-gnu'
  145. build_vendor='pc'
  146. datadir='${datarootdir}'
  147. datarootdir='${prefix}/share'
  148. default_gnatlib_target=''
  149. docdir='${datarootdir}/doc/${PACKAGE}'
  150. dvidir='${docdir}'
  151. enable_shared='no'
  152. exec_prefix='NONE'
  153. have_getipinfo=''
  154. host='powerpc-unknown-eabi'
  155. host_alias='powerpc-eabi'
  156. host_cpu='powerpc'
  157. host_os='eabi'
  158. host_subdir='.'
  159. host_vendor='unknown'
  160. htmldir='${docdir}'
  161. includedir='${prefix}/include'
  162. infodir='${datarootdir}/info'
  163. libdir='${exec_prefix}/lib'
  164. libexecdir='${exec_prefix}/libexec'
  165. localedir='${datarootdir}/locale'
  166. localstatedir='${prefix}/var'
  167. mandir='${datarootdir}/man'
  168. multi_basedir='../../../gcc-4.8.2/libada/..'
  169. oldincludedir='/usr/include'
  170. pdfdir='${docdir}'
  171. prefix='/usr/local/ppc/gcc-4.8.2'
  172. program_transform_name='s&^&powerpc-eabi-&'
  173. psdir='${docdir}'
  174. sbindir='${exec_prefix}/sbin'
  175. sharedstatedir='${prefix}/com'
  176. sysconfdir='${prefix}/etc'
  177. target='powerpc-unknown-eabi'
  178. target_alias='powerpc-eabi'
  179. target_cpu='powerpc'
  180. target_noncanonical='powerpc-eabi'
  181. target_os='eabi'
  182. target_subdir='powerpc-eabi'
  183. target_vendor='unknown'
  184. toolexecdir=''
  185. toolexeclibdir=''

  186. ## ----------- ##
  187. ## confdefs.h. ##
  188. ## ----------- ##

  189. /* confdefs.h */
  190. #define PACKAGE_NAME ""
  191. #define PACKAGE_TARNAME ""
  192. #define PACKAGE_VERSION ""
  193. #define PACKAGE_STRING ""
  194. #define PACKAGE_BUGREPORT ""
  195. #define PACKAGE_URL ""

  196. configure: exit 77
复制代码


您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP