From patchwork Mon Jul 19 20:52:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: twd2 X-Patchwork-Id: 12386775 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.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 E60E2C07E9D for ; Mon, 19 Jul 2021 20:53:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B4D856113A for ; Mon, 19 Jul 2021 20:53:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4D856113A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=FbIaeNx43kOhiuNb0OeBHLh909Ej+PL91bvQne3J+jc=; b=CgyAMnRHIY1S3h Y4BKD0dUu4LCjzjt80+nwD3/nvtLPE5Z/a5U6hC4RRh+PhM6vDUgiMDmbSGpFEqATOgYH1KB2S+cf uAIHxpdZsPLAiLP7eBvpYf+w47bZU276Myda3KczPezaJ373U9k9IYDD6T3NRD9dQWrvMIFrxluH4 DBcQv1FAqaFatqrpuch1AwxLgmIfIrhmKGd3o7MYAGHS5n6GuV7VPjsCkRVdOSHgz6t4PvHEdMQcp DV3CA+Fc3a99dMwcISeHormAnFJ5/FtUJ0LSHdr04GpxN4ruibZh7aCwCXWcEbTObQ99JFUsH3wDV 0lAsfkQxNbrdA+XEFw0A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5aGA-00BJT5-Vx; Mon, 19 Jul 2021 20:53:07 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5aG8-00BJRi-Dt for linux-riscv@lists.infradead.org; Mon, 19 Jul 2021 20:53:05 +0000 Received: by mail-pg1-x529.google.com with SMTP id y4so20375658pgl.10 for ; Mon, 19 Jul 2021 13:53:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8A1iXDeLNYYrVR0I32gx+QMWguxvpqwemwOUepfzw5s=; b=HYSrMR9Zep+UMiSH3YqYBlB9E8jy2LFQ9eB1q/SWNvL0VO0h33LzpgkcJNkE3WSG4L Aqos5F4Y1uQzUE8Oi/qyn4QyAPagI4SI96sqgq3pybuDUq1xXP1Ts+gVd2kfqr6Kl64E 0Aja/nD/1QSyEA3W/p7Z30E5bZEptaAhmSUC7/xsVOL6Zi7kNpOD4qbdTHRCBuwt7kCN XyXgY+CF7KzZBsbUrbfleSiJ/FVw01I9UnFtvmBxwTkLJXOPDOJfUhV27QolN7gg1cjC 7TC/QncHcXX6fQsqGii9rLUHvhNZF30jkz9lTbkcgMZre5UHuAeqZrFk+VSqQw90/Y6O ZTvQ== 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:mime-version :content-transfer-encoding; bh=8A1iXDeLNYYrVR0I32gx+QMWguxvpqwemwOUepfzw5s=; b=EZM2Gl6HLX7OWZKJ4iBMkfUQsEwq5mKM/A6eMCC2a2smCkniwQ/wFNglTPXBtOhJkp 5UzgH3vxjEj0bXcDM6G5L1VkH/aYJJIBd0P7HYWNqQwZk6tH3rFUaMTnia2dX866un9a cpR5Q/lgeMfUYzOy4gmkc66Hvg9/ahPu/jNdsCVmtPlvJJnlrGzkWn5YDW+JexgRRz4J vsccJuS6utKW8UUCp9JCRnKOCFXvrCmFWUXzvgIlgTgATpIjK4SZCcY8BRcQzuvMpEWj Bja4BMb9EqFbB5+uTOUSbN2rrk1bS4mKQQAQhJhlhcvGrgcr4lZ2Zy3SjOAWtZDaSDXp Yr9Q== X-Gm-Message-State: AOAM530QLSIUcnHwZQWfG0pkNI8lp4ymS+WLPDH6rx0mvvTLm6tUlMki kuBY4MY1/ZMDwrL68betkNUCyLmeMcGSjHUb X-Google-Smtp-Source: ABdhPJwe4Oi1OwTIQCaKihtJYps+hyJEuEcvsx3p+EGK4Yxwjizv+fjP/bF9k+SqvOgAZv261yY/xg== X-Received: by 2002:a65:6243:: with SMTP id q3mr27333523pgv.297.1626727983495; Mon, 19 Jul 2021 13:53:03 -0700 (PDT) Received: from localhost.localdomain ([2604:a880:1:20::1f:7001]) by smtp.gmail.com with ESMTPSA id b19sm5621281pfo.97.2021.07.19.13.53.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jul 2021 13:53:03 -0700 (PDT) From: Wende Tan To: palmer@dabbelt.com, paul.walmsley@sifive.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org Cc: Wende Tan , clang-built-linux@googlegroups.com Subject: [PATCH 1/3] RISC-V: build: Pass `-mattr` to `lld` Date: Mon, 19 Jul 2021 20:52:47 +0000 Message-Id: <20210719205247.1023289-1-twd2.me@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210719_135304_506634_A96DF1F4 X-CRM114-Status: UNSURE ( 7.25 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Pass `-mattr` to `lld` so that it can generate proper machine code. By the way, it seems that `-march` does not work well now. Signed-off-by: Wende Tan --- arch/riscv/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index bc74afdbf31e..bbc186a3ab45 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -52,9 +52,16 @@ riscv-march-$(CONFIG_ARCH_RV32I) := rv32ima riscv-march-$(CONFIG_ARCH_RV64I) := rv64ima riscv-march-$(CONFIG_FPU) := $(riscv-march-y)fd riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c +riscv-mattr-y := +m,+a +riscv-mattr-$(CONFIG_FPU) := $(riscv-mattr-y),+f,+d +riscv-mattr-$(CONFIG_RISCV_ISA_C) := $(riscv-mattr-y),+c KBUILD_CFLAGS += -march=$(subst fd,,$(riscv-march-y)) KBUILD_AFLAGS += -march=$(riscv-march-y) +ifeq ($(CONFIG_LD_IS_LLD),y) + KBUILD_LDFLAGS += -mllvm -mattr=$(riscv-mattr-y) +endif + KBUILD_CFLAGS += -mno-save-restore KBUILD_CFLAGS += -DCONFIG_PAGE_OFFSET=$(CONFIG_PAGE_OFFSET) From patchwork Mon Jul 19 20:53:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: twd2 X-Patchwork-Id: 12386777 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.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 84725C07E95 for ; Mon, 19 Jul 2021 20:53:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4175D6113A for ; Mon, 19 Jul 2021 20:53:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4175D6113A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=vKxBfAdWKbbuf7ERZDZ9fgnpN+r3haj7oHSfyv1zfj8=; b=A28AYNNarsuylz Ogqx8Ri7YDs3zAcT0h2IG6ENe3hijxE4lMGvGOsnIvh+1b32VAyART9/ZFDzQU6bDvea75Jii/VuR j+AgezQo8azmrwfeetrirXwlUfOjseJmZycILj/waEineIg05fQSyGFECGpJLYKXtX1onFo/7crfE ITE0u/DYf4FNBAepQ5Zy/LyNWF1h4iKWpbmuKUiNW136Wpn1XGk9fTymEvkUjOAhGqsX+r1+f7CkI E4rctjEgDq6b6LZnii1Gj/GPULwECvgtxgz2K+PkSsMvUCbq9aj5xyTOozsc9b5Gl0Os40vvq9kQV zp9ywuB/uUr8BVQOfM+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5aGV-00BJgK-4n; Mon, 19 Jul 2021 20:53:27 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5aGR-00BJcr-6U for linux-riscv@lists.infradead.org; Mon, 19 Jul 2021 20:53:24 +0000 Received: by mail-pj1-x1030.google.com with SMTP id my10so12261841pjb.1 for ; Mon, 19 Jul 2021 13:53:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pdqaR+G8inJJm/OX6ujTKrMpRjVqLINMc/k8jQGEix0=; b=eDmv9ctXDxXSrY2Oqv6drB7LXdpOSNPaRHDXpAXZIb9rhxo1Zzl2h3zL2LB9P7LwPG 36XKn4vTgG935gp7NdzPERMzZ0e1DiHen+2SZ5xuOB6qCxd0/HsYzOteWPEnntX5v8vg Y4wAfqYBgagR/MjSrlICAbiSytOCYmswDL07xgVlzTHNXitwNW5edpYfuOIaI3j6Wd8m 9WAuua7qmpETo09Y/E9r8Qiz8RSH9bjU7xFva/F6WvwSl1getDRtkiv7XUMK1kIKr2on xilMDbBHlV4+uYoEXsE7KNmy/wIsNEL5gS4V0jXI/Ku5+dgEPVoN57nz8jB98aqqXHmS TskA== 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:mime-version :content-transfer-encoding; bh=pdqaR+G8inJJm/OX6ujTKrMpRjVqLINMc/k8jQGEix0=; b=iJC0+u9Z6FzpBEzurnWzO9mKilDQS3ca5jZk0ELZDPJ+TXobvFJUVLeyWM//b/0FFc 17m9yych1y+z5S7QqUCnLt+Dk0dIAqjTULFiyzE5SwF+lhTfWYptDSsDSwBQNH9l2MFs HlZ0NMA4Avk8fs97YBvgbcVR+TeXwNw+90OZoIctbjXI1jnrjNYjXg0em3YFS/PFy1mr IIN08poKRqAxxFsm3BkBCh/iYMKpPUfF3st9XSwNxzYZBnNG7z2JXPYwEAXBVz+kx98I jgSwzQEB/y6BELBftWTaefuTWq6gADwakku5V06pa1YbNUGPv2pLIZ1CQxz9Dedmbaxw vPFA== X-Gm-Message-State: AOAM533DuGcKALHQTXWZDW5orZDnWY8h0dtSg0slbHj9LBcItlkE9ZR7 gt1X6JvFeGrfx89lJKeS7KY= X-Google-Smtp-Source: ABdhPJzj/Q2EwqgKkf0HuOe2e+BRJlJZStx/NWpsmeWOUcl1imL8VPO4FfRM3IVnUX32jYjIy17C3A== X-Received: by 2002:a17:902:9004:b029:f0:b40d:38d with SMTP id a4-20020a1709029004b02900f0b40d038dmr20829840plp.85.1626728002167; Mon, 19 Jul 2021 13:53:22 -0700 (PDT) Received: from localhost.localdomain ([2604:a880:1:20::1f:7001]) by smtp.gmail.com with ESMTPSA id r15sm23940924pgk.72.2021.07.19.13.53.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jul 2021 13:53:21 -0700 (PDT) From: Wende Tan To: palmer@dabbelt.com, paul.walmsley@sifive.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org Cc: Wende Tan , clang-built-linux@googlegroups.com Subject: [PATCH 2/3] RISC-V: build: Disable LTO for the vDSO Date: Mon, 19 Jul 2021 20:53:14 +0000 Message-Id: <20210719205314.1023455-1-twd2.me@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210719_135323_287463_F07E398A X-CRM114-Status: UNSURE ( 9.72 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Disable LTO for the vDSO as done for x86 [1] and arm64 [2]. This also disables CFI for it [3]. [1] https://patchwork.kernel.org/project/linux-kbuild/patch/20201009161338.657380-28-samitolvanen@google.com/ [2] https://patchwork.kernel.org/project/kernel-hardening/patch/20201211184633.3213045-15-samitolvanen@google.com/ [3] https://lore.kernel.org/bpf/CABCJKucpFHC-9rvT7uNF+E-Jh20fz69zdO49_4p8G_Sb634qmw@mail.gmail.com/ Signed-off-by: Wende Tan --- arch/riscv/kernel/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile index 24d936c147cd..4535a77792be 100644 --- a/arch/riscv/kernel/vdso/Makefile +++ b/arch/riscv/kernel/vdso/Makefile @@ -30,7 +30,7 @@ obj-y += vdso.o vdso-syms.o CPPFLAGS_vdso.lds += -P -C -U$(ARCH) # Disable -pg to prevent insert call site -CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os +CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_LTO) # Disable profiling and instrumentation for VDSO code GCOV_PROFILE := n From patchwork Mon Jul 19 20:53:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: twd2 X-Patchwork-Id: 12386779 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.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 33F97C07E9B for ; Mon, 19 Jul 2021 20:54:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DFECB60FE7 for ; Mon, 19 Jul 2021 20:54:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DFECB60FE7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=sXoGAsvnrBmwpx3X2FpN/HPX2783mMkdx5mHy47VLJo=; b=TlT2bhoIY53PjY Ouy2fhvlQG20i71jIg0bsdve+v8oaZMCU1C9V2FQ4Xt2nrB4bMc4xpH46mdid7p/dX9VJG4fpM+DW Ll6ljUKmJyNycMgQ3nDF3wZ1YsJLkLxjhVtwSKaiEjG5wXH4fb0+1OTFvgUSEVD8U5IZKuRuMqJ7b 0SpZW82n1I+PvqmeDfn21ik+G/ozvVp/AJy0+Evh9swgw2Msbu9vLN1J7tTKxAasrNcTNFpNYvam3 CD5JZDwe083iFR1wk9CnE4xv9HIB/XwsSfEbDfSSf0ktbKS9S6Zpv4MMwr9UZRnU2Pg1VoyqNY8CT T5uWtYX+U0qE1lXObA1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5aH9-00BK6t-7o; Mon, 19 Jul 2021 20:54:07 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5aGm-00BJtP-WA for linux-riscv@lists.infradead.org; Mon, 19 Jul 2021 20:53:49 +0000 Received: by mail-pl1-x62b.google.com with SMTP id j3so10293329plx.7 for ; Mon, 19 Jul 2021 13:53:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=To1VQqsP4sYw5X8oyJk6rrmdug4zweFow7cNnsopET8=; b=lNhr3LLsTXM94akRp7828XzwiOuQP2milj8pr2RBpTxaUvyzeufKtaQ/h9x0p86sdN pInK5Dm4srswz8AdqpSbpE9Lw2qXDCRUiohBhEwasrrKcH91kJwqs9cTDr9cJMd0rx7y uNw3hkOgcXQf0jv7NbyMqiOC07gGytUdKu7f89pA7DBdfd4HfWoqFy1oFQQDEy2nO4O/ tewVEVrU64igwQ8mHRlmS6R6EUVJvUG0RxCG4ZCBi0JwTJH6thjIzZ1kHauYwMzGqu6Q CRKhbqRoIIwQPXIhn6CK2dQRI12jugEXmxijM1oDlRMkaS9t7lDSA3KQvwu2m9yOTX1X Htmw== 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:mime-version :content-transfer-encoding; bh=To1VQqsP4sYw5X8oyJk6rrmdug4zweFow7cNnsopET8=; b=WW3TTQQqgCUgJxZx2GBebO/0aM/hPuu8Fk8+tOsXC/IGly0BbFdv4/+KpDzzKIOJjQ B6ST470sxC/O9n4fjfghALT3FfGUHIQohVm2SL/Ox1cxxlzQrBam3bGiSXvwiSWAf/1e +OyyQcMZgBt3ucnQbyhIKZhZ9yCVanwwv4j/M4DGXmLmCnL/rqM+28DmD+KjoQGPSX0L XE31p4nwDGhkA6KFazZYSgVsLVG/lMQp1OGocP23Lyiv3wJ6KOeQHvnfil2uO5rg72XM dQWtg2Y42xtPoRV1CHVny8UTl+fIjJYa2b0FAJuHhFNvKq0Z9uZtSdPce+uZJIfHP5jZ WETA== X-Gm-Message-State: AOAM532k8Pp0GsPsSRVe9u0L//leKH05Ufks9ssdT55wj13P3Lah3mmR StTPSbpEKNkd6EoDqJPmnPM= X-Google-Smtp-Source: ABdhPJxRMPZhp2P72BQeVsPGUhsFeDBZVSS9XpUyU0dz4JLNXJzYQCGypGRLuzOVdjcnLtDvENw4SQ== X-Received: by 2002:a17:90a:8c93:: with SMTP id b19mr13591410pjo.107.1626728022956; Mon, 19 Jul 2021 13:53:42 -0700 (PDT) Received: from localhost.localdomain ([2604:a880:1:20::1f:7001]) by smtp.gmail.com with ESMTPSA id x3sm397267pjq.6.2021.07.19.13.53.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jul 2021 13:53:42 -0700 (PDT) From: Wende Tan To: palmer@dabbelt.com, paul.walmsley@sifive.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org Cc: Wende Tan , clang-built-linux@googlegroups.com Subject: [PATCH 3/3] RISC-V: build: Allow LTO to be selected Date: Mon, 19 Jul 2021 20:53:39 +0000 Message-Id: <20210719205339.1023572-1-twd2.me@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210719_135345_086375_33D2122E X-CRM114-Status: UNSURE ( 7.60 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Signed-off-by: Wende Tan --- arch/riscv/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 8fcceb8eda07..b593e5031c79 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -34,6 +34,8 @@ config RISCV select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT select ARCH_SUPPORTS_HUGETLBFS if MMU + select ARCH_SUPPORTS_LTO_CLANG + select ARCH_SUPPORTS_LTO_CLANG_THIN select ARCH_USE_MEMTEST select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU select ARCH_WANT_FRAME_POINTERS