[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

re: bootstrapping binutils/gcc



   
   However, I'm still building with the NetBSD gcc/binutils/libc, and I
   figured that now would be a good time to switch to a Debian "native"
   compiler. =)
   
   
   To accomplish this, I have binutils configured with
   	--target=alpha-netbsd --prefix=/some/path
   
   and compiled with the netbsd-gcc (egcs-1.1.2), which succeeded so far.
   
   Now, if I compile a simple C program with
   	# netbsd-gcc -c foo.c
   and then link it statically with the _new_ binutils and the _original_
   netbsd libc, libgcc and crt*.o stuff, it works out.
   
   However, if I try to link it dynamically using the original netbsd
   stuff (in particular ld.elf_so), it segfaults and running it in the
   debugger gets gdb severely confused.  So I guess I'm doing something
   really wrong here.
   
   I'm about to compile a bootstrap gcc (same configure options as
   binutils plus --with-gnu-* options) that'll use my new binutils, and
   then have a try at libc with it (in order to produce a new set of
   crt*.o), but this is more or less fishing in muddy water.
   
   Can anybody shed some light on how the i386 gcc/binutils packages were
   built?


note that the `i386-netbsdelf' target was only recently added to GCC
and isn't in any GCC release yet (they ignored my requests to pull it
up to 3.0.1 or something, i don't remember now..)  i'm also unsure how
stable the alpha-netbsd target is in non-gcc-current or non-netbsd
source tree.  there are issues with ld.elf_so & modern binutils i
think it is -- i don't know if the netbsd-1-5 branch has the patches
for ld.elf_so or not but i think so.  basically as i understand it
netbsd/alpha was using a non-standard PLT entry format, and the newer
binutils emits something that the old ld.elf_so can't handle and
dumps core.



Reply to: