This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH RFC: Remove fork from collect2


On Mar 19, 2004, at 1:30 PM, Caroline Tice wrote:
I believe your patch broke the bootstrap on powerpc-apple-darwin. I downloaded the most recent sources
and attempted to bootstrap them. It fails with:


stage1/xgcc -Bstage1/ -B/usr/local/powerpc-apple-darwin7.0.0/bin/ -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wold-style-definition -Wno-variadic-macros -Werror -fno-common -DHAVE_CONFIG_H -o Tcollect2 \
collect2.o tlink.o intl.o version.o libcpp.a ../libiberty/libiberty.a -liconv
/usr/bin/ld: Undefined symbols:
restFP
saveFP
collect2: ld returned 1 exit status
make[2]: *** [collect2] Error 1
make[1]: *** [stage2_build] Error 2
make: *** [bootstrap] Error 2



After some investigation, I found that the symbols restFP and saveFP are coming into libiberty.a from
pex-unix.o. By replacing libiberty/pex-unix.c with an older version of pex-unix.c (from before you applied
your patch), the problem goes away. I haven't had the chance to investigate this further yet, but I
wanted to mention it.


ctice% nm -o ../libiberty/libiberty.a | grep restFP
../libiberty/libiberty.a:pex-unix.o:         U restFP
ctice% nm -o ../libiberty/libiberty.a | grep saveFP
../libiberty/libiberty.a:pex-unix.o:         U saveFP
ctice% nm -o ../libiberty/pex-unix.o | grep saveFP
../libiberty/pex-unix.o:         U saveFP
ctice% nm -o ../libiberty/pex-unix.o | grep restFP
../libiberty/pex-unix.o:         U restFP

Actually this is an issue with Apple versus FSF libgcc and the name of the
function which saves/restores the FP so to resolve this issue either
the FSF's gcc has to have the functions in Darwin's libgcc or have libiberty
be built like the rest of the compiler, in each stage.


Thanks,
Andrew Pinski
pinskia@physics.uc.edu


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]