求助:生成针对PowerPC架构,支持C、ADA语言GCC编译器的问题

yyddddmw 2015-01-06 09:37:58
在使用构建针对PowerPC架构处理器,支持C、ADA语言的GCC交叉编译工具时报错,具体报错内容为
“/usr/local/ppc/gcc-4.8.2/powerpc-eabi/bin/ld: cannot find -lc”
从报错来看似乎是缺少指令参数,想请教下如何解决。
以下是config.log文件,错误出在第83行
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

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

$ /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

## --------- ##
## Platform. ##
## --------- ##

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

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/gcc-4.8.2/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1669: creating cache ./config.cache
configure:1777: checking build system type
configure:1791: result: i386-pc-linux-gnu
configure:1811: checking host system type
configure:1824: result: powerpc-unknown-eabi
configure:1844: checking target system type
configure:1857: result: powerpc-unknown-eabi
configure:2035: checking for powerpc-eabi-gcc
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
configure:2331: checking for C compiler version
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
xgcc (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2351: $? = 0
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
Reading specs from /home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/specs
COLLECT_GCC=/home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/xgcc
COLLECT_LTO_WRAPPER=/home/maxiang/ppc_ada_workspace/gcc_obj/./gcc/lto-wrapper
Target: powerpc-eabi
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
Thread model: single
gcc version 4.8.2 (GCC)
configure:2351: $? = 0
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
xgcc: error: unrecognized command line option '-V'
xgcc: fatal error: no input files
compilation terminated.
configure:2351: $? = 1
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
xgcc: error: unrecognized command line option '-qversion'
xgcc: fatal error: no input files
compilation terminated.
configure:2351: $? = 1
configure:2371: checking for C compiler default output file name
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
/usr/local/ppc/gcc-4.8.2/powerpc-eabi/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
configure:2397: $? = 1
configure:2434: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2440: error: in `/home/maxiang/ppc_ada_workspace/gcc_obj/powerpc-eabi/libada':
configure:2444: error: C compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i386-pc-linux-gnu
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=i386-pc-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=powerpc-eabi
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=powerpc-eabi
ac_cv_host=powerpc-unknown-eabi
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 '
ac_cv_target=powerpc-unknown-eabi

## ----------------- ##
## Output variables. ##
## ----------------- ##

AWK='gawk'
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 '
CFLAGS='-g -O2'
CPPFLAGS=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LN_S=''
LTLIBOBJS=''
MAINT='#'
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PICFLAG=''
SHELL='/bin/bash'
ac_ct_CC=''
bindir='${exec_prefix}/bin'
build='i386-pc-linux-gnu'
build_alias='i386-pc-linux-gnu'
build_cpu='i386'
build_libsubdir='build-i386-pc-linux-gnu'
build_os='linux-gnu'
build_subdir='build-i386-pc-linux-gnu'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
default_gnatlib_target=''
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
enable_shared='no'
exec_prefix='NONE'
have_getipinfo=''
host='powerpc-unknown-eabi'
host_alias='powerpc-eabi'
host_cpu='powerpc'
host_os='eabi'
host_subdir='.'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
multi_basedir='../../../gcc-4.8.2/libada/..'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local/ppc/gcc-4.8.2'
program_transform_name='s&^&powerpc-eabi-&'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='powerpc-unknown-eabi'
target_alias='powerpc-eabi'
target_cpu='powerpc'
target_noncanonical='powerpc-eabi'
target_os='eabi'
target_subdir='powerpc-eabi'
target_vendor='unknown'
toolexecdir=''
toolexeclibdir=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""

configure: exit 77
先多谢了!
...全文
299 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
GCC简介 通常所说的GCC是GUN Compiler Collection的简称,除了编译程序之外,它还含其他相关工具,所以它能把易于人类使用的高级语言编写的源代码构建成计算机能够直接执行的二进制代码。GCC是Linux平台下最常用的编译程序,它是Linux平台编译器的事实标准。同时,在Linux平台下的嵌入式开发领域,GCC也是用得最普遍的一种编译器GCC之所以被广泛采用,是因为它能支持各种不同的目标体系结构。例如,它既支持基于宿主的开发(简单讲就是要为某平台编译程序,就在该平台上编译),也支持交叉编译(即在A平台上编译的程序是供平台B使用的)。目前,GCC支持的体系结构有四十余种,常见的有X86系列、Arm、PowerPC等。同时,GCC还能运行在不同的操作系统上,如Linux、Solaris、Windows等。 除了上面讲的之外,GCC除了支持C语言外,还支持多种其他语言,例如C++、Ada、Java、Objective-C、FORTRAN、Pascal等。 本系列文章中,我们不仅介绍GCC的基本功能,还涉及到一些诸如优化之类的高级功能。另外,我们还考察GCC的一些映像操作工具,如size和objcopy等,这将在后续的文章中加以介绍。

21,600

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 驱动开发/核心开发
社区管理员
  • 驱动开发/核心开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