Bug#1009149: libperl5.34: Upstream patches "skip using gcc brace groups for STMT_START/END"
Sedat Dilek
sedat.dilek at gmail.com
Thu Apr 7 18:36:58 BST 2022
Package: libperl5.34
Version: 5.34.0-3
Severity: normal
X-Debbugs-Cc: sedat.dilek at gmail.com
Dear Maintainer,
when building perf tool out of the Linux-kernel sources tree we see build-errors with Clang.
When using Debian's perl-5.34 we need to add -Wno-compound-token-split-by-macro as compiler-flag.
This is due to -Werror is set explicitly.
For details see [1] and [2].
I hit the issue in combination with Debian's LLVM/Clang v14.
There are two commits from upstream fixing the issue.
"skip using gcc brace groups for STMT_START/END"
https://github.com/Perl/perl5/commit/7169efc77525df70484a824bff4ceebd1fafc760
"Partially Revert "skip using gcc brace groups for STMT_START/END""
https://github.com/Perl/perl5/commit/e08ee3cb66f362c4901846a46014cfdfcd60326c
Latest perl v5.34.1 seems not to have these changes:
https://github.com/Perl/perl5/compare/v5.34.0...v5.34.1
To summarize the total diff of above 2 commits is related to perl.h header-file only:
# git diff /usr/lib/x86_64-linux-gnu/perl/5.34.0/CORE/perl.h.orig /usr/lib/x86_64-linux-gnu/perl/5.34.0/CORE/perl.h
diff --git a/usr/lib/x86_64-linux-gnu/perl/5.34.0/CORE/perl.h.orig b/usr/lib/x86_64-linux-gnu/perl/5.34.0/CORE/perl.h
index 17a21a1c4..bd575fe08 100644
--- a/usr/lib/x86_64-linux-gnu/perl/5.34.0/CORE/perl.h.orig
+++ b/usr/lib/x86_64-linux-gnu/perl/5.34.0/CORE/perl.h
@@ -733,13 +733,8 @@ Example usage:
Trying to select a version that gives no warnings...
*/
#if !(defined(STMT_START) && defined(STMT_END))
-# ifdef PERL_USE_GCC_BRACE_GROUPS
-# define STMT_START (void)( /* gcc supports "({ STATEMENTS; })" */
-# define STMT_END )
-# else
# define STMT_START do
# define STMT_END while (0)
-# endif
#endif
#ifndef BYTEORDER /* Should never happen -- byteorder is in config.h */
With this diff applied and removing -Wno-compound-token-split-by-macro as compiler-flag
I am able to build perf tool successfully with LLVM-14.
For the records: These 2 patches against Linux-kernel from [2] are needed:
1. tools build: Use $(shell ) instead of `` to get embedded libperl's ccopts
2. tools build: Filter out options and warnings not supported by clang
Can you please apply the perl.h diff?
Thanks.
Regards,
- Sedat -
[1] https://marc.info/?t=164911172300004&r=1&w=2
[2] https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/log/?h=tmp.perf/urgent
-- System Information:
Debian Release: bookworm/sid
APT prefers stable-security
APT policy: (500, 'stable-security'), (500, 'testing'), (500, 'stable'), (99, 'buildd-unstable'), (99, 'buildd-experimental'), (99, 'experimental'), (99, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 5.17.1-6-amd64-clang14-lto (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_UNSIGNED_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages libperl5.34 depends on:
ii libbz2-1.0 1.0.8-5
ii libc6 2.33-7
ii libcrypt1 1:4.4.27-1.1
ii libdb5.3 5.3.28+dfsg1-0.8
ii libgdbm-compat4 1.23-1
ii libgdbm6 1.23-1
ii perl-modules-5.34 5.34.0-3
ii zlib1g 1:1.2.11.dfsg-4
libperl5.34 recommends no packages.
Versions of packages libperl5.34 suggests:
ii sensible-utils 0.0.17
-- no debconf information
More information about the Perl-maintainers
mailing list