From patchwork Mon Apr 8 21:16:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 1921047 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VD22s4b4Bz1yY8 for ; Tue, 9 Apr 2024 07:16:37 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id DCE6040568; Mon, 8 Apr 2024 21:16:35 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 37NG-BTqIg4q; Mon, 8 Apr 2024 21:16:34 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org B8AE840C1C Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id B8AE840C1C; Mon, 8 Apr 2024 21:16:34 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id E0ABD1BF2A6 for ; Mon, 8 Apr 2024 21:16:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C91BC4081B for ; Mon, 8 Apr 2024 21:16:16 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id RGTZoup3n1i0 for ; Mon, 8 Apr 2024 21:16:15 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::52a; helo=mail-ed1-x52a.google.com; envelope-from=robimarko@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 68C7A407FA DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 68C7A407FA Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by smtp4.osuosl.org (Postfix) with ESMTPS id 68C7A407FA for ; Mon, 8 Apr 2024 21:16:14 +0000 (UTC) Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-56e69888a36so1519371a12.3 for ; Mon, 08 Apr 2024 14:16:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712610972; x=1713215772; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cX1jIBenWtg7cpuNFKd/n6XxWKvLIFBYDKxs+GDLYMg=; b=LjWJ/MGu+AaZYesQsI+Sj9XuWEDx/9rMlrAum/4mokp+lso3Q4h0QdU3H2KbCEWVH5 beIhgNZi0h3c9sMInZ45HPUPDSSPJlqs/mIjnXNWOKSgfboIxRfHzEdMTZGNMX97FEoT IOKplJu+zBNinIs8SKYAwndC42lUVukYFyORrqIc2F79yOpOpxHc7xtXv2lWgTZ7ACwa 7PbtbsyfqsKR4fif/lXdF9UNrZVtRXv5jZgLqg8W3quxUpKWKCQGitw2mCvEWuSZ2urt SlEZv4I4QvkQwAeWWi8fXp3y8LbdqpUM0p/kgppkgqIMceXqkrBwjMTqa+Do1La+ScCx 8q+Q== X-Gm-Message-State: AOJu0YxhwKcrNVQ+Y/EowvfGg123JlmxZ1+HDBh7dm+zX18be4tueTof TeiNxOyfb4gw6G5nixs8oYmE7T6Aoo8IfI1PSqfkD9HC1tmKcBfNa6p4gv/7 X-Google-Smtp-Source: AGHT+IGgzhXvaxBJwxwmh7LYy1LMcd6HSsiYafwTE2J9Ftadozx/VJ4zQ7VaujyUBy4A96EqG/1+VQ== X-Received: by 2002:a50:cc97:0:b0:56b:ed78:f58 with SMTP id q23-20020a50cc97000000b0056bed780f58mr7986503edi.33.1712610971916; Mon, 08 Apr 2024 14:16:11 -0700 (PDT) Received: from fedora.. (cpe-188-129-45-147.dynamic.amis.hr. [188.129.45.147]) by smtp.googlemail.com with ESMTPSA id y9-20020a056402440900b0056e3707323bsm3779438eda.97.2024.04.08.14.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 14:16:11 -0700 (PDT) From: Robert Marko To: buildroot@buildroot.org Date: Mon, 8 Apr 2024 23:16:09 +0200 Message-ID: <20240408211609.2423619-1-robimarko@gmail.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712610972; x=1713215772; darn=buildroot.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=cX1jIBenWtg7cpuNFKd/n6XxWKvLIFBYDKxs+GDLYMg=; b=j2/7iLAPWC8Nx3Uw14fXntvMkhmRAPnXRbTFwSzx6AZ2rInm4P5/2mAa/nboLb2F0H NsrRQUkKtWvXZzR9pSXp2qQWZID4zkYcyLVXz7aHNdOS9T8Cq76O+bL+GypRrWDsUWm6 bK26/lB1oQorQsyZAyrbDSyPFvTVZ0iioiUziFfDhjSQk79azN7wC18oXdpBmQ0IowOJ wCgUDM7YQIMRZ86aHGxsO5nnMO+1XBiRkUNsko7rRQ+pgJgl0NPdSe/tm9kRpcy1Fqi+ rJXtY4ZAjbaokE1/2RNgGzVxan8zhb1Wc4DhG5RPHI5n/H41L3Vi4SK9KhYBdSOB1rVr JYQw== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=j2/7iLAP Subject: [Buildroot] [PATCH v2 1/1] kconfig/lxdialog: fix check() with GCC14 X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Petr Vorel , Robert Marko Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" GCC14 now treats implicit int types as error so when check() from check-lxdialog.sh is called to check whether we can link against ncurses it will fail silently and the help text indicating to install ncurses is printed. However, this is not due to missing ncurses but once the stderr redirect to /dev/null is removed we can see the root cause: :2:1: error: return type defaults to ‘int’ [-Wimplicit-int] So, in order for menuconfig to work with GCC14 lets just specify the return type of main() as int. Signed-off-by: Robert Marko Reviewed-by: Petr Vorel Tested-by: Petr Vorel --- support/kconfig/lxdialog/check-lxdialog.sh | 2 +- ...config-lxdialog-fix-check-with-GCC14.patch | 43 +++++++++++++++++++ support/kconfig/patches/series | 1 + 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 support/kconfig/patches/22-kconfig-lxdialog-fix-check-with-GCC14.patch diff --git a/support/kconfig/lxdialog/check-lxdialog.sh b/support/kconfig/lxdialog/check-lxdialog.sh index 16cd9a3186..27d6c30a57 100755 --- a/support/kconfig/lxdialog/check-lxdialog.sh +++ b/support/kconfig/lxdialog/check-lxdialog.sh @@ -48,7 +48,7 @@ trap "rm -f $tmp" 0 1 2 3 15 check() { $cc -x c - -o $tmp 2>/dev/null <<'EOF' #include CURSES_LOC -main() {} +int main() {} EOF if [ $? != 0 ]; then echo " *** Unable to find the ncurses libraries or the" 1>&2 diff --git a/support/kconfig/patches/22-kconfig-lxdialog-fix-check-with-GCC14.patch b/support/kconfig/patches/22-kconfig-lxdialog-fix-check-with-GCC14.patch new file mode 100644 index 0000000000..41081bb45d --- /dev/null +++ b/support/kconfig/patches/22-kconfig-lxdialog-fix-check-with-GCC14.patch @@ -0,0 +1,43 @@ +From 3ae91337b53fa3ccf0bad7f181fcaf483fab22ee Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Wed, 3 Apr 2024 14:18:07 +0200 +Subject: [PATCH] kconfig/lxdialog: fix check() with GCC14 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +GCC14 now treats implicit int types as error so when check() from +check-lxdialog.sh is called to check whether we can link against ncurses +it will fail silently and the help text indicating to install ncurses is +printed. + +However, this is not due to missing ncurses but once the stderr redirect +to /dev/null is removed we can see the root cause: +:2:1: error: return type defaults to ‘int’ [-Wimplicit-int] + +So, in order for menuconfig to work with GCC14 lets just specify the +return type of main() as int. + +Signed-off-by: Robert Marko +Reviewed-by: Petr Vorel +Tested-by: Petr Vorel +--- + kconfig/lxdialog/check-lxdialog.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kconfig/lxdialog/check-lxdialog.sh b/kconfig/lxdialog/check-lxdialog.sh +index 16cd9a3186..27d6c30a57 100755 +--- a/kconfig/lxdialog/check-lxdialog.sh ++++ b/kconfig/lxdialog/check-lxdialog.sh +@@ -48,7 +48,7 @@ trap "rm -f $tmp" 0 1 2 3 15 + check() { + $cc -x c - -o $tmp 2>/dev/null <<'EOF' + #include CURSES_LOC +-main() {} ++int main() {} + EOF + if [ $? != 0 ]; then + echo " *** Unable to find the ncurses libraries or the" 1>&2 +-- +2.44.0 + diff --git a/support/kconfig/patches/series b/support/kconfig/patches/series index e5a6f69d8f..f120e323b7 100644 --- a/support/kconfig/patches/series +++ b/support/kconfig/patches/series @@ -10,3 +10,4 @@ 19-merge_config.sh-add-br2-external-support.patch 20-merge_config.sh-Allow-to-define-config-prefix.patch 21-Avoid-false-positive-matches-from-comment-lines.patch +22-kconfig-lxdialog-fix-check-with-GCC14.patch