[Bug bootstrap/26892] Can't compile a 64-bit gcc
lucier at math dot purdue dot edu
gcc-bugzilla@gcc.gnu.org
Sat Apr 1 00:45:00 GMT 2006
------- Comment #3 from lucier at math dot purdue dot edu 2006-04-01 00:45 -------
Subject: Re: Can't compile a 64-bit gcc
OK, I'll try to give a bit more data and make a more intelligent
comment.
I tried to configure and build mainline with this command:
/bin/rm -rf *; env CC='gcc -mcpu=970 -m64' ../configure --enable-
checking=no --prefix=/pkgs/gcc-mainline --with-as=/usr/local/
odcctools-20060123/bin/as --with-ld=/usr/local/odcctools-20060123/bin/
ld --enable-languages=c; make bootstrap BOOT_CFLAGS='-mcpu=970 -m64 -
O2 -g' >& build.log
and here are all the references to iconv in build.log:
[lindv2:gcc/mainline/objdir64] lucier% grep iconv build.log
checking for iconv... no, consider installing GNU libiconv
checking for iconv.h... yes
checking for iconv... no, consider installing GNU libiconv
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for iconv... no, consider installing GNU libiconv
checking for iconv... yes
checking how to link with libiconv... -liconv
checking for iconv declaration...
extern size_t iconv (iconv_t cd, const char * *inbuf,
size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for iconv.h... yes
checking for iconv... yes
checking how to link with libiconv... -liconv
checking for iconv declaration...
extern size_t iconv (iconv_t cd, const char * *inbuf,
size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for iconv... yes
checking how to link with libiconv... -liconv
checking for iconv declaration...
extern size_t iconv (iconv_t cd, const char * *inbuf,
size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
./../intl/libintl.a -liconv -liconv
ld64 warning: in /usr/lib/libiconv.dylib, file does not contain
requested architecture
ld64 warning: in /usr/lib/libiconv.dylib, file does not contain
requested architecture
_libiconv, referenced from:
_convert_using_iconv in libcpp.a(charset.o)
_libiconv_close, referenced from:
__cpp_destroy_iconv in libcpp.a(charset.o)
_libiconv_open, referenced from:
_init_iconv_desc in libcpp.a(charset.o)
_libiconv_set_relocation_prefix, referenced from:
and bootstrap fails with
/Users/lucier/programs/gcc/mainline/objdir64/./prev-gcc/xgcc -B/Users/
lucier/programs/gcc/mainline/objdir64/./prev-gcc/ -B/pkgs/gcc-
mainline/powerpc-apple-darwin8.5.0/bin/ -mcpu=970 -m64 -O2 -g -o
makedepend \
makedepend.o libcpp.a ../libiberty/libiberty.a \
./../intl/libintl.a -liconv -liconv
ld64 warning: in /usr/lib/libiconv.dylib, file does not contain
requested architecture
ld64 warning: in /usr/lib/libiconv.dylib, file does not contain
requested architecture
can't resolve symbols:
<etc.>
When I configure and build 4.1.0 (release) with
/bin/rm -rf *; env CC='gcc -mcpu=970 -m64' ../configure --prefix=/
pkgs/gcc-4.1.0 --with-as=/usr/local/odcctools-20060123/bin/as --with-
ld=/usr/local/odcctools-20060123/bin/ld --enable-languages=c; make
bootstrap BOOT_CFLAGS='-mcpu=970 -m64 -O2 -g' >& build.log
I get the following references to iconv in build.log:
[lindv2:gcc/gcc-4.1.0/objdir] lucier% !gr
grep iconv build.log
checking for iconv... no, consider installing GNU libiconv
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for iconv... no, consider installing GNU libiconv
checking for iconv.h... yes
checking for iconv... no, consider installing GNU libiconv
and no attempt is made to link libiconv into makedepend:
gcc -mcpu=970 -m64 -I../../libcpp -I. -I../../libcpp/../include -
I./../intl -I../../libcpp/include -g -O2 -W -Wall -Wwrite-strings -
Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -
Wmissing-format-attribute -pedantic -Wno-long-long -I../../libcpp -
I. -I../../libcpp/../include -I./../intl -I../../libcpp/include -c -
o makedepend.o -MT makedepend.o -MD -MP -MF .deps/makedepend.Po ../../
libcpp/makedepend.c
gcc -mcpu=970 -m64 -g -O2 -o makedepend \
makedepend.o libcpp.a ../libiberty/libiberty.a \
./../intl/libintl.a
So it appears that configure in 4.1.0 realizes that the libiconv on
powerpc-darwin-8.5.0 is not compatible with the gcc it's trying to
build and doesn't try to link with it, while configure on mainline
thinks libiconv is compatible (when it's not, since libiconv is 32
bit and we're trying to build a 64-bit gcc) and bootstrap fails when
trying to link the 32-bit libiconv into the 32-bit makedepend.
So I think that the configuration checks for iconv on mainline may be
broken.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26892
More information about the Gcc-bugs
mailing list