public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [hurd,commited 0/2] More htl tests fixes
@ 2020-06-10 21:36 Samuel Thibault
  2020-06-10 21:36 ` [hurd,commited 1/2] pthread: Move back linking rules to nptl and htl Samuel Thibault
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Samuel Thibault @ 2020-06-10 21:36 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault, commit-hurd

Samuel Thibault (2):
  pthread: Move back linking rules to nptl and htl
  hurd: document that gcc&gdb look at the trampoline code

 htl/Makefile                        | 18 ++++++++++++++++++
 nptl/Makefile                       | 18 ++++++++++++++++++
 sysdeps/mach/hurd/i386/trampoline.c |  6 +++++-
 sysdeps/pthread/Makefile            | 18 ------------------
 4 files changed, 41 insertions(+), 19 deletions(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [hurd,commited 1/2] pthread: Move back linking rules to nptl and htl
  2020-06-10 21:36 [hurd,commited 0/2] More htl tests fixes Samuel Thibault
@ 2020-06-10 21:36 ` Samuel Thibault
  2020-06-10 21:36 ` [hurd, commited 2/2] hurd: document that gcc&gdb look at the trampoline code Samuel Thibault
  2020-06-10 21:39 ` [hurd,commited 0/2] More htl tests fixes Samuel Thibault
  2 siblings, 0 replies; 4+ messages in thread
From: Samuel Thibault @ 2020-06-10 21:36 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault, commit-hurd

d6d74ec16 ('htl: Enable more tests') moved the linking rules from
nptl/Makefile and htl/Makefile to the shared sysdeps/pthread/Makefile.  But
e.g. on powerpc some tests are added in sysdeps/powerpc/Makefile, which is
included *after* sysdeps/pthread/Makefile, and thus the tests don't get
affected by the rules and fail to link.  For now let's just copy over the
set of rules in both nptl/Makefile and htl/Makefile.

* sysdeps/pthread/Makefile: Move libpthread linking rules to...
* htl/Makefile: ... here and...
* nptl/Makefile: ... there.
---
 htl/Makefile             | 18 ++++++++++++++++++
 nptl/Makefile            | 18 ++++++++++++++++++
 sysdeps/pthread/Makefile | 18 ------------------
 3 files changed, 36 insertions(+), 18 deletions(-)

diff --git a/htl/Makefile b/htl/Makefile
index f647e4a0ca..2de98e1774 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -203,3 +203,21 @@ libc-link.so = $(common-objpfx)libc.so
 extra-B-pthread.so = -B$(common-objpfx)htl/
 
 include ../Rules
