when building up a cross-compiler for ia64, we do: - install binutils - install kernel/C-library headers - build a static C-only gcc compiler - install glibc - try to link a static ELF -> failure this is due to libgcc on ia64 being dependent on libunwind symbols. when shared libs are disabled, the libgcc.a ends up referring to __libunwind_xxx symbols which aren't provided in the non-shared case. specifically, we have: - ia64 forces t-unwind in config.gcc which adds -DUSE_LIBUNWIND_EXCEPTIONS - gcc/unwind-compat.c has a bunch of extern __libunwind_xxx decls - libgcc/Makefile.in adds unwind-compat.o to libgcc.a when enable_shared!=yes - gcc/config/ia64/unwind-ia64.c defines __libunwind_xxx aliases when SHARED - unwind-ia64.o is only added to libunwind.{a,so} and never libgcc.a so, the end libgcc.a gets unwind-compat.o which refers to __libunwind_xxx, but doesn't get unwind-ia64.o which could possibly define them, and even if it did, the aliases aren't enabled for static objects. looks like we could fix this in the t-glibc-libunwind file, when enable_shared is disabled, add the ia64 unwind objects to libgcc.a. additionally, have unwind-ia64.c key off of not just SHARED but also STATIC_ONLY for declaring the symbols, and have the t-glibc-unwind file build unwind-ia64.o with that.
I've seen this problem when building glibc as well. It tries to build a number of utilities and link them against libgcc with the missing symbols that you mentioned. In the scripts that I use to build the toolchains, I was able to solve this by adding a configparms file to the build directory that sets "build-programs = no". After the final gcc is built, libunwind is properly installed and can at least be used for dynamically linked executables. I've also tested that the resulting gcc can link static executables, though I'm not able to execute because I lack the hardware.
(In reply to comment #1) yes, the "build-programs = no" hack is also what i do. from my tests in the past, the cross-compiler produced usable executables. note, there is an ia64 simulator that you can boot an ia64 kernel + userland in to do testing (if you really want). http://ski.sourceforge.net/ http://www.gelato.unsw.edu.au/IA64wiki/SkiSimulator