public inbox for libc-stable@sourceware.org
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@sourceware.org>
To: libc-stable@sourceware.org
Cc: fweimer@redhat.com, Joseph Myers <joseph@codesourcery.com>
Subject: [PATCH] Use $(pie-default) with conformtest
Date: Mon, 13 Dec 2021 21:03:13 +0530	[thread overview]
Message-ID: <20211213153313.3770431-1-siddhesh@sourceware.org> (raw)

From: Joseph Myers <joseph@codesourcery.com>

My glibc bot showed that my conformtest changes fail the build of the
conformtest execution tests for x86_64-linux-gnu-static-pie, because
linking the newly built object with the newly built libc and the
associated options normally used for linking requires it to be built
as PIE.  Add $(pie-default) to the compiler command used so that PIE
options are used when required.

There's a case for using the whole of $(CFLAGS-.o) (which includes
$(pie-default)), but that raises questions of any impact from using
optimization flags from CFLAGS in these tests.  So for now just use
$(pie-default) as the key part of $(CFLAGS-.o) that's definitely
needed.

Tested with build-many-glibcs.py for x86_64-linux-gnu-static-pie.

(cherry picked from commit 885762aa31d75de8b9fea4c0e2e372b582d4c548)
---
 conform/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/conform/Makefile b/conform/Makefile
index 296db818f0..27ad98caf8 100644
--- a/conform/Makefile
+++ b/conform/Makefile
@@ -175,7 +175,8 @@ $(conformtest-header-tests): $(objpfx)%/conform.out: \
 			     conformtest.py $(conformtest-headers-data)
 	(set -e; std_hdr=$*; std=$${std_hdr%%/*}; hdr=$${std_hdr#*/}; \
 	 mkdir -p $(@D); \
-	 $(PYTHON) $< --cc='$(CC)' --flags='$(conformtest-cc-flags)' \
+	 $(PYTHON) $< --cc='$(CC) $(pie-default)' \
+		   --flags='$(conformtest-cc-flags)' \
 		   --ldflags='$(+link-tests-before-inputs)' \
 		   --libs='$(+link-tests-after-inputs)' \
 		   --run-program-prefix='$(run-program-prefix)' \
-- 
2.31.1


             reply	other threads:[~2021-12-13 16:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-13 15:33 Siddhesh Poyarekar [this message]
2021-12-13 16:53 ` Siddhesh Poyarekar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211213153313.3770431-1-siddhesh@sourceware.org \
    --to=siddhesh@sourceware.org \
    --cc=fweimer@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-stable@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).