Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3744056rdh; Fri, 29 Sep 2023 00:42:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFdOEJ0ykIa3EppY6L9RDXNkvfFD34yMyVvZBZ8y7Uzl64elM0UgQJ6QHzhmp7ykIPZ1Gze X-Received: by 2002:a05:6870:610f:b0:1dc:9a68:31b2 with SMTP id s15-20020a056870610f00b001dc9a6831b2mr3535478oae.23.1695973335519; Fri, 29 Sep 2023 00:42:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695973335; cv=none; d=google.com; s=arc-20160816; b=GZ7WH+tZR7FYxx6eJKY35B7UUKx91Y8vUeTkQ/Ydq3opVRv4c65bapDHdr+RXgmfcD 16WdQiKHDv8DJKU/vZxnlB5Bk6pWRKgxD+sXzU0FDxqG+Pre6cfgiSng6VGHDNUsAULr pklMzD2QisXUb6zYQvmI6vAQurBbXrR9kh21XNScRWFxqGwLvKER5a7T6w/gsndbmmlT Fc1F20grFSomx50ATkQB0y6umMzciS3N/mtrbZS74UO0xLMSCFS9bHsYabUODZ2ZweX6 KwuG+NqKiADtea8O8i/1fWbJbD5v2b62INlWWrdPYVn99mNFRoYa12yD3joW2tLJ6nMQ rsTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=qIlKEJnw0fFoB8aDGwN3C/vOYWFmYPRhpPxSRX2qmyg=; fh=5dNnKGTiLBHztCAKMNu5PNqZXFUKCw5A6x9E8x7kdJA=; b=xo+jyR6zPTdr2x9BNow1notUXrHMT0g7axHPlkyQoa5eueUsCRHXZHVM+iwJqkqRnA m2l3mqd+YesoYe4gkNRXi337OZJB4axcePmwjqmoqibnq3zzZHO/iixctEIbz4a5m0ay 9CXGBIdEP84DrPJxdfwzuLNlr2OzN1igJfJWEllyUWGua0bw5Dqc6W7vcACRKlOlfI1+ Lsq9bv7prS2wsGjK3s/9YrwaP7btGS9zw8ilUEggOF47ANsDXRnRUypC5RuJohoajxez at6gzxMZnQh1oe4n8HzaKDLZqL5po6NF9aYHjVzBk4wyz9Jq6/jsorP1FQ7U4en/s0Y5 OlgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="mrVe/8GS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id g190-20020a636bc7000000b00578e4bff431si20702651pgc.420.2023.09.29.00.42.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 00:42:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="mrVe/8GS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 3F97B810CAA1; Thu, 28 Sep 2023 14:07:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232326AbjI1VHg (ORCPT + 99 others); Thu, 28 Sep 2023 17:07:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230325AbjI1VHf (ORCPT ); Thu, 28 Sep 2023 17:07:35 -0400 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42E84B7; Thu, 28 Sep 2023 14:07:34 -0700 (PDT) Received: by mail-oi1-x234.google.com with SMTP id 5614622812f47-3ae0135c4deso7715463b6e.3; Thu, 28 Sep 2023 14:07:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695935253; x=1696540053; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=qIlKEJnw0fFoB8aDGwN3C/vOYWFmYPRhpPxSRX2qmyg=; b=mrVe/8GS0+AGXo7bS4iO83gLxZFHgUceu6SGPlv3+TYdxLtcJXgmgG0hZFRVqgWuei hFwj86nOxFyI1Ce21kFa24SHoHXrWyaOFn6xPYN+sewkxjeNUT4PV02UZFw1Wy2IlBGd JaS2nElVhJA48t1IaMyfm7pIe+Flvp1v9XIXb/KBPDeCx1iQet8SdndPfGPiiF+x2KpF 2iI6k49ZpJYMsnKpllK5ijZBruXPzByyk9XLCFFn2B3T+Mf/GKRDHmykBQshUpEnYZLi 3l7Rb9RBATxyKkFkVLUz3zJBnwtnLE6op9TpaT2PSotsKIHYLBP8wexJNmaZbqxizUU0 B0uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695935253; x=1696540053; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qIlKEJnw0fFoB8aDGwN3C/vOYWFmYPRhpPxSRX2qmyg=; b=hhEZ8z5tqEsdc1hVOQk1NqoRiHvuh/uP+3wj0TKJFMVtGhstYWXOuVq5D0d6vpdeb/ v8UycFjVAsJq0MOdpqeXHoNEiKK1gF71m3B1gyuOcYwlhCD9l4WwlLHFbqFbJ+MOPOus icCz01mGKPkCn9BT0rqq6NIi8Of6lJz9mtXms8PN8F50gbC28plFKUytGhioy+5ZILvK FE/f+4pL2/nZdeDFyU8lwgDDK1ZNOmwYBh/tgnZkTlA4zZBqsZya8C8wgB+1LUdeqm8v lv2KJnKKE4uhc8QB17E9VhMfuJ9/cCN/xuDvNU0ZSHNLH/CEKBhoqkf70tikqUuDuVTk b+eA== X-Gm-Message-State: AOJu0Yz4RVEsrIo7Py1WVzo+punqVDobK+FmKCsH8mscb85n4RVLLxYs QcZ6jW64m76ICFl3r5tgITs= X-Received: by 2002:a05:6808:1450:b0:3a7:5309:f1f with SMTP id x16-20020a056808145000b003a753090f1fmr2846373oiv.45.1695935253446; Thu, 28 Sep 2023 14:07:33 -0700 (PDT) Received: from [192.168.54.90] (static.220.238.itcsa.net. [190.15.220.238]) by smtp.gmail.com with ESMTPSA id k12-20020aa7820c000000b0068fda1db80bsm13766692pfi.75.2023.09.28.14.07.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Sep 2023 14:07:32 -0700 (PDT) Message-ID: <91c25e18-ff97-46a2-a50a-493c00bbc156@gmail.com> Date: Thu, 28 Sep 2023 18:02:59 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] rust: Respect HOSTCC when linking for host To: Matthew Maurer , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers Cc: Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Nicolas Schier , Tom Rix , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev References: <20230928194801.2278999-1-mmaurer@google.com> Content-Language: en-US From: Martin Rodriguez Reboredo In-Reply-To: <20230928194801.2278999-1-mmaurer@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 28 Sep 2023 14:07:54 -0700 (PDT) On 9/28/23 16:48, Matthew Maurer wrote: > Currently, rustc defaults to invoking `cc`, even if `HOSTCC` is defined, > resulting in build failures in hermetic environments where `cc` does not > exist. This includes both hostprogs and proc-macros. > > Since we are setting the linker to `HOSTCC`, we set the linker flavor to > `gcc` explicitly. The linker-flavor selects both which linker to search > for if the linker is unset, and which kind of linker flags to pass. > Without this flag, `rustc` would attempt to determine which flags to > pass based on the name of the binary passed as `HOSTCC`. `gcc` is the > name of the linker-flavor used by `rustc` for all C compilers, including > both `gcc` and `clang`. > > Signed-off-by: Matthew Maurer > --- Psst, next time I'd recommend putting patch version to version changes here. Still, LGTM. > [...] Reviewed-by: Martin Rodriguez Reboredo