+
+# Make sure we link with the thread library.
+ifeq ($(build-shared),yes)
+$(addprefix $(objpfx), \
+  $(filter-out $(tests-static) $(xtests-static) $(tests-reverse) \
+    $(tests-nolibpthread), \
+    $(tests) $(tests-internal) $(xtests) $(test-srcs) $(tests-container))): \
+	$(objpfx)libpthread.so
+$(objpfx)tst-unload: $(libdl)
+# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
+# since otherwise libpthread.so comes before libc.so when linking.
+$(addprefix $(objpfx), $(tests-reverse)): \
+  $(objpfx)../libc.so $(objpfx)libpthread.so
+$(objpfx)../libc.so: $(common-objpfx)libc.so ;
+$(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
+else
+$(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
+endif
diff --git a/nptl/Makefile b/nptl/Makefile
index 3f0b107d2f..55cd147f8c 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -569,6 +569,24 @@ $(objpfx)libpthread.so: $(addprefix $(objpfx),$(crti-objs) $(crtn-objs))
 $(objpfx)libpthread.so: +preinit += $(addprefix $(objpfx),$(crti-objs))
 $(objpfx)libpthread.so: +postinit += $(addprefix $(objpfx),$(crtn-objs))
 
+# Make sure we link with the thread library.
+ifeq ($(build-shared),yes)
+$(addprefix $(objpfx), \
+  $(filter-out $(tests-static) $(xtests-static) $(tests-reverse) \
+    $(tests-nolibpthread), \
+    $(tests) $(tests-internal) $(xtests) $(test-srcs) $(tests-container))): \
+	$(objpfx)libpthread.so
+$(objpfx)tst-unload: $(libdl)
+# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
+# since otherwise libpthread.so comes before libc.so when linking.
+$(addprefix $(objpfx), $(tests-reverse)): \
+  $(objpfx)../libc.so $(objpfx)libpthread.so
+$(objpfx)../libc.so: $(common-objpfx)libc.so ;
+$(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
+else
+$(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
+endif
+
 ifeq ($(build-shared),yes)
 $(objpfx)crti.o: $(objpfx)pt-crti.o
 	ln -f $< $@
diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile
index 2d483c8534..8d094b2221 100644
--- a/sysdeps/pthread/Makefile
+++ b/sysdeps/pthread/Makefile
@@ -228,22 +228,4 @@ LDFLAGS-tst-join7mod.so = -Wl,-soname,tst-join7mod.so
 
 CFLAGS-tst-unwind-thread.c += -funwind-tables
 
-# Make sure we link with the thread library.
-ifeq ($(build-shared),yes)
-$(addprefix $(objpfx), \
-  $(filter-out $(tests-static) $(xtests-static) $(tests-reverse) \
-    $(tests-nolibpthread), \
-    $(tests) $(tests-internal) $(xtests) $(test-srcs) $(tests-container))): \
-	$(objpfx)libpthread.so
-$(objpfx)tst-unload: $(libdl)
-# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
-# since otherwise libpthread.so comes before libc.so when linking.
-$(addprefix $(objpfx), $(tests-reverse)): \
-  $(objpfx)../libc.so $(objpfx)libpthread.so
-$(objpfx)../libc.so: $(common-objpfx)libc.so ;
-$(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
-else
-$(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
-endif
-
 endif
-- 
2.26.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [hurd, commited 2/2] hurd: document that gcc&gdb look at the trampoline code
  2020-06-10 21:36 [hurd,commited 0/2] More htl tests fixes Samuel Thibault
  2020-06-10 21:36 ` [hurd,commited 1/2] pthread: Move back linking rules to nptl and htl Samuel Thibault
@ 2020-06-10 21:36 ` Samuel Thibault
  2020-06-10 21:39 ` [hurd,commited 0/2] More htl tests fixes Samuel Thibault
  2 siblings, 0 replies; 4+ messages in thread
From: Samuel Thibault @ 2020-06-10 21:36 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault, commit-hurd

* sysdeps/mach/hurd/i386/trampoline.c (rpc_wait_trampoline): Document
which gcc and gdb files look at the code of the trampoline.
---
 sysdeps/mach/hurd/i386/trampoline.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sysdeps/mach/hurd/i386/trampoline.c b/sysdeps/mach/hurd/i386/trampoline.c
index e7eb316fce..8c7976919c 100644
--- a/sysdeps/mach/hurd/i386/trampoline.c
+++ b/sysdeps/mach/hurd/i386/trampoline.c
@@ -227,7 +227,11 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
 }
 
 /* The trampoline code follows.  This used to be located inside
-   _hurd_setup_sighandler, but was optimized away by gcc 2.95.  */
+   _hurd_setup_sighandler, but was optimized away by gcc 2.95.
+
+   If you modify this, update
+   - in gcc: libgcc/config/i386/gnu-unwind.h x86_gnu_fallback_frame_state,
+   - in gdb: gdb/i386-gnu-tdep.c gnu_sigtramp_code.  */
 
 asm ("rpc_wait_trampoline:\n");
   /* This is the entry point when we have an RPC reply message to receive
-- 
2.26.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [hurd,commited 0/2] More htl tests fixes
  2020-06-10 21:36 [hurd,commited 0/2] More htl tests fixes Samuel Thibault
  2020-06-10 21:36 ` [hurd,commited 1/2] pthread: Move back linking rules to nptl and htl Samuel Thibault
  2020-06-10 21:36 ` [hurd, commited 2/2] hurd: document that gcc&gdb look at the trampoline code Samuel Thibault
@ 2020-06-10 21:39 ` Samuel Thibault
  2 siblings, 0 replies; 4+ messages in thread
From: Samuel Thibault @ 2020-06-10 21:39 UTC (permalink / raw)
  To: libc-alpha; +Cc: commit-hurd

Sorry, wrong patches

(the box I send mails from is not the same as the one from which I push,
and I forgot to pull there)

Samuel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-10 21:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10 21:36 [hurd,commited 0/2] More htl tests fixes Samuel Thibault
2020-06-10 21:36 ` [hurd,commited 1/2] pthread: Move back linking rules to nptl and htl Samuel Thibault
2020-06-10 21:36 ` [hurd, commited 2/2] hurd: document that gcc&gdb look at the trampoline code Samuel Thibault
2020-06-10 21:39 ` [hurd,commited 0/2] More htl tests fixes Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).