From patchwork Wed Nov 11 16:15:06 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Hatle X-Patchwork-Id: 103760 Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.549.1794413715591114584 for ; Wed, 11 Nov 2026 08:15:15 -0800 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: kernel.crashing.org, ip: 63.228.1.57, mailfrom: mark.hatle@kernel.crashing.org) Received: from kernel.crashing.net (70-99-78-136.nuveramail.net [70.99.78.136] (may be forged)) by gate.crashing.org (8.18.1/8.18.1/Debian-2) with ESMTP id 6ABGFDdj2529923 for ; Wed, 11 Nov 2026 10:15:15 -0600 From: Mark Hatle To: yocto-patches@lists.yoctoproject.org Subject: [pseudo][pseudo-1.9]PATCH 04/10] configure: Require GCC 5 or later Date: Wed, 11 Nov 2026 10:15:06 -0600 Message-Id: <1794413712-18072-5-git-send-email-mark.hatle@kernel.crashing.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1794413712-18072-1-git-send-email-mark.hatle@kernel.crashing.org> References: <1794413712-18072-1-git-send-email-mark.hatle@kernel.crashing.org> List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Wed, 11 Nov 2026 16:15:18 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/5302 MIME-Version: 1.0 From: Mark Hatle pseudo uses __has_include, which GCC only supports from version 5, so older compilers such as GCC 4.8 on CentOS 7 failed part way through the build. clang reports itself as GCC 4.2.1, so it is only checked for __has_include. AI-Generated: Uses GitHub Copilot Signed-off-by: Mark Hatle (cherry picked from commit 7add07ba4f5b5095a66614bb210e5d42cfe33555) Signed-off-by: Mark Hatle --- README | 3 +++ configure | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/README b/README index c4cb997..039f960 100644 --- a/README +++ b/README @@ -11,6 +11,9 @@ environment, allowing ordinary users to run commands which give the illusion of creating device nodes, changing file ownership, and otherwise doing things necessary for creating distribution packages or filesystems. +Building pseudo requires GCC 5 or later (or clang), which the configure +script checks for. + To configure, run the provided configure script. Note that this is NOT an autoconf script. diff --git a/configure b/configure index 68c9962..f561dcb 100755 --- a/configure +++ b/configure @@ -232,6 +232,31 @@ if [ -z "$opt_sqlite_lib" ]; then opt_sqlite_lib=$opt_lib fi +# pseudo uses __has_include, which needs GCC 5 or later. clang reports +# itself as GCC 4.2.1, so only check its support for __has_include. +if ! cc_version=$(${CC:-cc} -dumpversion 2>/dev/null); then + echo >&2 "Error: can't run the C compiler '${CC:-cc}'." + exit 1 +fi +cc_check=$(mktemp -d "${TMPDIR:-/tmp}/pseudo-configure.XXXXXX") || exit 1 +cat > "$cc_check/cc_check.c" <&1); then + echo >&2 "Error: pseudo requires GCC 5 or later (${CC:-cc} reports version $cc_version)." + echo >&2 "$cc_check_out" + rm -rf "$cc_check" + exit 1 +fi +rm -rf "$cc_check" + if [ ! -f "${opt_sqlite}/include/sqlite3.h" ]; then echo >&2 "SQLite3 headers not found in at ${opt_sqlite}/include/sqlite3.h. Please check that SQLite3 and SQLite3 headers are installed." exit 1