From patchwork Sun Nov 7 15:07:25 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: 47181 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 7E1C03858022 for ; Sun, 7 Nov 2021 15:09:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E1C03858022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1636297763; bh=7+fCfoTL8l/+dKRGrZ6V98dR3RSNZ6+hiiiV9kcY/xU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=RHNkqciQx2UXLV5fqudEJPmHalR2zhJyN2mr0+xygYmf1qjarExg8ejJL1L328Y74 NFwpTNrxd61UT3Iym7c5e5eXO7rOfkR/EYklyCoLPBcZ/ygW+n2HoVoWVup7qv1LYX qrfSlOLc36gSc9Gch1Ei7dml6x2eKZCWmDeVINUM= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id 2E01F3858401 for ; Sun, 7 Nov 2021 15:07:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2E01F3858401 Received: by mail-pg1-x52a.google.com with SMTP id g184so12893975pgc.6 for ; Sun, 07 Nov 2021 07:07:30 -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:subject:date:message-id:mime-version :content-transfer-encoding; bh=7+fCfoTL8l/+dKRGrZ6V98dR3RSNZ6+hiiiV9kcY/xU=; b=r+SQKP1s0myfvBZQkJ7LUaPCheuxC0/FqutvosKFIMFtoTKewydQrglLz00ZYyX7Yw ovAdc+XqCdc+po8K9Efuj/je/kfxmHKIgJSA04L48Bm9IBACTo9d2Uh3mXYCmRl9puKW q+BTAJOFUX6T9vf9/zOmox90uCLwB2ZKX0u4fB9sJbO8WzX94jJhAdxDuCNnyEm4fbNH AbEl2HE0nuPbtHpTJTqT00SM0NxStq4Tic0kA9YaORYeg3VPON4M4OI3rAlbDe7f7DL+ oABr8SLcTHXPsSwGsI692vUUswf43fQDCv2/wO+s4ryQdBQWpR1K+XL1E9eFi86F0zWC PWaQ== X-Gm-Message-State: AOAM531cdf9MJsRbpnFZYM0VkLnqzfpQFbBXHzF/y2mcwwmQiZd0JlJL uRw3BkDGqeJL9LEgWHMU/vJIKGbDOsY= X-Google-Smtp-Source: ABdhPJzUTe/JtiYy8JP5ZxnaZ5FIiiKwPgDo4Hhdte/o9JBBCaj6/rq4aYKl0fwZx2qASTG+cwc+sg== X-Received: by 2002:a63:ce0a:: with SMTP id y10mr56102779pgf.133.1636297649018; Sun, 07 Nov 2021 07:07:29 -0800 (PST) Received: from gnu-cfl-2.localdomain ([2607:fb90:a63f:468b:b937:402b:0:c66]) by smtp.gmail.com with ESMTPSA id e187sm12962314pfe.181.2021.11.07.07.07.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Nov 2021 07:07:28 -0800 (PST) Received: from gnu-cfl-2.lan (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id D70DD1A0142 for ; Sun, 7 Nov 2021 07:07:27 -0800 (PST) To: libc-alpha@sourceware.org Subject: [PATCH 0/2] Update Makefile fragments for DSO sorting tests Date: Sun, 7 Nov 2021 07:07:25 -0800 Message-Id: <20211107150727.157003-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 X-Spam-Status: No, score=-3025.8 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" 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 tests 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 tests with "$(compile.c) $(OUTPUT_OPTION)". 2. Generate Makefile fragments for DSO sorting tests at configure time to avoid generate them in the elf directory during build. H.J. Lu (2): dso-ordering-test.py: Put all sources in one directory [BZ #28550] elf: Pre-generate Makefile fragments 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(-)