我在 Debian Wheezy 主机上的 Debian Lenny chroot 中构建了 gcc-4.9.0。arch=Armel(Wheezy 和 Lenny)。我使用了以下配置选项:
$PWD/../gcc-4.9.0/configure --prefix=/usr/local/GCC-4.9.0 --enable-languages=c,c++ --with-arch=armv4t --with-float=soft --enable-checking=release --enable-shared --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi LDFLAGS=-Wl,-no-keep-memory --disable-libjava
当我尝试构建一些库(此示例中为 libgcrypt)时,我无法构建共享库:
checking whether the /usr/local/GCC-4.9.0/bin/gcc linker (/usr/local/GCC-4.9.0/bin/gcc) supports shared libraries... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... unsupported
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes`
对于 Curl:
gcc: error: ../lib/.libs/libcurl.so: No such file or directory
make[2]: *** [Makefile:923: curl] Error 1
构建 gcc 时我是否仍然缺少一些配置选项?
答案1
这:
checking whether the /usr/local/GCC-4.9.0/bin/gcc linker (/usr/local/GCC-4.9.0/bin/gcc) supports shared libraries... no
很奇怪 — — 链接器通常应该是ld
。