Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3225619rwd; Mon, 22 May 2023 10:19:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5EoTtzJSH3ydDPKl2fAIaZzcHJFT/OXPJO+KHLZWsl7SGB3xHpPVWUUGBLD6dtjXsvJMnl X-Received: by 2002:a05:6a20:4289:b0:103:9d9b:1ec6 with SMTP id o9-20020a056a20428900b001039d9b1ec6mr13432569pzj.28.1684775954386; Mon, 22 May 2023 10:19:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684775954; cv=none; d=google.com; s=arc-20160816; b=ZhbRy3g0Ci5WFGUHQItRbiv5PjGncUiGwPBDJYtocgVyF9/OlhSb8OPmSNqEsrabuv QPo6Zbt/XgSvaYiDJi6QQqes24hySYrzh5e98up64LQGEgMeP0ER+STkPpF2xG+Rq6C2 3GRbipFHN5rFsBDETGdbVKT/QCAB6pihgkBvlMTwmo+EpNMhaU4IKwSiQEiIadyJqWCY 2HEHOhWCmbc0WFo4SI06A5ptkXI5Vr7EBSdZGI1gdftEyC+tWFptSYWHePHl1HiIHfah g7KwA9tyqBz3I22d+O+itJ+/OIhPZUSJUdBBSm4THmzVbQ/XKLgJnfhcfldX2xVKRtBo +PkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fYQRQAnzP5Zb06jA1CgJzmp3DeHYM7ZZ6OBqmPC8ptQ=; b=VY21gopymt+2aNloeyjG+tc0xLfaLG/ess1EmOs4F2ldVUDWkzBsE0xul+p6mJZ0bt pzD8B97tVR7iKIBhdDmle0Lv6aiIV8b12b734BqR/YFQ1KKwZkOFb37UGIdgbhnJP1Fz ukYWb5kC4vGzmW119q7KC0Id677h5C/XoGSyU3BcDeyfAo1rD81xy41CQ5u1RvXYrwmV 7tj+ZBTrMZsCUDgDuKYEgmW8DpUO8zyAUKeoGyFpkgazCwjwBT4TXaZkA2zezLlIbnHe KFojQjRKvS1XkfVA5CRy8JPuKg/mL3QRTJ5cYwfJDAv0hBmkQ6BL9YhV/1XwhkeJO3cy nCVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e3MLFpG2; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w11-20020aa7954b000000b0064d5dcc9b8asi3171645pfq.125.2023.05.22.10.19.02; Mon, 22 May 2023 10:19:14 -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=@linuxfoundation.org header.s=korg header.b=e3MLFpG2; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231858AbjEVQwx (ORCPT + 99 others); Mon, 22 May 2023 12:52:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231610AbjEVQww (ORCPT ); Mon, 22 May 2023 12:52:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0239F1 for ; Mon, 22 May 2023 09:52:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3D04C6252A for ; Mon, 22 May 2023 16:52:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28B6CC433D2; Mon, 22 May 2023 16:52:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1684774370; bh=vOQbWWEEqd8EQVksWSFEy4waMaZII1vIhTX3SzTbbko=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=e3MLFpG2OoR6zPuYXlOFRm68JelSBH0QDndXPwKeHRgL9+reSIMdQe6CNgI/cfc9f miDxNritVnfcvqwuHDuMk5Rn/GbaQD+om4+8MowbFMZnHWSN9ZE0shhe5sjt+9/A0J BNSZ2iolJWZw8v1cc/eom6LTzfCJ1k1NevOLgfiI= Date: Mon, 22 May 2023 17:52:32 +0100 From: Greg KH To: Ricardo =?iso-8859-1?Q?Ca=F1uelo?= Cc: Nick Desaulniers , Shreeya Patel , Michal Marek , Masahiro Yamada , Linux Kernel Mailing List , clang-built-linux , Bill Wendling , Nathan Chancellor , regressions@lists.linux.dev, "gustavo.padovan@collabora.com" , Guillaume Charles Tucker , denys.f@collabora.com, kernelci@lists.linux.dev Subject: Re: [PATCH v4] Makefile.compiler: replace cc-ifversion with compiler-specific macros Message-ID: <2023052247-bobtail-factsheet-d104@gregkh> References: <17c91d37-7d9c-0df4-2438-2b30ca0b5777@collabora.com> <878rdlk9bi.fsf@rcn-XPS-13-9305.i-did-not-set--mail-host-address--so-tickle-me> <875y8ok9b5.fsf@rcn-XPS-13-9305.i-did-not-set--mail-host-address--so-tickle-me> <87353ok78h.fsf@rcn-XPS-13-9305.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87353ok78h.fsf@rcn-XPS-13-9305.i-did-not-set--mail-host-address--so-tickle-me> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Mon, May 22, 2023 at 12:09:34PM +0200, Ricardo Ca?uelo wrote: > On vie, may 19 2023 at 08:57:24, Nick Desaulniers wrote: > > It could be; if the link order was changed, it's possible that this > > target may be hitting something along the lines of: > > https://isocpp.org/wiki/faq/ctors#static-init-order i.e. the "static > > initialization order fiasco" > > > > I'm struggling to think of how this appears in C codebases, but I > > swear years ago I had a discussion with GKH (maybe?) about this. I > > think I was playing with converting Kbuild to use Ninja rather than > > Make; the resulting kernel image wouldn't boot because I had modified > > the order the object files were linked in. If you were to randomly > > shuffle the object files in the kernel, I recall some hazard that may > > prevent boot. > > I thought that was specifically a C++ problem? But then again, the > kernel docs explicitly say that the ordering of obj-y goals in kbuild is > significant in some instances [1]: Yes, it matters, you can not change it. If you do, systems will break. It is the only way we have of properly ordering our init calls within the same "level". thanks, greg k-h