From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id 54CA93858293 for ; Mon, 29 Aug 2022 14:30:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 54CA93858293 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ot1-x329.google.com with SMTP id v2-20020a056830090200b006397457afecso5329541ott.13 for ; Mon, 29 Aug 2022 07:30:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=7buhv/tuN40npZqSV+TF06nCKKwMQ7L6cr928hyTz5o=; b=aaHqWpKEUujiBCBTJC88QN87qga1o+sVYzs7Cbtdq5w6nuPYGEv5ynSmhQgyvERqfX 8BmSpoRWApz13exIOQhEP9ivTrHDOcFI75wrRIGeLzsItg60+YtGwdaWDfcrwZoEnMrM VwWVbJksqF35bnDFNF8DbeDN332Epj61plHBGRvb4XteVajbzIsIKoPDdPfsUxxcIlGf hL3zYoe52mR3VLOebdS69TQtBEFpLrih4UUwavI29jAr6QNTQRvPWR67lUKG4XSha8x0 AFMQ2hmyfXd5QGg15Idk8qbYh/3jJRergso8JUVb88n/778GNWp66fA5ju00nwqmWbhG zPTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=7buhv/tuN40npZqSV+TF06nCKKwMQ7L6cr928hyTz5o=; b=qIVpXocAA9UL4ieHMRWfkgF9cl9jARsPkoGPzrq33ccYAe8ZddNHoykMibkh7KdYTz CS81IEeDaeEgB9P3FStvHBAKOhzL7N+A05sQ08dFmL4qWmUpxvP3PYOIVP3wew9BR+g/ vD83i6vsLUXaVTBbbfThqFfoXaaBjMYJeupTcJcP6q7zU3BXr2oQtm5/XqJg+sm5r7GW D4I0KSmfSjaTW7mpfmkLaqnwBT/XJBJX4WUa9R5qXnKnTQQsUg85hrwRnZmPZDkUnSBn IWTlRXoBphPgjaaL2ou+c9ZPPlPvqZ580PcygGCdb2iCv3WxbGsb6EgdXqvCiVccPao1 YmKw== X-Gm-Message-State: ACgBeo1dEVSVfBSRRpAPu+HyunyIXE2/VB2Ve3neVLLa4x+cap4Ux9WH w+CMcHWQ/nNjWPsrax7kYXrKpg== X-Google-Smtp-Source: AA6agR67W3c7IFM67yJ3Gd6hs3dw+cIq98JMUDqplSbXlvDOAOfaC5tiqtmIPHgACbbzm6weccB6gg== X-Received: by 2002:a9d:674d:0:b0:637:2d9b:46dd with SMTP id w13-20020a9d674d000000b006372d9b46ddmr6217433otm.291.1661783414665; Mon, 29 Aug 2022 07:30:14 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c0:745e:189c:ed50:a343:6adf? ([2804:1b3:a7c0:745e:189c:ed50:a343:6adf]) by smtp.gmail.com with ESMTPSA id r7-20020acac107000000b003352223a14asm4725323oif.15.2022.08.29.07.30.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Aug 2022 07:30:14 -0700 (PDT) Message-ID: <6eb60529-e4af-8b2d-5941-4122b20521ca@linaro.org> Date: Mon, 29 Aug 2022 11:30:12 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH 1/3] scripts/dso-ordering-test.py: Generate program run-time dependencies Content-Language: en-US To: Florian Weimer , libc-alpha@sourceware.org References: <9faf4908b8b923ca077b4a0eac10465d754350d2.1660573629.git.fweimer@redhat.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <9faf4908b8b923ca077b4a0eac10465d754350d2.1660573629.git.fweimer@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.9 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,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 15/08/22 11:30, Florian Weimer via Libc-alpha wrote: > The main program needs to depend on all shared objects, even objects > that have link-time dependencies among shared objects. Filtering > out shared objects that already have an link-time dependencies is not > necessary here; make will do this automatically. LGTM with the print debug leftover removed. Reviewed-by: Adhemerval Zanella > --- > scripts/dso-ordering-test.py | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/scripts/dso-ordering-test.py b/scripts/dso-ordering-test.py > index 2dd6bfda18..f6d22aa00e 100644 > --- a/scripts/dso-ordering-test.py > +++ b/scripts/dso-ordering-test.py > @@ -707,13 +707,12 @@ def process_testcase(t): > "\t$(compile.c) $(OUTPUT_OPTION)\n") > makefile.write (rule) > > - not_depended_objs = find_objs_not_depended_on(test_descr) > - if not_depended_objs: > - depstr = "" > - for dep in not_depended_objs: > - depstr += (" $(objpfx)" + test_subdir + "/" > - + test_name + "-" + dep + ".so") > - makefile.write("$(objpfx)%s.out:%s\n" % (base_test_name, depstr)) > + # Ensure that all shared objects are built before running the > + # test, whether there link-time dependencies or not. > + depobjs = ["$(objpfx){}/{}-{}.so".format(test_subdir, test_name, dep) > + for dep in test_descr.objs] > + makefile.write("$(objpfx){}.out: {}\n".format( > + base_test_name, " ".join(depobjs))) > > # Add main executable to test-srcs > makefile.write("test-srcs += %s/%s\n" % (test_subdir, test_name)) > @@ -779,6 +778,7 @@ def process_testcase(t): > # description string. > for obj in test_descr.objs: > src_name = test_name + "-" + obj + ".c" > + print('Generating {}...'.format(src_name)) > f = open(testpfx_src + src_name, "w") > if obj in test_descr.callrefs: > called_objs = test_descr.callrefs[obj]