From patchwork Mon Nov 8 15:42:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 47218 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8E9FE3858415 for ; Mon, 8 Nov 2021 15:43:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8E9FE3858415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1636386205; bh=WJa5sni8wP0ueURmz0kaIe57BUJk2OpM/v63+XwwVYg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=ylQnDz+8ZcG69PMD/fGeDJR+Acdk2SyPBfU5mexv+yV1LSkfgxSKhRD6KqsKzWq0C krPxnJBONbkcOd0RkqhBa6FlY72NHqEFNykIQOt7OC0DOwicSJiD4kVxJXmf3azCTJ WKBw2ycnzDdaN4rJv/aS8k9Eh9lK2mmBq7JFEdRI= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by sourceware.org (Postfix) with ESMTPS id 562F83858401 for ; Mon, 8 Nov 2021 15:42:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 562F83858401 Received: by mail-pj1-x1032.google.com with SMTP id t5-20020a17090a4e4500b001a0a284fcc2so9117477pjl.2 for ; Mon, 08 Nov 2021 07:42:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WJa5sni8wP0ueURmz0kaIe57BUJk2OpM/v63+XwwVYg=; b=7p1u0OjfMaKIuhjOksbhB7RypdA6VNobcZclS0T4+nEmqpNtwQH7MZIKl0SZn1oKSf MQqrttEVYLD1/sakshWAwfB84ZLh9SluMsOzdc+KIC7ffa9DQGhiJxNHkUvf135CJRIu SoVWTWUeVGIh5bSgkyJ3I1c+cqo4HgY7oVHIHS0gMPC8ejhTKv6+GjDfG4zOt7cBVAvL RSBu+0wPQ+/gmyTXUQgy6hq77veRs4eAq+rDwu2CfpHG8Ftj0Vu4pjvZ0CUhUggufAVF d9LnUTjyYvhddWhJNGVn4TW0bovR1f3v+ziqPJobj3i1TIVBdQNyf9gVg9NEV+DeznOp MR4g== X-Gm-Message-State: AOAM530BjCpGPtHMxfEJX/r55rHspZcWiCafbD7oQ+MkdmEHGytrLs1u 7zIvF2qkxhhZllmDgg53MELa/6JgSL8= X-Google-Smtp-Source: ABdhPJz+qkLIbHyRHBe00bGqDq20/Eg6Kn88wc6dYJR2cQfKjY2OA6+t8kJGkVWfZxwTHU1WD2O/pQ== X-Received: by 2002:a17:902:8bcc:b0:13f:ea68:a135 with SMTP id r12-20020a1709028bcc00b0013fea68a135mr200748plo.41.1636386133445; Mon, 08 Nov 2021 07:42:13 -0800 (PST) Received: from gnu-cfl-2.localdomain ([2607:fb90:a63f:468b:b937:402b:0:c66]) by smtp.gmail.com with ESMTPSA id l1sm15933446pff.125.2021.11.08.07.42.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 07:42:13 -0800 (PST) Received: from gnu-cfl-2.lan (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id CB82B1A0121; Mon, 8 Nov 2021 07:42:11 -0800 (PST) To: libc-alpha@sourceware.org Subject: [PATCH v2 0/2] Update Makefile fragments for DSO sorting tests Date: Mon, 8 Nov 2021 07:42:09 -0800 Message-Id: <20211108154211.167829-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 X-Spam-Status: No, score=-3025.6 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-Patchwork-Original-From: "H.J. Lu via Libc-alpha" From: "H.J. Lu" Reply-To: "H.J. Lu" Cc: Florian Weimer Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" One problem of using $(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) to build DSO sorting relocatable objects is that $< may not be the source file with 3 "make -j 28" parallel builds on a machine with 112 cores. When generating Makefile fragments at build time, the same file may be generated more than once at the same time with parallel builds. 1. Update dso-ordering-test.py to put all sources for DSO sorting tests in a single directory, dso-sort-tests-src, and compile 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) 2. Generate Makefile fragments for DSO sorting tests at configure time to avoid generate them in the elf directory at build time. H.J. Lu (2): dso-ordering-test.py: Put all sources in one directory [BZ #28550] elf: Pre-generate Makefile fragment for DSO sorting tests [BZ #28550] configure | 11 +++++++++ configure.ac | 12 +++++++++ elf/Makefile | 22 ++++------------- scripts/dso-ordering-test.py | 47 ++++++++++++++++++++++++++---------- 4 files changed, 62 insertions(+), 30 deletions(-)