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 E4C0715800F for ; Sat, 21 Jan 2023 04:54:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D165BE08AD; Sat, 21 Jan 2023 04:54:39 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AF0DDE08AD for ; Sat, 21 Jan 2023 04:54:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A6A40340B57 for ; Sat, 21 Jan 2023 04:54:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DB09F87B for ; Sat, 21 Jan 2023 04:54:36 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1674274305.20855351439863d9dda8e672fdad98876f82ba0c.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-perl/File-RsyncP/, dev-perl/File-RsyncP/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-perl/File-RsyncP/File-RsyncP-0.760.0-r1.ebuild dev-perl/File-RsyncP/files/File-RsyncP-0.760.0-clang16.patch dev-perl/File-RsyncP/files/File-RsyncP-0.760.0-lto.patch X-VCS-Directories: dev-perl/File-RsyncP/files/ dev-perl/File-RsyncP/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 20855351439863d9dda8e672fdad98876f82ba0c X-VCS-Branch: master Date: Sat, 21 Jan 2023 04:54:36 +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: 777a1674-58e2-4e35-beb8-3b38e23f4731 X-Archives-Hash: 519b4d2604941140400f9d15bcdb20b1 commit: 20855351439863d9dda8e672fdad98876f82ba0c Author: Sam James gentoo org> AuthorDate: Sat Jan 21 04:11:45 2023 +0000 Commit: Sam James gentoo org> CommitDate: Sat Jan 21 04:11:45 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20855351 dev-perl/File-RsyncP: fix build w/ LTO, clang 16 Closes: https://bugs.gentoo.org/867832 Signed-off-by: Sam James gentoo.org> dev-perl/File-RsyncP/File-RsyncP-0.760.0-r1.ebuild | 38 +++++ .../files/File-RsyncP-0.760.0-clang16.patch | 188 +++++++++++++++++++++ .../files/File-RsyncP-0.760.0-lto.patch | 40 +++++ 3 files changed, 266 insertions(+) diff --git a/dev-perl/File-RsyncP/File-RsyncP-0.760.0-r1.ebuild b/dev-perl/File-RsyncP/File-RsyncP-0.760.0-r1.ebuild new file mode 100644 index 000000000000..2c19a775d327 --- /dev/null +++ b/dev-perl/File-RsyncP/File-RsyncP-0.760.0-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DIST_AUTHOR=CBARRATT +DIST_VERSION=0.76 +inherit perl-module toolchain-funcs + +DESCRIPTION="An rsync perl module" +HOMEPAGE="http://perlrsync.sourceforge.net/ https://metacpan.org/release/File-RsyncP" +# Bundled files make for some weirdness +LICENSE="GPL-3+ GPL-2+ RSA" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" + +RDEPEND=" + >=virtual/perl-Getopt-Long-2.240.0 + net-misc/rsync +" +BDEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-0.700.0-make.patch" + "${FILESDIR}/${PN}-0.760.0-lto.patch" + "${FILESDIR}/${PN}-0.760.0-clang16.patch" +) + +src_prepare() { + perl-module_src_prepare + tc-export CC +} +src_compile() { + mymake=( + "OPTIMIZE=${CFLAGS}" + ) + perl-module_src_compile +} diff --git a/dev-perl/File-RsyncP/files/File-RsyncP-0.760.0-clang16.patch b/dev-perl/File-RsyncP/files/File-RsyncP-0.760.0-clang16.patch new file mode 100644 index 000000000000..5408ac9c982e --- /dev/null +++ b/dev-perl/File-RsyncP/files/File-RsyncP-0.760.0-clang16.patch @@ -0,0 +1,188 @@ +https://rt.cpan.org/Public/Bug/Display.html?id=145943 + +Various fixes for the configure script. Most of them are specific to +this package, and not related to autoconf limitations. The +configure.in/configure.ac autoconf input is not included among +upstream sources, so they are not patched here. + +--- a/FileList/configure ++++ b/FileList/configure +@@ -2246,7 +2246,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ +- '' \ ++ '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ +@@ -2905,6 +2905,8 @@ cat >>conftest.$ac_ext <<_ACEOF + #include + #include + #include ++#include ++#include + + int main(void) + { +@@ -4492,8 +4494,8 @@ main () + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); ++ return 2; ++ return 0; + } + _ACEOF + rm -f conftest$ac_exeext +@@ -6841,6 +6843,8 @@ cat >>conftest.$ac_ext <<_ACEOF + #define NGID 256 + #undef MAX + #define MAX(x, y) ((x) > (y) ? (x) : (y)) ++#include ++#include + + int + main () +@@ -8828,6 +8832,7 @@ cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default ++#include + int + main () + { +@@ -9397,9 +9402,9 @@ cat >>conftest.$ac_ext <<_ACEOF + #include + #include + +-main() { ++int main(void) { + int fd[2]; +- exit((socketpair(AF_UNIX, SOCK_STREAM, 0, fd) != -1) ? 0 : 1); ++ return (socketpair(AF_UNIX, SOCK_STREAM, 0, fd) != -1) ? 0 : 1; + } + _ACEOF + rm -f conftest$ac_exeext +@@ -9451,7 +9456,7 @@ cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include +-main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } ++int main(void) { long long x = 1000000; x *= x; return ((x/1000000) == 1000000)? 0: 1; } + _ACEOF + rm -f conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +@@ -9503,7 +9508,7 @@ cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + #include +-main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } ++int main(void) { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) return 1; return (lstat64("/dev/null", &st)==0)?0:1; } + _ACEOF + rm -f conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +@@ -9556,7 +9561,7 @@ cat >>conftest.$ac_ext <<_ACEOF + #include + #include + #include +-main() { if (sizeof(ino_t) < sizeof(unsigned int)) return 0; return 1; } ++int main(void) { if (sizeof(ino_t) < sizeof(unsigned int)) return 0; return 1; } + _ACEOF + rm -f conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +@@ -9607,7 +9612,7 @@ cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include +-main() { char c; c=250; exit((c > 0)?0:1); } ++int main(void) { char c; c=250; return (c > 0)?0:1; } + _ACEOF + rm -f conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +@@ -9659,9 +9664,9 @@ cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + #include +-main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d); ++int main(void) { struct dirent *di; DIR *d = opendir("."); di = readdir(d); + if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 && +-di->d_name[0] == 0) exit(0); exit(1);} ++di->d_name[0] == 0) return 0; return 1;} + _ACEOF + rm -f conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +@@ -9713,7 +9718,7 @@ cat >>conftest.$ac_ext <<_ACEOF + int + main () + { +-struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ++struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; return utime("foo.c",&tbuf); + ; + return 0; + } +@@ -9777,7 +9782,7 @@ cat >>conftest.$ac_ext <<_ACEOF + + #include + #include +-main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} ++int main(void) { struct timeval tv; return gettimeofday(&tv, NULL);} + _ACEOF + rm -f conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +@@ -9830,6 +9835,9 @@ cat >>conftest.$ac_ext <<_ACEOF + + #include + #include ++#include ++#include ++#include + void foo(const char *format, ...) { + va_list ap; + int len; +@@ -9844,7 +9852,7 @@ void foo(const char *format, ...) { + + exit(0); + } +-main() { foo("hello"); } ++int main(void) { foo("hello"); } + + _ACEOF + rm -f conftest$ac_exeext +@@ -9900,7 +9908,7 @@ cat >>conftest.$ac_ext <<_ACEOF + #include + #include + #include +-main() { ++int main(void) { + struct stat st; + char tpl[20]="/tmp/test.XXXXXX"; + int fd = mkstemp(tpl); +@@ -9965,10 +9973,11 @@ cat >>conftest.$ac_ext <<_ACEOF + #include + #include + #include +-main() { struct in_addr ip; ip.s_addr = 0x12345678; ++#include ++int main(void) { struct in_addr ip; ip.s_addr = 0x12345678; + if (strcmp(inet_ntoa(ip),"18.52.86.120") && +- strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(1); } +-exit(0);} ++ strcmp(inet_ntoa(ip),"120.86.52.18")) { return 1; } ++return 0;} + _ACEOF + rm -f conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +@@ -10024,8 +10033,8 @@ cat >>conftest.$ac_ext <<_ACEOF + #include + #include + #include +-main() { struct in_addr ip; +-if (inet_aton("example", &ip) == 0) exit(0); exit(1);} ++int main(void) { struct in_addr ip; ++if (inet_aton("example", &ip) == 0) return 0; return 1;} + _ACEOF + rm -f conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + diff --git a/dev-perl/File-RsyncP/files/File-RsyncP-0.760.0-lto.patch b/dev-perl/File-RsyncP/files/File-RsyncP-0.760.0-lto.patch new file mode 100644 index 000000000000..752d35dfbb02 --- /dev/null +++ b/dev-perl/File-RsyncP/files/File-RsyncP-0.760.0-lto.patch @@ -0,0 +1,40 @@ +https://bugs.gentoo.org/867832 +https://rt.cpan.org/Public/Bug/Display.html?id=141822 + +From 5fb151e46ce03c960ae05405c6f6360ccb7efa6f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Fri, 18 Mar 2022 12:28:26 +0100 +Subject: [PATCH] Fix configure check with optimizing and lto-enabled GCC 12 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +After upgrading GCC to version 12 on Linux (where strlcpy() does not exist) +tests fail like this if CFLAGS="-O1 -flto=auto": + + make[1]: Entering directory '/home/test/fedora/perl-File-RsyncP/File-RsyncP-0.76/FileList' + "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- FileList.bs ../blib/arch/auto/File/RsyncP/FileList/FileList.bs 644 + PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, '../blib/lib', '../blib/arch')" t/*.t + t/exclude.t ... Can't load '/home/test/fedora/perl-File-RsyncP/File-RsyncP-0.76/FileList/../blib/arch/auto/File/RsyncP/FileList/FileList.so' for module File::RsyncP::FileList: /home/test/fedora/perl-File-RsyncP/File-RsyncP-0.76/FileList/../blib/arch/auto/File/RsyncP/FileList/FileList.so: undefined symbol: strlcpy at /usr/lib64/perl5/DynaLoader.pm line 193. + +The new compiler optimizes out a check for strlcpy() perform by +FileList/configure script. This patch changes the check to actually depend on +strlcpy() function address. That should prevent a compiler from optimizing it +out. + +CPAN RT#141822 + +Signed-off-by: Petr Písař +--- a/FileList/configure ++++ b/FileList/configure +@@ -9330,7 +9330,7 @@ char (*f) () = $ac_func; + int + main () + { +-return f != $ac_func; ++return (int)f; + ; + return 0; + } +-- +2.34.1