Skip to contentSkip to conversation

Require a compiler with support for C11 features

PATCH Applied Dario Binacchi 2 participants 2 messages May 24, 2023 – Jun 4, 2023

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

PATCH v2 1/1 Require a compiler with support for C11 features

Just like the kernel, which has been using -std=gnu11 for about a year, we also require a C11 compiler for ethtool.

---
Changes in v2:
- Enable support to C11 compiler instead of C++11

---
 configure.ac | 9 +++++++++
 1 file changed, 9 insertions(+)
configure.ac +9 -0
index c1e001247138..5735e24927e2 100644
@@ -13,6 +13,15 @@ AC_PROG_GCC_TRADITIONAL
 AM_PROG_CC_C_O
 PKG_PROG_PKG_CONFIG
 
+AC_DEFUN([AX_CHECK_STDC],
+	 [AX_CHECK_COMPILE_FLAG([-std=gnu11],
+		[AX_APPEND_FLAG([-std=gnu11])],
+		[AX_CHECK_COMPILE_FLAG([-std=c11],
+			[AX_APPEND_FLAG([-std=c11])],
+			[AC_MSG_ERROR([$PACKAGE requires a C11 compiler])])
+		])
+	])
+
 dnl Checks for libraries.
 
 dnl Checks for header files.
Signature · 1 line
2.32.0
#1 lore raw
This patch was applied to ethtool/ethtool.git (master) by Michal Kubecek <[email protected]>:

Hello:

This patch was applied to ethtool/ethtool.git (master) by Michal Kubecek <[email protected]>:

Quoted 9 lines · On Wed, 24 May 2023 13:03:49 +0200 you wrote:

Just like the kernel, which has been using -std=gnu11 for about a year, we also require a C11 compiler for ethtool.

---
Changes in v2:
- Enable support to C11 compiler instead of C++11

[...]

Here is the summary with links:
- [ethtool,v2] Require a compiler with support for C11 features
https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/commit/?id=31b7b5ec7edd

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html