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=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 E75A7C432BE for ; Mon, 2 Aug 2021 06:42:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD06F60F51 for ; Mon, 2 Aug 2021 06:42:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232330AbhHBGnA (ORCPT ); Mon, 2 Aug 2021 02:43:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229734AbhHBGm7 (ORCPT ); Mon, 2 Aug 2021 02:42:59 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE94CC06175F; Sun, 1 Aug 2021 23:42:49 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id k4so9716391wms.3; Sun, 01 Aug 2021 23:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=BLpYFCEhMxHCYOJofpDOBnsrLOpomdik6GbpkfmrbEo=; b=lxYQjRPo7UXjm1H9eY2abYSOBagbxy3grS+nrpt94yVfDuQQDLFjSmpCYReTly+NMm Fb6o6xPlrEvvPdY8iATiegFaJBfJZcLKN7qmg41+a3vxxiKSeci7BsXBn9ENnmruEGlq 3zuZW8DQwMUpuVkUruZBRpZSZqEM315zhCaBaLmzhoFJ1kHytRaJSbTwRaQRr8hpPXxY +lGpN3+bZA6IDCwCs4eiFX/kT9Vwtc1kxR1HgqqYtjjrSTUQejSXSasuw5Xs9eHBNwYf 6p/J4vr35PGVCXSyjTmyr4Sk494k8jwZpGauPdepm+RZ5xQdV1raeOuly+kut0V0IRAS xGRQ== 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=BLpYFCEhMxHCYOJofpDOBnsrLOpomdik6GbpkfmrbEo=; b=TwXP0BI+IlaiYPJ9T5YEyBGkDmOTLb7/peCzenDZAIYPqJ1XsKhvOwBL1dzpVVvwKE Qt51u6C+6wxCAxoK/WWakGjWoQDpSKvmHWzRrIwRqXLIahk/jitWc2/SuxFD6ViS3rnM inVuhjlvREzmJShIMFEikNVziKQDQfOxMzv8EaWltq4m5eBnMrwuYVcSk4yAPiJ0wAaD gyi8yy2aWzgbn8Qslcbow6E5XEEqQd76g9IMar7mCnQREcMs5r3v9SJf4l/Fo0EXsS6H K/0O/VIYEet8ct4PUehtk9kwaLKYKrVFWgBQW/M9WsRYzph8XKszLj6zufIBXkzqMMiM aO8g== X-Gm-Message-State: AOAM532SVU0Uma5wPaVgBXzwin/CkZyFW4YkQ4iyKkc0XIwVuhhKRfR3 rXIw9PA4GPI3kxGR6umr+g== X-Google-Smtp-Source: ABdhPJxo16iUjyVIeQ9xmvVvuQlDGuzxRLyLiI++9qUbTiA6r1gF/Vs2kZ1oNCsICDMajf7DIB0MlQ== X-Received: by 2002:a05:600c:2215:: with SMTP id z21mr10525990wml.84.1627886568347; Sun, 01 Aug 2021 23:42:48 -0700 (PDT) Received: from localhost.localdomain ([46.53.248.142]) by smtp.gmail.com with ESMTPSA id k186sm11178355wme.45.2021.08.01.23.42.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Aug 2021 23:42:47 -0700 (PDT) Date: Mon, 2 Aug 2021 09:42:45 +0300 From: Alexey Dobriyan To: Segher Boessenkool Cc: akpm@linux-foundation.org, linux-arch@vger.kernel.org, Catalin Marinas , masahiroy@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Paul Mackerras , Will Deacon , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 3/3] isystem: delete global -isystem compile option Message-ID: References: <20210801201336.2224111-1-adobriyan@gmail.com> <20210801201336.2224111-3-adobriyan@gmail.com> <20210801213247.GM1583@gate.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210801213247.GM1583@gate.crashing.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 01, 2021 at 04:32:47PM -0500, Segher Boessenkool wrote: > On Sun, Aug 01, 2021 at 11:13:36PM +0300, Alexey Dobriyan wrote: > > In theory, it enables "leakage" of userspace headers into kernel which > > may present licensing problem. > > > -NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) > > +NOSTDINC_FLAGS += -nostdinc > > This is removing the compiler's own include files. These are required > for all kinds of basic features, and required to be compliant to the C > standard at all. No they are not required. Kernel uses its own bool, uintptr_t and static_assert, memset(), CHAR_BIT. noreturn, alignas newest C standard are next. This version changelog didn't mention but kernel would use -ffreestanding too if not other problems with the flag. > These are not "userspace headers", that is what > -nostdinc takes care of already. They are userspace headers in the sense they are external to the project just like userspace programs are external to the kernel. > In the case of GCC all these headers are GPL-with-runtime-exception, so > claiming this can cause licensing problems is fearmongering. I agree licensing problem doesn't really exist. It would take gcc drop-in replacement with authors insane enough to not license standard headers properly. > I strongly advise against doing this. Kernel chose to be self-contained. -isystem removal makes sense then. It will be used for intrinsics where necessary. 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=-0.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 F1B7FC4338F for ; Mon, 2 Aug 2021 06:43:25 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 2B04361050 for ; Mon, 2 Aug 2021 06:43:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2B04361050 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GdT3b1mdYz3cHT for ; Mon, 2 Aug 2021 16:43:23 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=lxYQjRPo; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2a00:1450:4864:20::32c; helo=mail-wm1-x32c.google.com; envelope-from=adobriyan@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=lxYQjRPo; dkim-atps=neutral Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4GdT332lhlz2yxL for ; Mon, 2 Aug 2021 16:42:54 +1000 (AEST) Received: by mail-wm1-x32c.google.com with SMTP id i10-20020a05600c354ab029025a0f317abfso3279189wmq.3 for ; Sun, 01 Aug 2021 23:42:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=BLpYFCEhMxHCYOJofpDOBnsrLOpomdik6GbpkfmrbEo=; b=lxYQjRPo7UXjm1H9eY2abYSOBagbxy3grS+nrpt94yVfDuQQDLFjSmpCYReTly+NMm Fb6o6xPlrEvvPdY8iATiegFaJBfJZcLKN7qmg41+a3vxxiKSeci7BsXBn9ENnmruEGlq 3zuZW8DQwMUpuVkUruZBRpZSZqEM315zhCaBaLmzhoFJ1kHytRaJSbTwRaQRr8hpPXxY +lGpN3+bZA6IDCwCs4eiFX/kT9Vwtc1kxR1HgqqYtjjrSTUQejSXSasuw5Xs9eHBNwYf 6p/J4vr35PGVCXSyjTmyr4Sk494k8jwZpGauPdepm+RZ5xQdV1raeOuly+kut0V0IRAS xGRQ== 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=BLpYFCEhMxHCYOJofpDOBnsrLOpomdik6GbpkfmrbEo=; b=re0gNdpH1S1CJgVqhHx7QQ79D6xx9gaEvGTGTUdSnBF1sxhA/q6e3mgurI6OkMV4Sl g9Nufa3yc5F2QqItrGP84Gn7OxKZ+q+KBD19ePUn9/hjvnf6/TzBNLne3YTlfieKwyON +s0bDwNwA2j6ziY2ywi7/PhYFQFleomykTjwBciwDLbfXdah7SPQUyeoT2ECthckVVSa Mg7pUBIt1FNMava7fWUsddwz3BRHUFcZENoZC1gT+JvGjvcn6hl0GllIsNYQ0W/B5obF p6vyAa/dAla7fDNJOcOW0KfASopWUYI4AJfaTOkS2zKt22jViXyiOhqe+NHqO3XKU5pC hiTQ== X-Gm-Message-State: AOAM531EOcHLXtVVayylpkdLSRXgUMF8xOEEHoOACgP+uoiIEbZGHn3S fZ7ghbaqrq+11jAMbrwkLg== X-Google-Smtp-Source: ABdhPJxo16iUjyVIeQ9xmvVvuQlDGuzxRLyLiI++9qUbTiA6r1gF/Vs2kZ1oNCsICDMajf7DIB0MlQ== X-Received: by 2002:a05:600c:2215:: with SMTP id z21mr10525990wml.84.1627886568347; Sun, 01 Aug 2021 23:42:48 -0700 (PDT) Received: from localhost.localdomain ([46.53.248.142]) by smtp.gmail.com with ESMTPSA id k186sm11178355wme.45.2021.08.01.23.42.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Aug 2021 23:42:47 -0700 (PDT) Date: Mon, 2 Aug 2021 09:42:45 +0300 From: Alexey Dobriyan To: Segher Boessenkool Subject: Re: [PATCH 3/3] isystem: delete global -isystem compile option Message-ID: References: <20210801201336.2224111-1-adobriyan@gmail.com> <20210801201336.2224111-3-adobriyan@gmail.com> <20210801213247.GM1583@gate.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210801213247.GM1583@gate.crashing.org> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Will Deacon , Catalin Marinas , masahiroy@kernel.org, linux-kernel@vger.kernel.org, Paul Mackerras , akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Sun, Aug 01, 2021 at 04:32:47PM -0500, Segher Boessenkool wrote: > On Sun, Aug 01, 2021 at 11:13:36PM +0300, Alexey Dobriyan wrote: > > In theory, it enables "leakage" of userspace headers into kernel which > > may present licensing problem. > > > -NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) > > +NOSTDINC_FLAGS += -nostdinc > > This is removing the compiler's own include files. These are required > for all kinds of basic features, and required to be compliant to the C > standard at all. No they are not required. Kernel uses its own bool, uintptr_t and static_assert, memset(), CHAR_BIT. noreturn, alignas newest C standard are next. This version changelog didn't mention but kernel would use -ffreestanding too if not other problems with the flag. > These are not "userspace headers", that is what > -nostdinc takes care of already. They are userspace headers in the sense they are external to the project just like userspace programs are external to the kernel. > In the case of GCC all these headers are GPL-with-runtime-exception, so > claiming this can cause licensing problems is fearmongering. I agree licensing problem doesn't really exist. It would take gcc drop-in replacement with authors insane enough to not license standard headers properly. > I strongly advise against doing this. Kernel chose to be self-contained. -isystem removal makes sense then. It will be used for intrinsics where necessary. 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=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 87B94C4338F for ; Mon, 2 Aug 2021 06:44:51 +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 5361361050 for ; Mon, 2 Aug 2021 06:44:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5361361050 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ry9nrCGFVzMEDJOjRXKabJPoygy07WH8BiSlxvpadDQ=; b=MuVwaNJyolWckL ShmLH8dZ/ZY/P/bkA5k+xqRmywpYmxZVJalMiuo0KiuIHZKRuOdxCEHfZlIiqPkABs/ZPDm/PwMjA Tg+YYvroD7JOBK4EZqiPZFhkLisAi+05GTEWFx5TcYvCnMTyMclrr9FR3hUJJnqji5RqAAUE4aAgK fqaRafdWTwwpf6Qk+vyqYURYzjtL6ACy6LDPVWR2lNwOFcawv40jZcnbCgIQDGCRz+gGSH6Fx9fgq JqLIKX8btdhEcP+pBGBibebTHkxaSmIoAAiPR4LIDuIiCe1GLqu/j5Prad8ebVPTeHvBRycq8zTAO 9qCIDoyknTXckCir1D/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mARf4-00FBx3-37; Mon, 02 Aug 2021 06:42:54 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mARf0-00FBwE-40 for linux-arm-kernel@lists.infradead.org; Mon, 02 Aug 2021 06:42:52 +0000 Received: by mail-wm1-x336.google.com with SMTP id x17so3463409wmc.5 for ; Sun, 01 Aug 2021 23:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=BLpYFCEhMxHCYOJofpDOBnsrLOpomdik6GbpkfmrbEo=; b=lxYQjRPo7UXjm1H9eY2abYSOBagbxy3grS+nrpt94yVfDuQQDLFjSmpCYReTly+NMm Fb6o6xPlrEvvPdY8iATiegFaJBfJZcLKN7qmg41+a3vxxiKSeci7BsXBn9ENnmruEGlq 3zuZW8DQwMUpuVkUruZBRpZSZqEM315zhCaBaLmzhoFJ1kHytRaJSbTwRaQRr8hpPXxY +lGpN3+bZA6IDCwCs4eiFX/kT9Vwtc1kxR1HgqqYtjjrSTUQejSXSasuw5Xs9eHBNwYf 6p/J4vr35PGVCXSyjTmyr4Sk494k8jwZpGauPdepm+RZ5xQdV1raeOuly+kut0V0IRAS xGRQ== 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=BLpYFCEhMxHCYOJofpDOBnsrLOpomdik6GbpkfmrbEo=; b=FwsxoV4CfDUnFTLdhW7DY99jleduki6cBkvR7K2+VD1IvSVfO6mp1iaqN7/zscOtHV RIQEWYGW4Bfqua1ca0kuwzUd78wwitg2X7HTww/ZRPdeTxaQk5v2wAMDI0rqux5KZewp UFsupcsSgaw4GZ+gssBetKs7VVKThmDn8BHwZO6OSEJOcvgbG1cbPh5oabzHBV+nWoOo kAa/AR1XhJuO52kVyyPbUiI12+gaQGcdln9VHOkGf5WUhfTHatqSor4wBJwmIlN2Xu3u TNX69B1LrHnhcivVXMmPWYbO72ELe0izLPlDk92TvBxIHQUYJWMZ/kodQfI6aXdZ9FoE QDNg== X-Gm-Message-State: AOAM531Et8N4HTD7429hN4ySZPCnFlEhwwiJJV2tNK7D0qIu38GFBUNk Prn4IX+NJUSIXFZXkM96rg== X-Google-Smtp-Source: ABdhPJxo16iUjyVIeQ9xmvVvuQlDGuzxRLyLiI++9qUbTiA6r1gF/Vs2kZ1oNCsICDMajf7DIB0MlQ== X-Received: by 2002:a05:600c:2215:: with SMTP id z21mr10525990wml.84.1627886568347; Sun, 01 Aug 2021 23:42:48 -0700 (PDT) Received: from localhost.localdomain ([46.53.248.142]) by smtp.gmail.com with ESMTPSA id k186sm11178355wme.45.2021.08.01.23.42.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Aug 2021 23:42:47 -0700 (PDT) Date: Mon, 2 Aug 2021 09:42:45 +0300 From: Alexey Dobriyan To: Segher Boessenkool Cc: akpm@linux-foundation.org, linux-arch@vger.kernel.org, Catalin Marinas , masahiroy@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Paul Mackerras , Will Deacon , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 3/3] isystem: delete global -isystem compile option Message-ID: References: <20210801201336.2224111-1-adobriyan@gmail.com> <20210801201336.2224111-3-adobriyan@gmail.com> <20210801213247.GM1583@gate.crashing.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210801213247.GM1583@gate.crashing.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210801_234250_225037_57CDB7BD X-CRM114-Status: GOOD ( 14.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Aug 01, 2021 at 04:32:47PM -0500, Segher Boessenkool wrote: > On Sun, Aug 01, 2021 at 11:13:36PM +0300, Alexey Dobriyan wrote: > > In theory, it enables "leakage" of userspace headers into kernel which > > may present licensing problem. > > > -NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) > > +NOSTDINC_FLAGS += -nostdinc > > This is removing the compiler's own include files. These are required > for all kinds of basic features, and required to be compliant to the C > standard at all. No they are not required. Kernel uses its own bool, uintptr_t and static_assert, memset(), CHAR_BIT. noreturn, alignas newest C standard are next. This version changelog didn't mention but kernel would use -ffreestanding too if not other problems with the flag. > These are not "userspace headers", that is what > -nostdinc takes care of already. They are userspace headers in the sense they are external to the project just like userspace programs are external to the kernel. > In the case of GCC all these headers are GPL-with-runtime-exception, so > claiming this can cause licensing problems is fearmongering. I agree licensing problem doesn't really exist. It would take gcc drop-in replacement with authors insane enough to not license standard headers properly. > I strongly advise against doing this. Kernel chose to be self-contained. -isystem removal makes sense then. It will be used for intrinsics where necessary. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel