NPTL on MIPS32 little-endian - build problems

Dan E trg_info at
Tue Dec 16 02:57:42 UTC 2008

Hello uClibc list, this is my first post to the list but I've been
lurking and working with uClibc for about 5 years.

In regards to Carmelo's post here:

I retrieved svn commit version 24377 and am trying to build uClibc with
NPTL for a MIPS32 LE system.  I use a modified buildroot system and a
cross-compiling toolchain.  Mindful of the many posts here that are not
uClibc problems per se, I will try to keep my posts focused on uClibc
issues only.  Nevertheless, I think it goes without saying that most
people using uClibc do so in some sort of buildroot fashion with uClibc
forming an integral part of a cross-compiling toolchain.

Regarding my MIPS32 little-endian build of uClibc NPTL svn 24377...

I needed to comment out the following line in the top-level Rules.mak
file at line 504:
CFLAGS += $(call check_gcc,-std=gnu99,)

because in the preparation stage of building my toolchain where I am
setting up to build the stage1 compiler, there is no cross-compiler yet
to do that.  Commenting out that line allows the "make headers_install"
step to successfully complete.

I also had to patch several dozen instances of "static inline foo()
{...}" functions to read "static __inline__ foo() {...}" in order to get
the libraries built.  I'm using binutils 2.17 and gcc 4.1.2 in my
toolchain.  What versions of gcc are you all using where those "static
inline foo()" declarations don't result in errors?  I had this same
problem over the summer when I tried to build the NPTL branch.  I gave
up after awhile due to an unrelated issue back then, but now the time
has come where I need to get the NPTL threads working with uClibc.  From
my reading of the list archives it seems as though the consensus is that
NPTL threads are supposed to be working for MIPS.  In the end the
problems I have are probably of my own making, but after struggling for
several months with this, all I can say is, "You could have fooled me". 
It's a huge step forward that I can actually build the thing now. 
Validating that it actually works is next on my list.

I'd post patches but I don't know how to do that yet or what else might
be needed from me (as far as copyright goes) to get them accepted.

Replies, suggestions, tips, flames, GFYs, etc. welcome.

-- - The way an email service should be

More information about the uClibc mailing list