[RFC,19/22] New gen-as-const-headers infinity-nptl{,_db}-constants.h

Message ID 1445352975-17844-20-git-send-email-gbenson@redhat.com
State New, archived
Headers

Commit Message

Gary Benson Oct. 20, 2015, 2:56 p.m. UTC
  This commit adds two new generated assembler constants headers to
export constants used while building libpthread.so and
libthread_db.so.  It also adds a rule to build them to nptl/Makefile.

I would prefer to have infinity-nptl_db-constants.sym in nptl_db
and have it built by nptl_db/Makefile but the ordering of the build
seems to make this impossible: nptl_db needs to be built after nptl,
but infinity-nptl_db-constants.h is required to build the infinity
notes for libpthread.so.  If it's possible to change this then I
will.  In the meantime I had to add "breadcrumb" header files for
nptl_db's proc_service.h and thread_db.h for use during the build.
---
 include/proc_service.h              |    1 +
 include/thread_db.h                 |    1 +
 nptl/Makefile                       |    4 +++-
 nptl/infinity-nptl-constants.sym    |    5 +++++
 nptl/infinity-nptl_db-constants.sym |   12 ++++++++++++
 5 files changed, 22 insertions(+), 1 deletions(-)
 create mode 100644 include/proc_service.h
 create mode 100644 include/thread_db.h
 create mode 100644 nptl/infinity-nptl-constants.sym
 create mode 100644 nptl/infinity-nptl_db-constants.sym
  

Patch

diff --git a/include/proc_service.h b/include/proc_service.h
new file mode 100644
index 0000000..325082e
--- /dev/null
+++ b/include/proc_service.h
@@ -0,0 +1 @@ 
+#include <nptl_db/proc_service.h>
diff --git a/include/thread_db.h b/include/thread_db.h
new file mode 100644
index 0000000..518d79e
--- /dev/null
+++ b/include/thread_db.h
@@ -0,0 +1 @@ 
+#include <nptl_db/thread_db.h>
diff --git a/nptl/Makefile b/nptl/Makefile
index 311b1a7..0272813 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -302,7 +302,9 @@  tests-nolibpthread = tst-unload
 gen-as-const-headers = pthread-errnos.sym \
 		       lowlevelcond.sym lowlevelrwlock.sym \
 		       lowlevelbarrier.sym unwindbuf.sym \
-		       lowlevelrobustlock.sym pthread-pi-defines.sym
+		       lowlevelrobustlock.sym pthread-pi-defines.sym \
+		       infinity-nptl-constants.sym \
+		       infinity-nptl_db-constants.sym
 
 
 LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst
diff --git a/nptl/infinity-nptl-constants.sym b/nptl/infinity-nptl-constants.sym
new file mode 100644
index 0000000..898ee54
--- /dev/null
+++ b/nptl/infinity-nptl-constants.sym
@@ -0,0 +1,5 @@ 
+#include <list.h>
+
+-- structure offsets
+
+LIST_T_NEXT_OFFSET	offsetof (list_t, next)
diff --git a/nptl/infinity-nptl_db-constants.sym b/nptl/infinity-nptl_db-constants.sym
new file mode 100644
index 0000000..aed18ac
--- /dev/null
+++ b/nptl/infinity-nptl_db-constants.sym
@@ -0,0 +1,12 @@ 
+#include <thread_db.h>
+#include <proc_service.h>
+
+-- td_err_e values
+
+TD_OK
+TD_ERR
+
+-- ps_err_e values
+
+PS_OK
+PS_ERR