From patchwork Fri Aug 30 17:04:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 1979160 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=SmdkFJ2N; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WwPf70d37z1yfX for ; Sat, 31 Aug 2024 03:05:03 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0EA813861836 for ; Fri, 30 Aug 2024 17:05:01 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 24BDF3861827 for ; Fri, 30 Aug 2024 17:04:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 24BDF3861827 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=baylibre.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 24BDF3861827 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::62c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725037482; cv=none; b=PSWM/nMJSm7he7SBkjwlvJ0NQlOdM90nJFWfqPvc15l2Ohqk6rO50JyhyuVX3l6lLPOM5on8mZx2rLkzdeeg0R+5jaCEjgd9Nhh0wvew6LMQi3mhNkf7oRcFfiTLxgO3N4v+si+LUpxwmaync0Tbuh67VzNrpYPkLuNfAC/7dB0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725037482; c=relaxed/simple; bh=nLbGtbriJYRUZQvKl6av8r8Cw6PI/H2xTumwmf8P9jg=; h=DKIM-Signature:Message-ID:Date:MIME-Version:To:From:Subject; b=upMC8xMmOVchXW+mNVHBjnOPCO8uGIO9M7Pw4k2GbDgJJiV0CtLT5cbqUj3msdHcaMBm44SOnxIiEnFI3MVJBYdo3KwTrc+YN2J/PojDvqrDMPy7llg7LCkDnaw5hzADXkwXTciN8BhkdZQusOSfMsONLY/G6CvTsJoUJ5RMTFM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a7a843bef98so224248766b.2 for ; Fri, 30 Aug 2024 10:04:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1725037479; x=1725642279; darn=gcc.gnu.org; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=OR+UguNLmlvRN0NOaDXVu1mXudNVTqCEVvskmJvQqQU=; b=SmdkFJ2NmaTOBscpF6q4jcBvIyMNMY5cq4gkKHYkRexFjYTygFY9Q/VzwWCijFx10N xeCJwhXWoIvTkMdMZQqYJFPK3QDYQqihC2re302LTGLcgBukzS/p+yfv3zVNoLCkQMKC CQMKiG69hVH6O8ThUotZyVS0CPOGx1sZxPQTzxtlt4FIY2pjWUKj7zRJQI2UwULdJSCq KWNcscX/U+fHyAZm7Gw0pzh8TQ/L5Sk6tCRI3Nc52vROzUWVAXws/7HaD/51mv/ZjAuN 1nZf8K3v3hatSQx7J4I34+ALeq3oM1F4pEl91jlEq1npCL57na0kJPG/r1DIBLr0fmFb EyAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725037479; x=1725642279; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OR+UguNLmlvRN0NOaDXVu1mXudNVTqCEVvskmJvQqQU=; b=T+Ay9lrnS9FiqR0WjttfGMdbtCRBHEInn8qmH7+1926FrLnAiWvam8yKHkCOuPl4MI nuUNgJrS9QlX181z3t0sl8fLMl14pjqgabrqoAzcnfCCrnqsXJtyV+KrQbfauBwL/IG0 37KMPdqXHFIa9JpLYGzQ+AsCnOOiqHj6Dpz6YO1KPNkK6N/rv6eyeCfEmyjC7Q+DeFyl mwmikDaLwaPKRQBwkczP3+69ylzFV2RADs7VmqffiII16i/QkTLP+z31UvqGX+A15sdg +kf6dIn54Jts4awTe7Z9E+sAl60pX04oXq7ggyVIhp0J2usQDVbwA8bPJhxRdcy3i8D6 ddSA== X-Gm-Message-State: AOJu0Yyu4XBbjt8mGZPYAMGS7OehFVYFnxhTOcxKWjYz3yXr/k9wIxsM frmgCU7hFeQJ4Ro5SzrOK1j7TPDByGWiOdHgr1uEgRvRK/CQsn7dDYB+zh8Ac0963Puc8eteEFE S X-Google-Smtp-Source: AGHT+IF8aAAsHXP0ScjKHa+XNpQr+3h0G/XP2kwrx2FEedXl1tXc2oR2OjxwOqIVAiTe+z7LA+nWRw== X-Received: by 2002:a17:907:3202:b0:a86:90b8:9ac9 with SMTP id a640c23a62f3a-a897f91faefmr454676466b.39.1725037478526; Fri, 30 Aug 2024 10:04:38 -0700 (PDT) Received: from ?IPV6:2001:16b8:2608:1800:e596:48f1:2067:b50a? (200116b826081800e59648f12067b50a.dip.versatel-1u1.de. [2001:16b8:2608:1800:e596:48f1:2067:b50a]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8988feb25asm233346266b.41.2024.08.30.10.04.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Aug 2024 10:04:38 -0700 (PDT) Message-ID: Date: Fri, 30 Aug 2024 19:04:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: gcc-patches From: Tobias Burnus Subject: [patch] lto-wrapper: Honor -save-temps for ltrans' makefile X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, URI_NOVOWEL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Noticed that -save-tmp is ignored for parallel LTO. With this patch, the result is now: make -f ./a.ltrans.mk -j2 all [Leaving LTRANS ./a.ltrans.mk] instead of make -f /tmp/ccXgtcjJ.mk -j2 all [Leaving LTRANS /tmp/ccXgtcjJ.mk] OK for mainline? Tobias lto-wrapper: Honor -save-temps for ltrans' makefile gcc/ChangeLog: * lto-wrapper.cc (run_gcc): Honor -save-temps for makefile name. diff --git a/gcc/lto-wrapper.cc b/gcc/lto-wrapper.cc index 6bfc96590a5..c07765b37a2 100644 --- a/gcc/lto-wrapper.cc +++ b/gcc/lto-wrapper.cc @@ -1994,7 +1994,10 @@ cont: if (parallel) { - makefile = make_temp_file (".mk"); + if (save_temps) + makefile = concat (dumppfx, "ltrans.mk", NULL); + else + makefile = make_temp_file (".mk"); mstream = fopen (makefile, "w"); qsort (ltrans_priorities, nr, sizeof (int) * 2, cmp_priority); }