From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 dcvr.yhbt.net (Postfix) with ESMTPS id 1CBAD1F55B for ; Tue, 19 May 2020 14:33:16 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7BCF9385BF81; Tue, 19 May 2020 14:33:14 +0000 (GMT) Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 4FBE4385BF81 for ; Tue, 19 May 2020 14:33:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4FBE4385BF81 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=mentor.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ChungLin_Tang@mentor.com IronPort-SDR: Wy6fz7KgbYA/Ob3sYWS8fROtw1VQeXTBH8zOhAup3JWjKHTg/Dc0YlzpE6eg68Ha583GTdNlCQ SH7EPc/ncdZ0lHrUpeVNG4IHeP+5DjuXVNvVZfT6BaL6ZA6c+K0xMQ5rmtar8cISrJpTilVJ6F alyxymDO0tHlMBr8PQQzmEW1+H4keU8PVq/c+YZZm9vZfcdK3Dm7KOhxy/3EasnFdCEhJa7uNB hylRJQc2B/MmLgOP54YpE3gdpWUDYnez4utjvNWOJIfCcfxGdUtP506npeqAMznRNdTKZXLiC7 duk= X-IronPort-AV: E=Sophos;i="5.73,410,1583222400"; d="scan'208";a="48923440" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 19 May 2020 06:33:09 -0800 IronPort-SDR: Me8zQ1csFK7cWUfgBahGYGJDobBsMhrLLP6epN+4d9o8JigvURIoQR07XBSkUKuSsLaFUZ3NK8 /ZikR2O3QcPyM9VrRgBIZzo1A8SRck9Qf7B894qnp5bNwZSXYWlirEgRkYVWk1bdXZj5J1fkb8 jOBK9dAGvhJaYCLPmitz7NwQqm92zkwk+SgaHFMZUO4sEenask2xxP4fFQBHUIPb2rlAthAf5q tmX8QCa1g8lK0TBVccsLNaJDnRgpg4E1WmnS5EGDTilnjy9VGHnWHcl0w3Ex1mVuQMX8kHSr2j W58= Subject: Re: [PATCH v2 1/2] BZ #17645, fix slow DSO sorting behavior in dynamic loader To: Andreas Schwab References: <87a724uhtf.fsf@igel.home> From: Chung-Lin Tang Message-ID: Date: Tue, 19 May 2020 22:33:02 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87a724uhtf.fsf@igel.home> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) To svr-orw-mbx-02.mgc.mentorg.com (147.34.90.202) 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: , Reply-To: cltang@codesourcery.com Cc: Catherine Moore , GNU C Library Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" On 2020/5/19 10:21 PM, Andreas Schwab wrote: > On Mai 19 2020, Chung-Lin Tang wrote: > >> +define include_dsosort_tests >> +# We use the existence of the Makefile fragment file to indicate if we need to >> +# regenerate all sources and script for this test file. >> +$(shell if ! test -f "$(objpfx)$(1).tmp-makefile"; then \ >> + $(PYTHON) $(..)scripts/dso-ordering-test.py --description-file $(1) \ >> + --objpfx $(objpfx) --output-makefile $(objpfx)$(1).tmp-makefile; fi) >> +include $(objpfx)$(1).tmp-makefile >> +endef > > You can just write a rule that creates $(objpfx)$(1).tmp-makefile, no > need to use $(shell). Do you mean that an include target is automatically re-made? Thanks, Chung-Lin >> +# Currently all tests are defined in description files, and this function is >> +# not utilized, but kept here for possible conveniences. >> +define single_dsosort_test >> +$(shell $(PYTHON) $(..)scripts/dso-ordering-test.py --objpfx $(objpfx) \ >> + $(2) $(1) $(3) --output-makefile $(objpfx)$(1).tmp-makefile) >> +include $(objpfx)$(1).tmp-makefile >> +endef > > Likewise. > > Andreas. >