Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3189408pxu; Tue, 8 Dec 2020 05:59:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxY3Rxn3U1rVTyLlXWDU4wL3XK4bmAhSy8v9ghnJQOuu1DW1rSH73KBy8LFggO9phSJvyp4 X-Received: by 2002:a17:906:8693:: with SMTP id g19mr24422888ejx.111.1607435965069; Tue, 08 Dec 2020 05:59:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607435965; cv=none; d=google.com; s=arc-20160816; b=1DGuoPHf4MNM4AAj3taFQF20+nyjyFtw0e1F5wscfN2uUNMKWYY+x5optW8ArFUQtP qYiC82j2RMwT4kEp/Ce+FKA+leezGUSCh5GVoY/j3gy0cimPd5gZwuGX+VAY3h1B+unV wyNBW5ufCOJLW2qkEeHh794bUSTFKP5VbC1hjJP/uzb6qrlC22x6qkbV4KZh5cDDa+08 vPapV0tDArq94qc2TzDT9ok4qNQ3kAbscd08HYnqKRUDpmercHgmpzc2YbFs5jmj/fnM 7qrGkDI37CKQWyW41omLzZprI78WGl3Oe22EjeEDPXcAvNhPdIwnE7mVlHqEJtHt2gWe rLcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+d2pk3jQXo6hiaZFcbrJF3ShMylHr8LVRoqrMmrA6ws=; b=jcYXuo9NgEpruPzcPvBJus3DU/nH4Wgid/Uk5xoyeAB0y1ADCuhl02AlPMY5VA9urM etZDokCez4qXACmBk9UZY3+Xu3+yN6QY2NJU3LD2E/8nONi7Gu/iQ/mWBQBgjDtUd6wL J/LYLeUP5yWKWfgUL/QCLWPNvjSS1W1NI8+1x9CPraPTmBf3C1osFavbs/Wfx3kTmx7Q fNY3iSn5LcfZUn93WQxb71vhFYu1A8JZLiw6zDqZzUgID0ngqoZ7nrqGOJ420qnD/A7h oHW/tvIqpGxCRzEr4lBgkNJdDIKeZIPzxUXBpAWVET6n203lPxcreUYov1gFBVMhaWvT N2qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N6+VRiKj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v21si8531513ejh.106.2020.12.08.05.59.01; Tue, 08 Dec 2020 05:59:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N6+VRiKj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729521AbgLHNzx (ORCPT + 99 others); Tue, 8 Dec 2020 08:55:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:58018 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726338AbgLHNzw (ORCPT ); Tue, 8 Dec 2020 08:55:52 -0500 X-Gm-Message-State: AOAM531vd5GLJ17BIhllutjkE+6n48AniZDMzZN4ItSIvtDTIS7W8Z9L 5oWC82bBr16v2Ax/S/G/pXGTP2skjhWDLM+BhGQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607435711; bh=aMUeJmcHjLR1mxPMY4lSg5wm08l9vr2Dq3J8KhZCHss=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=N6+VRiKj1w/sHG04FJYJajgruVEl0d0kXpByOymHxPthCNLPJiukFzJ0fV2Fks4F3 f3OYCjwUjrh0Mlf1Q4sJGjiuG+CSXHTbFZTkrqCv+RKCMWkLCdkoGeXDRPUxmeCutZ PvCcGNK3GKImyzLMtrB2yTw7+GoV0yDqsIR4dn7IMy5VKyojDA4DfYN2ZEygwOrw5h yf899Lyg8XrtlHlrasiYJQpQD5/jtisPkmLxhy3aBeoCxaov7xm4Im/ELWLRl42Ocw cizq88EGMi2nzasl/XChEgEAvqZzmNujCnkYUHPFgAM4zpJ9J9XBeHGGlR89vy8Yhi rTnMXtxRGJrBQ== X-Received: by 2002:a1c:b4c4:: with SMTP id d187mr3984205wmf.38.1607435710266; Tue, 08 Dec 2020 05:55:10 -0800 (PST) MIME-Version: 1.0 References: <20201201213707.541432-1-samitolvanen@google.com> In-Reply-To: From: Arnd Bergmann Date: Tue, 8 Dec 2020 14:54:28 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v8 00/16] Add support for Clang LTO To: Sami Tolvanen Cc: Masahiro Yamada , Steven Rostedt , Will Deacon , Josh Poimboeuf , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux , Kernel Hardening , linux-arch , Linux ARM , Linux Kbuild mailing list , "linux-kernel@vger.kernel.org" , linux-pci Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 8, 2020 at 1:15 PM Arnd Bergmann wrote: > On Tue, Dec 1, 2020 at 10:37 PM 'Sami Tolvanen' via Clang Built Linux wrote: > > - many builds complain about thousands of duplicate symbols in the kernel, e.g. > ld.lld: error: duplicate symbol: qrtr_endpoint_post > >>> defined in net/qrtr/qrtr.lto.o > >>> defined in net/qrtr/qrtr.o > ld.lld: error: duplicate symbol: init_module > >>> defined in crypto/842.lto.o > >>> defined in crypto/842.o > ld.lld: error: duplicate symbol: init_module > >>> defined in net/netfilter/nfnetlink_log.lto.o > >>> defined in net/netfilter/nfnetlink_log.o > ld.lld: error: duplicate symbol: vli_from_be64 > >>> defined in crypto/ecc.lto.o > >>> defined in crypto/ecc.o > ld.lld: error: duplicate symbol: __mod_of__plldig_clk_id_device_table > >>> defined in drivers/clk/clk-plldig.lto.o > >>> defined in drivers/clk/clk-plldig.o A small update here: I see this behavior with every single module build, including 'tinyconfig' with one module enabled, and 'defconfig'. I tuned the randconfig setting using KCONFIG_PROBABILITY=2:2:1 now, which only enables a few symbols. With this I see faster build times (obvioulsy), aroudn 30 seconds per kernel, and all small builds with CONFIG_MODULES disabled so far succeed. It appears that the problems I saw originally only happen for larger configurations, or possibly a combination of Kconfig options that don't happen that often on randconfig builds with low KCONFIG_PROBABILITY. Arnd