From patchwork Thu Jul 9 14:13:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 235154 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp1456534ilg; Thu, 9 Jul 2020 07:18:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDTnhV3U4JUZBltikNOHzFX7Fydtz/Yq1rKFiU+g5I1ZCS6g3tLQZEVnIYqYIjvc1ED70F X-Received: by 2002:a25:cfd2:: with SMTP id f201mr18281963ybg.286.1594304326731; Thu, 09 Jul 2020 07:18:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594304326; cv=none; d=google.com; s=arc-20160816; b=v91Rv9tm+Pc6z+ixhB2vde3dwONnvS4IPwQAyzDxOosuGbRgioPsKdWM44umCv5zfd F82pGLRDkwbh5AnsLfsrAQTGnZQgtx09DsGpwRDazMHGj+5Sx0aSp8/EMPeCTHAF74kY NxhP4yAjVyeRGuYe2wpgDdxOlqt+RJeV+KgtvhGzTh84Cfo02cKPnd/w0PWNxVV0Pv1f YywottVANOF6lEVn8qggsrjsgO4xYsgTAhE+YCFTUNtX2hFaLNUaLXmqgTqobXWNvd6h 9GMXfqNCa8b12WwLxbSsCJ9JsUZJShi7yNdxP85cQPkd/zxGFPO8qSIQCYXWmXI3qjfq Gksg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=6oUsKppsQSQ9dDcWGFfn/h24xQJ4dIbnKOSlIto0GoA=; b=dijfpaH7FXa0ESk26qcdnjeE3D3HufgNU6GHj2pVw0hOtO4ZJ6WV9I5u+J5zLH2DeZ tJAdGovkVrKt3V6qoZxTjz3NFU4hMhsMRC5tOWZuuRzpNXENNcfrpu+FW8Cn3MWAkZgF j4QWOW2p6q+XPTq7AS57wggAQ7QGR5MsyXnrdlTjYx5PKwmDgqKsNnvpeyiDrjmoyNF1 vEEdD0Yjjjm4Fnih4+zf5Z9MDjGXmThF0+5UlR6DvjBXhKyoTPkr+cpyfVsB1rz5waql 15+qNGSMUyWwDkCdAm265kkXKAit3MWmEh2x8VEoVDRa52Wm1lBQ3JJZfHup1loEXzen 1mgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=kMTwBEDN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n6si2991869ybn.213.2020.07.09.07.18.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Jul 2020 07:18:46 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=kMTwBEDN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtXNu-0007a8-5P for patch@linaro.org; Thu, 09 Jul 2020 10:18:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtXJ7-0000b3-Iy for qemu-devel@nongnu.org; Thu, 09 Jul 2020 10:13:49 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:42832) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jtXJ4-0001M2-Rj for qemu-devel@nongnu.org; Thu, 09 Jul 2020 10:13:49 -0400 Received: by mail-wr1-x441.google.com with SMTP id o11so2546845wrv.9 for ; Thu, 09 Jul 2020 07:13:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6oUsKppsQSQ9dDcWGFfn/h24xQJ4dIbnKOSlIto0GoA=; b=kMTwBEDNnNx8igNKTQwFi4OlDltpw0xtCqrvORcvBDvWTL4k4eLfqpMDdVZDnjJy9X u0ePj2buNN/3uRT5QZXRg1nlHDKcKNQdN7z2pLnBiMpcoIXzy0TLRHXsQMFVWxAynA8O QKKUT8MXP9ajSas+4ggQhxwSyUQHq0cBYvw6hZFzFkVDd+BiJPRTswGFj9TLvstQi1x/ dWKF34T2JSXjZXzoibJgH4oxC+u32zcxq/1yj7WMPGFVfPt8nwASJ5EZqjgnqfxZ290/ m6LRRICRWRHu+C+3CcDz1dy4ErDiqFr0GY6IwnJMBj9T1EhtJqup1iIFHShmD1eTXkIw +SHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6oUsKppsQSQ9dDcWGFfn/h24xQJ4dIbnKOSlIto0GoA=; b=ONVPz7DiGx8zdMjyBIC2VMDW5ve3oLR0+cxjWgPpBUirddvsiDSKEVWmFBDfq3hYW0 Np1T2x85C1YLkqnDgsmXk/Ge6lmPMkQgVDXAThq1GfnCeW/WZMqhgwOg5K9CvFO3GnYU bj0guCm2P+0UW8W2LHk2iOZxqlWXaHCt89Vv5yam/fFHk8kX+CWVqvI0yz4AjUJFeB/9 Vv1O1Evu5Fy29rpsPt1xfIuMvPwDphBYfFFcI1jbPRocs11Zwt2+F0bZn41NExTGpZGT GYXhD4WbC73dvKeefBJr6U4VZx1ij2lMYamlwyLMoILfa1BMy3qC5RbubUP95p4BZsFK Stlw== X-Gm-Message-State: AOAM531HbnfKJ0YVPhra0orDhWiSRYS7z6RN81BjYSIJ+0Ip0gRRefxz Glu1OozmpH4NCZezgBT/pLw5Gg== X-Received: by 2002:adf:f388:: with SMTP id m8mr66146649wro.338.1594304025439; Thu, 09 Jul 2020 07:13:45 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 51sm6158514wrc.44.2020.07.09.07.13.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2020 07:13:44 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9C9F91FF9C; Thu, 9 Jul 2020 15:13:28 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 13/13] configure: remove all dependencies on a (re)configure Date: Thu, 9 Jul 2020 15:13:27 +0100 Message-Id: <20200709141327.14631-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200709141327.14631-1-alex.bennee@linaro.org> References: <20200709141327.14631-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, robert.foley@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The previous code was brittle and missed cases such as the mipn32 variants which for some reason has the 64 bit syscalls. This leads to a number of binary targets having deps lines like: all.clang-sanitizer/mipsn32el-linux-user/linux-user/signal.d 140: /home/alex/lsrc/qemu.git/linux-user/mips64/syscall_nr.h \ 455:/home/alex/lsrc/qemu.git/linux-user/mips64/syscall_nr.h: all.clang-sanitizer/mipsn32el-linux-user/linux-user/syscall.d 146: /home/alex/lsrc/qemu.git/linux-user/mips64/syscall_nr.h \ 485:/home/alex/lsrc/qemu.git/linux-user/mips64/syscall_nr.h: which in turn would trigger the re-generation of syscall_nr.h in the source tree (thanks to generic %/syscall_nr.h rules). The previous code attempts to clean it out but misses edge cases but fails. After spending a day trying to understand how this was happening I'm unconvinced that there are not other such breakages possible with this "caching". As we add more auto-generated code to the build it is likely to trip up again. Apply a hammer to the problem. Fixes: 91e5998f18 (which fixes 5f29856b852d and 4d6a835dea47) Signed-off-by: Alex Bennée --- configure | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) -- 2.20.1 diff --git a/configure b/configure index 1e977601a47a..3c404f31f4f4 100755 --- a/configure +++ b/configure @@ -1955,23 +1955,20 @@ EOF exit 0 fi -# Remove old dependency files to make sure that they get properly regenerated -rm -f */config-devices.mak.d - # Remove syscall_nr.h to be sure they will be regenerated in the build # directory, not in the source directory for arch in alpha hppa m68k xtensa sh4 microblaze arm ppc s390x sparc sparc64 \ i386 x86_64 mips mips64 ; do # remove the file if it has been generated in the source directory rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" - # remove the dependency files - for target in ${arch}*-linux-user ; do - test -d "${target}" && find "${target}" -type f -name "*.d" \ - -exec grep -q "${source_path}/linux-user/${arch}/syscall_nr.h" {} \; \ - -print | while read file ; do rm "${file}" "${file%.d}.o" ; done - done done +# Clean out all old dependency files. As more files are generated we +# run the risk of old dependencies triggering generation in the wrong +# places. Previous brittle attempts to be surgical tend to miss edge +# cases leading to wasted time and much confusion. +find -type f -name "*.d" -exec rm -f {} \; + if test -z "$python" then error_exit "Python not found. Use --python=/path/to/python"