On May 3, 2006, at 7:50 PM, David Fang wrote:
Bradley Lucier writes:
Brad> 4.2 hasn't bootstrapped on powerpc-apple-darwin G5 machine
for a very
Brad> long time. I'm seeing the same problem as
Brad> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27121
Brad> It would be nice if this were remedied. I do try to test gcc
Brad> versions before release.
For the time-being, you can bootstrap with --disable-multilib.
The real solution requires Apple to provide an updated cctools with a
working ld64.
Hi,
FWIW, the 20060415 mainline (4.2) snapshot bootstrapped for me, using
odcctools-20060413 (odcctools-590.36od13). This machine is a dual G5
(ppc970) using OS X 10.3.9, and Apple's gcc-3.3 (build 1640).
However, before building, I patched the following 2 files:
In gcc/config/darwin.h:
at: #define LINK_COMMAND_SPEC :
replace:/usr/bin/libtool
with: /path/to/odcctools/bin/libtool
In libstdc++-v3/scripts/make_exports.pl (for OS X 10.3 only):
replace:nm -P
with: /path/to/odcctools/bin/nm -P
(probably not necessary if this nm is already found first in path)
Configure command (your paths may vary):
../configure --prefix=/Users/fang/local/gcc-4.2 \
--program-suffix=-4.2 \
--disable-nls \
--with-gmp=/sw \
--with-mpfr=/sw \
--infodir='${prefix}/share/info' \
--with-included-gettext \
--host=powerpc-apple-darwin`uname -r|cut -f1 -d.` \
`if test ! -f /usr/lib/libSystemStubs.a ; then echo -n "--
with-as=/Users/fang/lib/odcctools/bin/as --with-ld=/Users/fang/lib/
odcctools/bin/ld" ; fi`
I just tried to follow your detailed instructions (thanks) and
bootstrap still failed with today's mainline. I installed
odcctools-20060413, changed
[lindv2:mainline/gcc/config] lucier% rcsdiff darwin.h
===
RCS file: RCS/darwin.h,v
retrieving revision 1.1
diff -r1.1 darwin.h
207c207
< %{!Zdynamiclib:%(linker)}%{Zdynamiclib:/usr/bin/libtool} \
---
> %{!Zdynamiclib:%(linker)}%{Zdynamiclib:/usr/local/
odcctools-20060413/bin/libtool} \
and my configure and build command was
[lindv2:gcc/mainline/objdir64] lucier% cat ../build-gcc-64
#!/bin/tcsh
/bin/rm -rf *; ../configure --with-as=/usr/local/odcctools-20060413/
bin/as --with-ld=/usr/local/odcctools-20060413/bin/ld --prefix=/pkgs/
gcc-mainline --with-gmp=/opt/local/ --with-mpfr=/opt/local/ ; make -j
16 bootstrap >& build.log && (make -k -j 16 check RUNTESTFLAGS="--
target_board 'unix{-mcpu=970/-m64}'" >& check.log ; make mail-report-
with-warnings.log)
I have
[lindv2:gcc/mainline/objdir64] lucier% which ld
/usr/local/odcctools-20060413/bin/ld
[lindv2:gcc/mainline/objdir64] lucier% which as
/usr/local/odcctools-20060413/bin/as
and I'm still getting
/Users/lucier/programs/gcc/mainline/objdir64/gcc/gcj -B/Users/lucier/
programs/gcc/mainline/objdir64/powerpc-apple-darwin8.6.0/ppc64/
libjava/ -B/Users/lucier/programs/gcc/mainline/objdir64/gcc/ -g -O2 -
m64 -m64 -o .libs/jv-convert --main=gnu.gcj.convert.Convert -shared-
libgcc -L/Users/lucier/programs/gcc/mainline/objdir64/powerpc-apple-
darwin8.6.0/ppc64/libjava -L/Users/lucier/programs/gcc/mainline/
objdir64/powerpc-apple-darwin8.6.0/ppc64/libjava/.libs ./.libs/
libgcj.dylib -L/Users/lucier/programs/gcc/mainline/objdir64/powerpc-
apple-darwin8.6.0/ppc64/libstdc++-v3/src -L/Users/lucier/programs/gcc/
mainline/objdir64/powerpc-apple-darwin8.6.0/ppc64/libstdc++-v3/
src/.libs -lpthread -ldl
can't resolve symbols:
___dso_handle, referenced from:
_atexit in crt3.o
ld64 failed: symbol(s) not found
collect2: ld returned 1 exit status
make[5]: *** [jv-convert] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [multi-do] Error 1
make[2]: *** [all-multi] Error 2
make[1]: *** [all-target-libjava] Error 2
make: *** [bootstrap] Error 2
Can you see what I'm doing incorrectly here?
Brad