LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1102|回复: 6

编译Binutils-2.13.90.20出的问题...make LDFLAGS="-all-static"

[复制链接]
发表于 2003-5-6 20:46:25 | 显示全部楼层 |阅读模式
#:make LDFLAGS="-all-static"
checking for gcc... gcc -s
checking whether the C compiler (gcc -s -g -O2 -all-static)works...no
configure: error: installation or configuration problem: C compiler
cannot create executables.
make: *** [configure-intl] Error 1

在binutils-2.13.90.0.20的问题
Who can help me???

 楼主| 发表于 2003-5-6 22:58:27 | 显示全部楼层
NOTE - if you happen to be using a HJL binutils release of 2.13.90.0.18 or
greater and experience a build failure "C compiler cannot create executables"
you will need to insert a "make configure-host" in between the configure and
make lines. This is due to recent changes in the top level build system that do
not cope with having "-all-static" in the LDFLAGS.
具体什么作呢???
http://linuxfromscratch.org/~greg/pure_lfs.txt
发表于 2003-5-6 23:09:24 | 显示全部楼层
from plfs build scripts:

  1. max_log_init Binutils ${BINUTILS_VER} Static ${CONFLOGS} ${LOG}
  2. ../${PKGDIR}/configure --prefix=/stage1 --disable-nls \
  3.    >> ${LOGFILE} 2>&1 &&
  4. {
  5.    test Y != "${BINUTILS_CONF_HOST}" ||
  6.    {
  7.       echo -e "\nmake configure-host\n${BRKLN}" >> ${LOGFILE}
  8.       make configure-host >> ${LOGFILE} 2>&1
  9.    }
  10. } &&
  11. echo " o Configure OK" &&

  12. min_log_init ${BUILDLOGS} &&
  13. make LDFLAGS="-all-static -s" \
  14.    >> ${LOGFILE} 2>&1 &&
  15. echo " o Build OK" &&

  16. min_log_init ${TESTLOGS} &&
  17. make check \
  18.    >>  ${LOGFILE} 2>&1 &&
  19. echo " o Test OK" &&

  20. min_log_init ${INSTLOGS} &&
  21. make install \
  22.    >> ${LOGFILE} 2>&1 &&
  23. echo " o ALL OK" || echo "XXXXXX NOT OK - CHECK LOGS (${LOGFILE}) XXXXXX"
复制代码
发表于 2003-5-6 23:12:04 | 显示全部楼层
是不是在make之前运行一下
make configure-host
发表于 2003-5-6 23:15:43 | 显示全部楼层
说的很清楚
在configure之后,在make LDFLAGS="-all-static"之前
 楼主| 发表于 2003-5-6 23:28:26 | 显示全部楼层
On a sidenote, the latest HJ binutils-2.13.90.0.18 reflect the latest
changes to the top level of the GNU tools build system. What this means in
practicality is that invoking configure only does a quick configure in the
top dir i.e. none of the subdirs (bfd, gas, ld etc) get configured. They
get configured during the make run. Unfortunately this breaks the LFS
build:-


checking for gcc... gcc -s
checking whether the C compiler (gcc -s -g -O2 -all-static) works... no
configure: error: installation or configuration problem: C compiler cannot
create executables.
make: *** [configure-intl] Error 1

Obviously, the "-all-static" is fscking it up. The workaround is to do a:-


make configure-host
before the:-

make LDFLAGS=-all-static

so that all the subdirs get configured first.

When I see stuff like this, I start to lean back towards the stable FSF
binutils for LFS. Wish I could make up my mind! :-)

http://archive.linuxfromscratch. ... v/2003/02/0000.html
 楼主| 发表于 2003-5-6 23:37:12 | 显示全部楼层
用参数

--disable-shared

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

本版积分规则

快速回复 返回顶部 返回列表