From patchwork Fri Sep 17 19:24:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 1529549 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4HB3nC1LS0z9sRN for ; Sat, 18 Sep 2021 05:25:03 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 48CC1385702B for ; Fri, 17 Sep 2021 19:25:00 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 5C6AB385840D for ; Fri, 17 Sep 2021 19:24:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5C6AB385840D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: 3VC2aYSzIadRRn3VBJRXhLcb6p9J8ZUirzvrMwvJPDI2TaLK0PpUsrGeIfiANVAam/rNZqeSSW Hsu0VV8aliHIb09wUkKURrXsMEyu8/w3S7zyxCXgtUQUH9FrAM4mryzikqbG2U4AD1syTBLQfR ieGAcZBe9KHKLav/kP3LizBs9cOhIGfPqAApIp2v5WYp2DzxS2+r+gVnrEsrB0rE9TgZZSe5lG gcTGDKu6ILMJHtQF9Loa99YR5jyJSy4wGYkAClz39G38wBzE3OKXQR+VNa8i0nU3dQl1zq1DVf fX6rR8gk5Kc+0KGda1U0wIEc X-IronPort-AV: E=Sophos;i="5.85,302,1624348800"; d="scan'208";a="66182597" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 17 Sep 2021 11:24:51 -0800 IronPort-SDR: UmWGbhqNdUoETxTRtsAxOpjG92tB+7Tv/gUT5HvwL/wfpAfPNwQBJ0rT1s20QQad7ntnUh5nYr NZVv44m1z4J/wgYuCl88It2TEHM53PjfWg+rzIZmUEpJxRPtkQyJNYvofy2hoZa8GDBNEQhZBX 1AzqEWZjWbwTMxkwU2SrPNt/RErDlfE9ViZ6o4YmQvD3nmqezvFSnp7DyiDWhfLLWZG2dokgSl VCdFV2q1dMrcuRcG8WUPLv19BD/wLnlWYrKQ/tTZjkaFXRgUyp189NDELwQDoLrsxGtcHn0LbP 9uw= Date: Fri, 17 Sep 2021 19:24:46 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Subject: Use $(pie-default) with conformtest [committed] Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-05.mgc.mentorg.com (139.181.222.5) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3124.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" 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. --- Committed. 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)' \