From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5AD2C433DB for ; Tue, 22 Dec 2020 21:44:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5E4F022AAE for ; Tue, 22 Dec 2020 21:44:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728048AbgLVVoI (ORCPT ); Tue, 22 Dec 2020 16:44:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726534AbgLVVoH (ORCPT ); Tue, 22 Dec 2020 16:44:07 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFE72C0613D3 for ; Tue, 22 Dec 2020 13:43:27 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id r4so8075565pls.11 for ; Tue, 22 Dec 2020 13:43:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=V18RJFVoSD2HfPTrMybJhWRx+16Y//JP10XUyAiF9C0=; b=MoFoz97ipfgL0tskYxv3eUZrXs1Gtf4S6AIT48y4RoUx4gTy/pyHeDU0ASRe4+CTGV 6EQPpsfEG8ojet/F+BqJP7osfq2axER1b9OdQ5I7dbdF8eIZ5zNdTK9moJab2eBpN90w Vqz2Kherc3CmoKwR9ICk4/+1KBetvtuXSFh+kNpzebgvZW1e10DodKAND41hjcHoL7O1 aPBdL2Cp6KXghjcUF5GrxhFp4g+00u7vCveST0JC+7XDzWJjhpp47uHFhFbzr8/ZqfKw O4BIlbC80rAzXV+Cw98wRd4KHOlJJ73+yFwfcfXmpcLWmwDJ8GtjtZWcE5k59g3GypE5 qpPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=V18RJFVoSD2HfPTrMybJhWRx+16Y//JP10XUyAiF9C0=; b=WAwTlepQBeY9pOIpu3CII6wHjluuKHN+ISVcMDarT5f2LhD2op804qOVTQDCBrNTe6 /4jfjco2GjcQTpbzoFid1C0BK0zIMzllmL9KhcXxdigf/zjYHvPThzVa0oMbA4uAkqal gl/PFJLpXKm1rZMQsKv9uwQ3bPqq6yiM63ItgzXphgHTGFxM48bumDEGkXuzF7yqAKLe f1dinLa5Abt+S2BylB95MzpTXJp13OEpz2Ligs5XvFD4Nv5H1G4ntpzgJhudWF92xcmL SwRwR9MRwxbHCZ7nBW0o1wZcKGpKqooVYpt9fpvb8Ny9b6H3CvSoXgRsrPatD++KveDJ WvJQ== X-Gm-Message-State: AOAM531K845FNSkld6yFveq9zr+HdhsOgH57tVLL8IECMVOGqAq5ifuT ssPtT4R0WbdBMsN85nS+nl3kXA== X-Google-Smtp-Source: ABdhPJynPZBPU88MgcEl5WcwU0cdYjZC20/3FRJRStClymFa4iKtg9+XkPvnpAcMdwtKD+bNajR6Jw== X-Received: by 2002:a17:90a:fc83:: with SMTP id ci3mr24052182pjb.145.1608673407151; Tue, 22 Dec 2020 13:43:27 -0800 (PST) Received: from google.com ([2620:15c:2ce:0:a6ae:11ff:fe11:4abb]) by smtp.gmail.com with ESMTPSA id s29sm22665086pgn.65.2020.12.22.13.43.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Dec 2020 13:43:26 -0800 (PST) Date: Tue, 22 Dec 2020 13:43:23 -0800 From: Fangrui Song To: Nick Desaulniers Cc: Guo Ren , linux-csky@vger.kernel.org, clang-built-linux , Arnd Bergmann , LKML Subject: Re: building csky with CC=clang Message-ID: <20201222214323.655tjdqdvxhw3722@google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-12-22, 'Nick Desaulniers' via Clang Built Linux wrote: >Hello! >I was playing with some of LLVM's experimental backends (m68k) and saw >there was a CSKY backend. I rebuilt LLVM to support CSKY, but I ran >into trouble building the kernel before even getting to the compiler >invocation: > >$ ARCH=csky CROSS_COMPILE=csky-linux-gnu- make CC=clang -j71 defconfig >... >scripts/Kconfig.include:40: linker 'csky-linux-gnu-ld' not found > >My distro doesn't package binutils-csky-linux-gnu, is there >documentation on how to build the kernel targeting CSKY, starting with >building GNU binutils configured with CSKY emulation? Note also that the llvm/lib/Target/CSKY has not been fully upstreamed yet. It is a WIP https://lists.llvm.org/pipermail/llvm-dev/2020-August/144481.html I will not expect clang csky to work currently. (The latest committed LLVM patch is https://reviews.llvm.org/D93372 Normally committing an important piece of a large patch series like this should take a bit longer time longer after someone in the community accepted it https://llvm.org/docs/CodeReview.html#can-code-be-reviewed-after-it-is-committed ) I do want to raise the recent LLVM M68k target. Its patches ([M67k] (Patch */8)) are very organized and the main proposer shares updates to llvm-dev regularly. There is a lot from the process where the C-SKY target can learn from.