From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by sourceware.org (Postfix) with ESMTPS id 566443858430 for ; Tue, 16 Nov 2021 12:52:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 566443858430 Received: by mail-qk1-x72e.google.com with SMTP id a11so13710794qkh.13 for ; Tue, 16 Nov 2021 04:52:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=AzS+1FOUL68RKQbGb9WJ5UWDk6ItDHOXRt6gGAeS7i8=; b=0t7zPEKw/v8hI3wd1Q02srDrrerOa6GYHCqSV0UxJWGOZJUYYpgrFnyu3YvyPDMXdJ i3YtnOkC+g1wXohfW87ZS/oR7gcWGwsW9A5Pg2IkvJuwMJEcLUPf5z+tkN9hGNakUXNZ Elvt5azYNgpmuSApYxNDh9+4x/mSSl6JvHhm1enWVzyW/i4qlgc9PB9tK/nLJTZlgL4p kZLZNJFG8Q2/j4+tGMSejLQS1se4od4xgJIBIyrQAy7a+w47Kvh1NpQZoaYHwiRl4jZq 41lykSJUv6m30lCuA25bzhkDy/VETbO261Ue/GlaJ1s5NdSdYHVZEXnNS8RiOQwa0mpe 8T3A== X-Gm-Message-State: AOAM532Gtrz3u25hy1zXYQdwByaQh5s+0RY4BRgQYeq1thyf6QzGH8wn qaVPJPWBqoLyabdvb4Z4zY5Uwg== X-Google-Smtp-Source: ABdhPJzJrmTJYBX58jbhJmxUWhYFvSkl64ygkIkA7mx5jK4chwuIQwpgaknqHwkyewC/2NoOOpbwKw== X-Received: by 2002:a37:68d3:: with SMTP id d202mr586312qkc.70.1637067127869; Tue, 16 Nov 2021 04:52:07 -0800 (PST) Received: from ?IPV6:2804:431:c7ca:66dc:190:a0a5:4184:e499? ([2804:431:c7ca:66dc:190:a0a5:4184:e499]) by smtp.gmail.com with ESMTPSA id y21sm9233106qtw.10.2021.11.16.04.52.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Nov 2021 04:52:07 -0800 (PST) Message-ID: <6a1c82dd-41fb-7154-f133-7799d7d64305@linaro.org> Date: Tue, 16 Nov 2021 09:52:05 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH] elf: Use a temporary file to generate Makefile fragments [BZ #28550] Content-Language: en-US To: "H.J. Lu" Cc: GNU C Library , Florian Weimer References: <20211108154211.167829-1-hjl.tools@gmail.com> <20211108154211.167829-3-hjl.tools@gmail.com> <95b7c1f9-406b-9711-d056-461e657c26b1@linaro.org> From: Adhemerval Zanella In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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: , X-List-Received-Date: Tue, 16 Nov 2021 12:52:11 -0000 On 16/11/2021 01:48, H.J. Lu wrote: > > This works for me. > > Thanks. > > From a928b52c036bb888797b3e81014f441f0d876b65 Mon Sep 17 00:00:00 2001 > From: "H.J. Lu" > Date: Mon, 15 Nov 2021 16:28:39 -0800 > Subject: [PATCH] elf: Use a temporary file to generate Makefile fragments [BZ > #28550] > > Use a temporary file to generate Makefile fragments for DSO sorting tests > and use -include on them. > > This partially fixes BZ #28550. > --- > elf/Makefile | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/elf/Makefile b/elf/Makefile > index a311c3e23c..57374fc690 100644 > --- a/elf/Makefile > +++ b/elf/Makefile > @@ -498,8 +498,9 @@ endif > define include_dsosort_tests > $(objpfx)$(1).generated-makefile: $(1) > $(PYTHON) $(..)scripts/dso-ordering-test.py \ > - --description-file $$< --objpfx $(objpfx) --output-makefile $$@ > -include $(objpfx)$(1).generated-makefile > + --description-file $$< --objpfx $(objpfx) --output-makefile $$@T > + mv $$@T $$@ > +-include $(objpfx)$(1).generated-makefile > endef > > # Generate from each testcase description file > -- > 2.33.1 I think you need the below on top of your patch. The 'avoid-generated' and 'postclean-generated' are required so a 'make clean' removes the autogenerated fragments so a subsequent 'make' regenerates them. diff --git a/elf/Makefile b/elf/Makefile index 57374fc690..31759279d4 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -491,6 +491,7 @@ tests-special += $(objpfx)order-cmp.out $(objpfx)tst-array1-cmp.out \ $(objpfx)tst-unused-dep-cmp.out endif +ifndef avoid-generated # DSO sorting tests: # The dso-ordering-test.py script generates testcase source files in $(objpfx), # creating a $(objpfx)-dir for each testcase, and creates a @@ -508,6 +509,9 @@ ifeq (yes,$(have-tunables)) $(eval $(call include_dsosort_tests,dso-sort-tests-1.def)) $(eval $(call include_dsosort_tests,dso-sort-tests-2.def)) endif +endif +postclean-generated += $(objpfx)/dso-sort-tests-2.generated-makefile \ + $(objpfx)/dso-sort-tests-2.generated-makefile check-abi: $(objpfx)check-abi-ld.out tests-special += $(objpfx)check-abi-ld.out