Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6669192iob; Wed, 11 May 2022 02:45:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfu5v4ybt29ZrY+Quv5IViGkU4RTj8AAN/Okp30NIf9KbsvHMOlErKqNYFJiOCU9Rjqu5r X-Received: by 2002:a17:903:1053:b0:15f:1622:6376 with SMTP id f19-20020a170903105300b0015f16226376mr12206128plc.119.1652262331272; Wed, 11 May 2022 02:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652262331; cv=none; d=google.com; s=arc-20160816; b=maY+nqe+UQVycn1ktTPH9x5zjUEBAg7iGYoO5J8W6L8oPq+2wZzuXmjyqP1jPPbIsy xyPMNdhxA2eAP0u+Jjx6rOxvS9CyXm51nccGb2m/cFWlGa+kfxWUgAvV37cXGZRNiudb Fmuu5rRAnalIOT+KgjeVZu0Qusc2/8xXlt9gkbM7RlkSPifO3DY/o6uP/PLBJLrmocV8 lPDbVmxRnetMBGwcuati4v4tErWGUQjcpft0pGQc3X0D92dKOIL/5ZKbuVzdggKtLWZs nPzoXsv22I+TZaQvQUvsI+6FP+nw9WoLKl+tCs4WuRe6nC+0hZQ+PV14yKQvE5UzycSc Ipug== 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:dkim-filter; bh=fRrVkhc4C69GR5bjBNf1IL1bPSkMZTmDY7FnTVwEOfk=; b=eisc5bUkMvwRNDzhKefXn1f2tGkjc8dwyLZqXZzNPcs0n+w/O9knXvz77Ay6PZ7JvG 7a4Uaj7eul2s7QrHNog2f4H3bGIDDkyCEtJP3Cd31IvMwOsbMYf/1tMrAbqgHa1di5zS /SrMyrY0bDhg4K3bQfMs916PFwwzoGZuqgn60fM3SoGYGjLgAAAbmfeqzMPbfkNwxvh0 K+ds2zWy8e7p9+A5YK04nsNXSOr+dXjgfEGTn9D2a8V39Oawc/W2BgMq8W2YPa7y2Kvi +1yatud0qkmfVvmlWJ+MxHNUltOJFUG5gUXG5guU6cpPBCnB2E7Lmw2EPDTbMebgMFCZ I4WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=bDmhjqVQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 4-20020a631844000000b003c14d8d1270si2240507pgy.562.2022.05.11.02.45.17; Wed, 11 May 2022 02:45:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=bDmhjqVQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S237531AbiEKFZy (ORCPT + 99 others); Wed, 11 May 2022 01:25:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231673AbiEKFZu (ORCPT ); Wed, 11 May 2022 01:25:50 -0400 Received: from conssluserg-04.nifty.com (conssluserg-04.nifty.com [210.131.2.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E99A56267 for ; Tue, 10 May 2022 22:25:48 -0700 (PDT) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (authenticated) by conssluserg-04.nifty.com with ESMTP id 24B5POum021481 for ; Wed, 11 May 2022 14:25:24 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 24B5POum021481 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1652246725; bh=fRrVkhc4C69GR5bjBNf1IL1bPSkMZTmDY7FnTVwEOfk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bDmhjqVQkNuZl9hB6eOHMxjDMqv9/k7Ryyb/MsyeVua8KVEVkGObOKEmrKHgkmRoW BTamJTRZD4IlzXYBRQdGojlr1ZV9q1s02SJ/1rKlpALhW5DN6bzQQGXEwpR+nh/MXJ d2YEUdMNrWVmVeBa0nGw+0C9F1BxVuleIALEoA3QJfYIUzW32bdONsz6qNISrkBwuq e40glc0Dp6zlpEhBZjM9apLsvrKoU3wRYlXuKq1E8QcomBJDKtJhRahPiLVS9DaJwr 6bmLMiHNf5w/2Y/5wSymyVYnEwckPRduJnUS4Q/x/aHKHljLP25YnN87cLbsSQf+BM by0RFpNq60QRA== X-Nifty-SrcIP: [209.85.214.175] Received: by mail-pl1-f175.google.com with SMTP id i1so815798plg.7 for ; Tue, 10 May 2022 22:25:24 -0700 (PDT) X-Gm-Message-State: AOAM5325bSVWlKdcaex2JzNvF4fs2LWamquE+ZOFQNPxOnomMHFkm+ak 6N6Uzrkr4g6aWNNiSXB3C+pXK+tvMMnTPNoFNmk= X-Received: by 2002:a17:902:7891:b0:15e:cae9:7620 with SMTP id q17-20020a170902789100b0015ecae97620mr23934575pll.136.1652246723945; Tue, 10 May 2022 22:25:23 -0700 (PDT) MIME-Version: 1.0 References: <20220429053329.2278740-1-aik@ozlabs.ru> In-Reply-To: From: Masahiro Yamada Date: Wed, 11 May 2022 14:24:12 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH kernel v2] zstd: Fixing mixed module-builtin objects To: Alexey Kardashevskiy Cc: Linux Kernel Mailing List , Nick Terrell , Nick Desaulniers , Nathan Chancellor Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_SOFTFAIL, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 11, 2022 at 11:03 AM Alexey Kardashevskiy wrote: > > > > On 4/29/22 15:33, Alexey Kardashevskiy wrote: > > With CONFIG_ZSTD_COMPRESS=m and CONFIG_ZSTD_DECOMPRESS=y we end up in > > a situation when files from lib/zstd/common/ are compiled once to be > > linked later for ZSTD_DECOMPRESS (build-in) and ZSTD_COMPRESS (module) > > even though CFLAGS are different for builtins and modules. > > So far somehow this was not a problem but enabling LLVM LTO exposes > > the problem as: > > > > ld.lld: error: linking module flags 'Code Model': IDs have conflicting values in 'lib/built-in.a(zstd_common.o at 5868)' and 'ld-temp.o' > > > > This particular conflict is caused by KBUILD_CFLAGS=-mcmodel=medium vs. > > KBUILD_CFLAGS_MODULE=-mcmodel=large , modules use the large model on > > POWERPC as explained at > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/Makefile?h=v5.18-rc4#n127 > > but the current use of common files is wrong anyway. > > > > This works around the issue by introducing a zstd_common module with > > shared code. > > > > Cc: Masahiro Yamada > > Signed-off-by: Alexey Kardashevskiy > > > Ping? Thanks, Reviewed-by: Masahiro Yamada -- Best Regards Masahiro Yamada