On Sun, 2003-11-23 at 22:59, Arnd Bergmann wrote: > On Monday 24 November 2003 18:09, Martin Hicks wrote: > > > I'm not entirely sure why I had to change $(GCC) to $(LD) in the link > > step. If I don't I get a warning: > > > > /usr/bin/ld: Warning: type of symbol 'errno' changed from 1 to 6 in > > /usr/lib/gcc-lib/ia64-linux/3.3.2/../../../libc.a(errno.o) > > > > Maybe we're missing a flag on the final link, while using $(GCC)? The > > old Makefile.klibc used $(LD), which allowed me to track down this > > problem. > > Hmm, it does sound like a real problem. If you are using a glibc with > tls enabled, simply using 'extern int errno;' is guaranteed to fail. > Does 'find -name \*.o | xargs readelf -a | grep errno' reveal anything > interesting? Nothing interesting to me, although I'm not sure what I'm looking for. > > > @@ -93,6 +96,10 @@ > > CFLAGS+=-pipe > > endif > > > > +ifeq ($(strip $(ARCH)),ia64) > > + BITS=64 > > +endif > > + > > The information can be taken from klibc/arch/${ARCH}/MCONFIG. > > > - $(CC) $(LDFLAGS) -o $(ROOT) $(CRT0) $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS) > > + $(LD) $(LDFLAGS) -o $(ROOT) $(CRT0) $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS) This is a good idea. I forgot about that file. > > Using ld instead of gcc breaks 32 bit platforms, unless you manually add libgcc > like we do for the klibc build (64 bit division is a library function). > I've also added a definition for LD, so it becomes usable for cross-compiling. Maybe I'll ask on the ia64 list about the errno thing. mh -- Martin Hicks || mort@bork.org || PGP/GnuPG: 0x4C7F2BEE