From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by sourceware.org (Postfix) with ESMTPS id 255A0385AC24 for ; Thu, 11 Nov 2021 18:22:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 255A0385AC24 Received: by mail-pj1-x102f.google.com with SMTP id h24so4758159pjq.2 for ; Thu, 11 Nov 2021 10:22:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JLFgIGEcHQeZla9+bsiwKHQQGq0MuR8FG4x7kgnz1gs=; b=RHn4z2BZVTrsz/anNlSeQm8q61Fr+5VSg1BLONwDYuoGOZTUvHsVZyrzVNeNkZFdH6 mI6y1rf4FzEvgzNL//zvl8lpvl41qejw2+GX3VkKflTRFBMPWzKu2q9pXL/fmL5F5Fpp p6zKpn22Z22o03hXJTJweWNQQuxUBiEMvdPaJJN9QiTQTVffDB52ndrusR0Q44oHhkAo 4XIYYr29iJQY4Y4P6q8dk83MdHOZduHVKeoLMcAjvwXfi1UY65Or7gSt/xNI1fKLtBze 3WadaK40FFda1tS3ej/HpQJ50Tx0wwfKL5bURSs3+1mUvtcoSy8ef3dVyMbwejbhIVd1 SzGw== X-Gm-Message-State: AOAM533fJ/lSej8bUvMRtuAhclohB//1yMZGju/EWasoWjGBrsqH+CGk Sjewhja2uunRw27SuqYn5USfFKv8JIRH5xsAgnk= X-Google-Smtp-Source: ABdhPJy/7aJ0/j987zSbhR9S72DY1YxvjG9qZKSWqqTIL2jBUxH1j0F9CClkUm4HloWvRC5OLAC0ppLG81vF0AKAGdo= X-Received: by 2002:a17:90b:1e0e:: with SMTP id pg14mr28337786pjb.143.1636654941267; Thu, 11 Nov 2021 10:22:21 -0800 (PST) MIME-Version: 1.0 References: <20211108154211.167829-1-hjl.tools@gmail.com> <20211108154211.167829-2-hjl.tools@gmail.com> In-Reply-To: From: "H.J. Lu" Date: Thu, 11 Nov 2021 10:21:45 -0800 Message-ID: Subject: Re: [PATCH v2 1/2] dso-ordering-test.py: Put all sources in one directory [BZ #28550] To: Chung-Lin Tang Cc: GNU C Library , Florian Weimer Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3023.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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: Thu, 11 Nov 2021 18:22:23 -0000 On Thu, Nov 11, 2021 at 9:52 AM Chung-Lin Tang wrote: > > > > On 2021/11/8 11:42 PM, H.J. Lu via Libc-alpha wrote: > > Put all sources for DSO sorting tests in the dso-sort-tests-src directory > > and compile test relocatable objects with > > > > $(objpfx)tst-dso-ordering1-dir/tst-dso-ordering1-a.os: $(objpfx)dso-sort-tests-src/tst-dso-ordering1-a.c > > $(compile.c) $(OUTPUT_OPTION) > > > > to avoid random $< values from $(before-compile) when compiling test > > relocatable objects with > > > > $(objpfx)%$o: $(objpfx)%.c $(before-compile); $$(compile-command.c) > > compile-command.c = $(compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags) > > compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS) > > I kind of see what you mean, but it appears that the explicit compile rule is the main required addition? > If so, why the directory change to "dso-sort-tests-src"? > (it kind of adds more complexity to the already somewhat complex placement of files, at least to someone new to the setup) > If the generated files are placed in the same directory where the object files are, they will match the default rule: $(objpfx)%$o: $(objpfx)%.c $(before-compile); $$(compile-command.c) compile-command.c = $(compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags) compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS) which is the root cause of the parallel build problem. -- H.J.