[PATCH 1/2] nptl: sysdep headers re-factoring

Carmelo AMOROSO carmelo.amoroso at st.com
Thu Jan 7 14:27:51 UTC 2010

Hash: SHA1

Carmelo AMOROSO wrote:
> This patch will re-factor and simplify sysdep headers
> handling for nptl branch.
> The reason is to use some useful macros in asm code (i.e. ENTRY()) that are available
> only into nptl branch because are defined in sysdep.h header under the nptl folder
> even if they are not related to NPTL at all (this was likely due to a bad choice done
> at the early stage of NPTL porting).
> This is a required steps for integrating into master branch some asm code available in
> nptl branch for sh4.
> The main changes are described below:
> nptl/sysdeps/generic/sysdep.h (moved) ---> libc/sysdeps/linux/common/sysdep.h
> nptl/sysdeps/arm/sysdep.h     (moved) ---> libc/sysdeps/linux/arm/sysdep.h
> nptl/sysdeps/sh/sysdep.h ---------------------|
> nptl/sysdeps/unix/sh/sysdep.h ----------------|
> nptl/sysdeps/unix/sysv/linux/sh/sysdep.h -----|
> nptl/sysdeps/unix/sysv/linux/sh/sh4/sysdep.h -|
>                                               |(merged) ---> libc/sysdeps/linux/sh
> nptl/sysdeps/unix/sysdep.h (deleted)
> Similarly the mips and arm sysdep.h should be merged and updated as for sh arch.
> Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
> ---
>  Rules.mak                                          |    2 +-
>  libc/sysdeps/linux/arm/sysdep.h                    |   91 +++++++
>  libc/sysdeps/linux/common/sysdep.h                 |  139 ++++++++++
>  libc/sysdeps/linux/sh/sysdep.h                     |  277 ++++++++++++++++++++
>  libpthread/nptl/sysdeps/arm/sysdep.h               |   91 -------
>  libpthread/nptl/sysdeps/generic/sysdep.h           |  137 ----------
>  libpthread/nptl/sysdeps/sh/sysdep.h                |   82 ------
>  libpthread/nptl/sysdeps/unix/sh/sysdep.h           |   29 --
>  libpthread/nptl/sysdeps/unix/sysdep.h              |   63 -----
>  .../nptl/sysdeps/unix/sysv/linux/sh/sh4/sysdep.h   |    4 -
>  .../nptl/sysdeps/unix/sysv/linux/sh/sysdep.h       |  224 ----------------
>  11 files changed, 508 insertions(+), 631 deletions(-)
>  create mode 100644 libc/sysdeps/linux/arm/sysdep.h
>  create mode 100644 libc/sysdeps/linux/common/sysdep.h
>  create mode 100644 libc/sysdeps/linux/sh/sysdep.h
>  delete mode 100644 libpthread/nptl/sysdeps/arm/sysdep.h
>  delete mode 100644 libpthread/nptl/sysdeps/generic/sysdep.h
>  delete mode 100644 libpthread/nptl/sysdeps/sh/sysdep.h
>  delete mode 100644 libpthread/nptl/sysdeps/unix/sh/sysdep.h
>  delete mode 100644 libpthread/nptl/sysdeps/unix/sysdep.h
>  delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sh/sh4/sysdep.h
>  delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sh/sysdep.h

Both patches are meant for NPTL branch (forgot to specify the branch in the subject).
This work is completed for SH (the only I can test build/run).
I'd like some ARM NPTL user (Khem ?) would complete this stuff by merging
the nptl/arm sysdep into libc/arm one.

With this patch in place the current situation is as below:







My idea (as I've done for sh) is to move all ARCH sysdep from nptl
to libc/sysdeps/linux/ARCH, merging the several occurences into just
one header.

Indeed the sysdep.h from nptl are not nptl related and glibc keeps them
in <root>/sysdpes/ and not in <root>/nptl/sysdeps

Further we can get rid of the multiple subdirs under sysdeps/unix because
we don't support other Unix variants than Linux

I think that i386 sysdeps can be easily merged into a libc/sysdeps/linux/i386.
The same applies to x86_64 and sparc because there is not a counterpart
already present under libc/sysdeps/linux/ARCH.

ARM needs to be manually merged (Khem ?)
MIPS needs much more attention because there are multiple instances of
a MIPS sysdep in several places.

If this idea is fine, I'd go ahead committing my patch,
asking the NPTL/ARCH maintainer (Austin ?) to do the same on their arch...
I don't know who could at least test/build MIPS.

After that we can work to integrate this change on master where required.


Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org


More information about the uClibc mailing list