Skip to contentSkip to conversation

docs: reflect equal support for gcc and clang

PATCH In review Ariful Islam Shoikot 2 participants 3 messages Feb 24

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs: reflect equal support for gcc and clang

Update the programming language documentation to reflect that both gcc and clang are fully supported compilers.

---
 Documentation/process/programming-language.rst | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
Documentation/process/programming-language.rst +5 -4
index c18e307ccb56..491138ae17cb 100644
@@ -4,10 +4,11 @@ Programming Language
 ====================
 
 The Linux kernel is written in the C programming language [c-language]_.
-More precisely, it is typically compiled with ``gcc`` [gcc]_
-under ``-std=gnu11`` [gcc-c-dialect-options]_: the GNU dialect of ISO C11.
-``clang`` [clang]_ is also supported; see documentation on
-:ref:`Building Linux with Clang/LLVM <kbuild_llvm>`.
+More precisely, it is compiled with either ``gcc`` [gcc]_ or
+``clang`` [clang]_, both of which are fully supported, using
+``-std=gnu11`` [gcc-c-dialect-options]_:
+the GNU dialect of ISO C11. See
+:ref:`Building Linux with Clang/LLVM <kbuild_llvm>` for additional details.
 
 This dialect contains many extensions to the language [gnu-extensions]_,
 and many of them are used within the kernel as a matter of course.
Signature · 1 line
2.43.0
#1 lore raw
Quoted 13 lines · Ariful Islam Shoikot

Update the programming language documentation to reflect that both gcc and clang are fully supported compilers.

---
 Documentation/process/programming-language.rst | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
Documentation/process/programming-language.rst +0 -0
index c18e307ccb56..491138ae17cb 100644

Documentation/process/programming-language.rst Programming Language · line 8

Quoted 9 lines
Documentation/process/programming-language.rst +2 -4
@@ -4,10 +4,11 @@ Programming Language
 ====================
 
 The Linux kernel is written in the C programming language [c-language]_.
-More precisely, it is typically compiled with ``gcc`` [gcc]_
-under ``-std=gnu11`` [gcc-c-dialect-options]_: the GNU dialect of ISO C11.
-``clang`` [clang]_ is also supported; see documentation on
-:ref:`Building Linux with Clang/LLVM <kbuild_llvm>`.
+More precisely, it is compiled with either ``gcc`` [gcc]_ or
+``clang`` [clang]_, both of which are fully supported, using

"Fully" is a bit of stretch. Realistically, if you have x86, arm/arm64, riscv or s390, it should work. Beyond that...

Quite a few architectures are in the "hopefully the resulting kernel will work" state (ppc, mips) and it runs all the way through "if you are lucky, it builds" (sparc64, IIRC), some requiring a fork of clang (openrisc, for example), to "you are SOL, this target doesn't have even an attempted out-of-tree support" (alpha and parisc, at least).

#2 lore raw

PATCH v2 1/1 docs: clarify gcc and clang support wording

Avoid stating that both are "fully supported" due to variance between architecture.

---
 Documentation/process/programming-language.rst | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
Documentation/process/programming-language.rst +5 -4
index c18e307ccb56..25ec1c99e2ae 100644
@@ -4,10 +4,11 @@ Programming Language
 ====================
 
 The Linux kernel is written in the C programming language [c-language]_.
-More precisely, it is typically compiled with ``gcc`` [gcc]_
-under ``-std=gnu11`` [gcc-c-dialect-options]_: the GNU dialect of ISO C11.
-``clang`` [clang]_ is also supported; see documentation on
-:ref:`Building Linux with Clang/LLVM <kbuild_llvm>`.
+More precisely, it is compiled with either ``gcc`` [gcc]_ or
+``clang`` [clang]_, both of which are supported, using
+``-std=gnu11`` [gcc-c-dialect-options]_:
+the GNU dialect of ISO C11. See
+:ref:`Building Linux with Clang/LLVM <kbuild_llvm>` for additional details.
 
 This dialect contains many extensions to the language [gnu-extensions]_,
 and many of them are used within the kernel as a matter of course.
Signature · 1 line
2.43.0