From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 41A96158086 for ; Wed, 3 Nov 2021 16:43:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3A142E0876; Wed, 3 Nov 2021 16:43:35 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 98171E0876 for ; Wed, 3 Nov 2021 16:43:34 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 51765342E6A for ; Wed, 3 Nov 2021 16:43:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BAE1D163 for ; Wed, 3 Nov 2021 16:43:30 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1635957779.36d4dacd971f39bd0ecde7d93216de68c8efe31a.vapier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/sandbox/, sys-apps/sandbox/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/sandbox/files/sandbox-3.1-label-decl.patch sys-apps/sandbox/sandbox-3.1.ebuild X-VCS-Directories: sys-apps/sandbox/ sys-apps/sandbox/files/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 36d4dacd971f39bd0ecde7d93216de68c8efe31a X-VCS-Branch: master Date: Wed, 3 Nov 2021 16:43:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 94fffd44-69f3-4895-842e-9807df8a6cd4 X-Archives-Hash: d9fcac6d540a995eff228c91ac811ea5 commit: 36d4dacd971f39bd0ecde7d93216de68c8efe31a Author: Mike Frysinger gentoo org> AuthorDate: Wed Nov 3 16:42:47 2021 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Wed Nov 3 16:42:59 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36d4dacd sys-apps/sandbox: fix build failures in some compiler configurations #821433 Closes: https://bugs.gentoo.org/821433 Signed-off-by: Mike Frysinger gentoo.org> .../sandbox/files/sandbox-3.1-label-decl.patch | 41 ++++++++++++++++++++++ sys-apps/sandbox/sandbox-3.1.ebuild | 4 +++ 2 files changed, 45 insertions(+) diff --git a/sys-apps/sandbox/files/sandbox-3.1-label-decl.patch b/sys-apps/sandbox/files/sandbox-3.1-label-decl.patch new file mode 100644 index 00000000000..b17f4b866f5 --- /dev/null +++ b/sys-apps/sandbox/files/sandbox-3.1-label-decl.patch @@ -0,0 +1,41 @@ +From 82f6d876660ba1132d75ccfef5c4301d123ea505 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Wed, 3 Nov 2021 12:25:10 -0400 +Subject: [PATCH] libsandbox: tweak label/decl code for some compiler settings + +Looks like gcc is inconsistent in when it chokes on this code: +> a label can only be part of a statement and a declaration is not a statement + +Hoist the decl up to the top of scope to avoid the issue. + +Bug: https://bugs.gentoo.org/821433 +Signed-off-by: Mike Frysinger +--- + libsandbox/trace.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/libsandbox/trace.c b/libsandbox/trace.c +index f3390d99822e..d2899b743048 100644 +--- a/libsandbox/trace.c ++++ b/libsandbox/trace.c +@@ -704,6 +704,8 @@ static char *flatten_args(char *const argv[]) + + bool trace_possible(const char *filename, char *const argv[], const void *data) + { ++ char *args; ++ + /* If YAMA ptrace_scope is very high, then we can't trace at all. #771360 */ + int yama = trace_yama_level(); + if (yama >= 2) { +@@ -721,7 +723,7 @@ bool trace_possible(const char *filename, char *const argv[], const void *data) + } + + fail: +- char *args = flatten_args(argv); ++ args = flatten_args(argv); + sb_eqawarn("Unable to trace static ELF: %s: %s\n", filename, args); + free(args); + return false; +-- +2.33.0 + diff --git a/sys-apps/sandbox/sandbox-3.1.ebuild b/sys-apps/sandbox/sandbox-3.1.ebuild index 83e90898881..1c11a7faf15 100644 --- a/sys-apps/sandbox/sandbox-3.1.ebuild +++ b/sys-apps/sandbox/sandbox-3.1.ebuild @@ -18,6 +18,10 @@ DEPEND="app-arch/xz-utils >=app-misc/pax-utils-0.1.19" #265376 RDEPEND="" +PATCHES=( + "${FILESDIR}"/${P}-label-decl.patch #821433 +) + has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS+=" sandbox_death_notice" sandbox_death_notice() {