Re: [PATCH] thp: Link THP PDE tests with $(LOAD-THP-ADDRESS-LDFLAGS)
"H.J. Lu" <[email protected]>
| Newsgroups | gmane.comp.lib.glibc.alpha |
|---|---|
| Message-ID | <CAMe9rOp4zBKedY+40UNmJjYa1SDnQMT0fE2rzuDC1Tg_QhwTYw@mail.gmail.com> |
On Wed, Jul 15, 2026 at 7:08 PM Adhemerval Zanella Netto <[email protected]> wrote: > > > > On 04/07/26 18:41, H.J. Lu wrote: > > LOAD-THP-ADDRESS-LDFLAGS was added to work around: > > > > https://sourceware.org/bugzilla/show_bug.cgi?id=34184 > > > > which is needed for THP PDE tests. Add $(LOAD-THP-ADDRESS-LDFLAGS) to > > LDFLAGS-tst-thp-1 and LDFLAGS-tst-thp-1-no-s-code if PIE isn't built > > by default so that they are linked with $(LOAD-THP-ADDRESS-LDFLAGS). > > This fixes BZ #34314. > > > > > > From 9eb3c69bac0fdfb4e71b2594d0488774e212c5e3 Mon Sep 17 00:00:00 2001 > > From: "H.J. Lu" <[email protected]> > > Date: Sat, 4 Jul 2026 13:32:10 +0800 > > Subject: [PATCH] thp: Link THP PDE tests with $(LOAD-THP-ADDRESS-LDFLAGS) > > > > LOAD-THP-ADDRESS-LDFLAGS was added to work around: > > > > https://sourceware.org/bugzilla/show_bug.cgi?id=34184 > > > > which is needed for THP PDE tests. Add $(LOAD-THP-ADDRESS-LDFLAGS) to > > LDFLAGS-tst-thp-1 and LDFLAGS-tst-thp-1-no-s-code if PIE isn't built > > by default so that they are linked with $(LOAD-THP-ADDRESS-LDFLAGS). > > This fixes BZ #34314. > > > > Signed-off-by: H.J. Lu <[email protected]> > > LGTM, thanks. For $(build-pie-default)==no tst-thp-1 and tst-thp-1-pde > are essentially the same so maybe only build one in this scenario. Pushed. I will see if I can build PIE and PDE explicitly. > Reviewed-by: Adhemerval Zanella <[email protected]> > > > --- > > sysdeps/unix/sysv/linux/Makefile | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile > > index 1efeac5213..0f8fc24b1f 100644 > > --- a/sysdeps/unix/sysv/linux/Makefile > > +++ b/sysdeps/unix/sysv/linux/Makefile > > @@ -770,6 +770,9 @@ test-xfail-tst-thp-1-no-s-code-static = yes > > endif > > > > LDFLAGS-tst-thp-1 = -Wl,-z,separate-code $(THP-PAGE-SIZE-LDFLAGS) > > +ifneq (yes,$(build-pie-default)) > > +LDFLAGS-tst-thp-1 += $(LOAD-THP-ADDRESS-LDFLAGS) > > +endif > > LDFLAGS-tst-thp-1-pde = -Wl,-z,separate-code $(THP-PAGE-SIZE-LDFLAGS) \ > > $(LOAD-THP-ADDRESS-LDFLAGS) > > LDFLAGS-tst-thp-1-static = -Wl,-z,separate-code $(THP-PAGE-SIZE-LDFLAGS) > > @@ -778,6 +781,9 @@ LDFLAGS-tst-thp-1-static += $(LOAD-THP-ADDRESS-LDFLAGS) > > endif > > LDFLAGS-tst-thp-1-no-s-code = -Wl,-z,noseparate-code \ > > $(THP-PAGE-SIZE-LDFLAGS) > > +ifneq (yes,$(build-pie-default)) > > +LDFLAGS-tst-thp-1-no-s-code += $(LOAD-THP-ADDRESS-LDFLAGS) > > +endif > > LDFLAGS-tst-thp-1-no-s-code-pde = -Wl,-z,noseparate-code \ > > $(THP-PAGE-SIZE-LDFLAGS) \ > > $(LOAD-THP-ADDRESS-LDFLAGS) > > -- > > 2.54.0 > > > -- H.J.