Fixes glibc stage 2 pthread errors (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 15 Jan 2015 18:03:13 +0000 (10:03 -0800)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 15 Jan 2015 18:03:13 +0000 (10:03 -0800)
commit48040b4a40bcda8da2bb2bc3f9dd88886cb2f161
tree9f17d820c5e7e08da96e95d7c25587f741aeb724
parentc82552ad57dd0b7262c7453c3333ac592d4de7e0
Fixes glibc stage 2 pthread errors (XCC)

On many, but not all, Akaros installations, the toolchain build would fail in
stage 2 of glibc, during the nss build.

The failure was due to the make system clobbering Parlib's pthread.h with the
one from glibc-2.19/include/pthread.h.  Not all systems would do the install,
which is rather mystifying.  It looks like the build system would see pthread.h
was needed, and then generate dependencies on both ../include/pthread.h and on
$TOOLCHAIN_SYSROOT/usr/include/pthread.h (the latter is Akaros's).  Some
systems would install include/pthread.h into the toolchain sysroot.  Others
would not.

By removing include/pthread.h, the dependency on that file was never created,
and thus never attempted to be installed.

Old dependency info:
$ grep -r pthread.h x86_64-ucb-akaros-glibc-stage2-builddir/
...
x86_64-ucb-akaros-glibc-stage2-builddir/nss/db-init.os.d: ../nscd/nscd.h ../include/pthread.h \
x86_64-ucb-akaros-glibc-stage2-builddir/nss/db-init.os.d: $TOOLCHAIN_INSTALL/x86_64-ucb-akaros/sysroot/usr/include/pthread.h
...

Old dependency info:
$ grep -r pthread.h x86_64-ucb-akaros-glibc-stage2-builddir/
...
x86_64-ucb-akaros-glibc-stage2-builddir/nss/db-init.os.d: $TOOLCHAIN_INSTALL/x86_64-ucb-akaros/sysroot/usr/include/pthread.h
...

You'll need to make clean your toolchain and rebuild.
tools/compilers/gcc-glibc/Makefile