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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E9D1E158086 for ; Fri, 22 Oct 2021 18:46:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4727CE0844; Fri, 22 Oct 2021 18:46:55 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D8F42E0844 for ; Fri, 22 Oct 2021 18:46:54 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7CD8734303B for ; Fri, 22 Oct 2021 18:46:53 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 224CE132 for ; Fri, 22 Oct 2021 18:46:52 +0000 (UTC) From: "Mike Gilbert" 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 Gilbert" Message-ID: <1634928408.826471502e24d5d22731fe07558260551c802d4c.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/rsync/, net-misc/rsync/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/rsync/files/rsync-3.2.3-cross.patch net-misc/rsync/rsync-3.2.3-r4.ebuild net-misc/rsync/rsync-9999.ebuild X-VCS-Directories: net-misc/rsync/files/ net-misc/rsync/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 826471502e24d5d22731fe07558260551c802d4c X-VCS-Branch: master Date: Fri, 22 Oct 2021 18:46:52 +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: 31fe780e-6f85-451e-b014-8b65fddab4db X-Archives-Hash: d1cc5d683bbe40e05bddd13ffb7ed642 commit: 826471502e24d5d22731fe07558260551c802d4c Author: Mike Gilbert gentoo org> AuthorDate: Fri Oct 22 18:43:49 2021 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Fri Oct 22 18:46:48 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82647150 net-misc/rsync: backport cross-compile fixes Closes: https://bugs.gentoo.org/732084 Closes: https://github.com/gentoo/gentoo/pull/22354 Closes: https://github.com/gentoo/gentoo/pull/22667 Signed-off-by: Mike Gilbert gentoo.org> net-misc/rsync/files/rsync-3.2.3-cross.patch | 107 +++++++++++++++++++++++++++ net-misc/rsync/rsync-3.2.3-r4.ebuild | 52 ++++--------- net-misc/rsync/rsync-9999.ebuild | 5 -- 3 files changed, 122 insertions(+), 42 deletions(-) diff --git a/net-misc/rsync/files/rsync-3.2.3-cross.patch b/net-misc/rsync/files/rsync-3.2.3-cross.patch new file mode 100644 index 00000000000..1f23627853b --- /dev/null +++ b/net-misc/rsync/files/rsync-3.2.3-cross.patch @@ -0,0 +1,107 @@ +From 9f9240b661c5f381831b62d72b6ea928a91ff43a Mon Sep 17 00:00:00 2001 +From: Wayne Davison +Date: Thu, 3 Sep 2020 10:07:36 -0700 +Subject: [PATCH] Set CXX_OK=no when cross compiling. + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 64d2e6d6..109546a6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -233,7 +233,7 @@ __attribute__ ((target("ssse3"))) void more_testing(char* buf, int len) + in8_2 = _mm_lddqu_si128((__m128i_u*)&buf[i + 16]); + } + } +-]], [[if (test_ssse3(42) != 42 || test_sse2(42) != 42 || test_avx2(42) != 42) exit(1);]])],[CXX_OK=yes],[CXX_OK=no]) ++]], [[if (test_ssse3(42) != 42 || test_sse2(42) != 42 || test_avx2(42) != 42) exit(1);]])],[CXX_OK=yes],[CXX_OK=no],[CXX_OK=no]) + AC_LANG(C) + if test x"$CXX_OK" = x"yes"; then + # AC_MSG_RESULT() is called below. +From 7eb59a9152a2ace7bc7858e9915c671b3ab54344 Mon Sep 17 00:00:00 2001 +From: Wayne Davison +Date: Tue, 22 Sep 2020 17:19:45 -0700 +Subject: [PATCH] Change from $build_cpu to $host_cpu as edo1 suggested. + +--- + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 109546a6..e8c06f42 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -211,7 +211,7 @@ CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-g //'` + + if test x"$enable_simd" != x"no"; then + # For x86-64 SIMD, g++ >=5 or clang++ >=7 is required +- if test x"$build_cpu" = x"x86_64"; then ++ if test x"$host_cpu" = x"x86_64"; then + AC_LANG(C++) + AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include + #include +@@ -283,8 +283,8 @@ AC_ARG_ENABLE(asm, + AS_HELP_STRING([--disable-asm],[disable ASM optimizations])) + + if test x"$enable_asm" != x"no"; then +- if test x"$build_cpu" = x"x86_64"; then +- ASM="$build_cpu" ++ if test x"$host_cpu" = x"x86_64"; then ++ ASM="$host_cpu" + elif test x"$enable_asm" = x"yes"; then + AC_MSG_RESULT(unavailable) + AC_MSG_ERROR(The ASM optimizations are currently x86_64 only. +From b7fab6f285ff0ff3816b109a8c3131b6ded0b484 Mon Sep 17 00:00:00 2001 +From: edo +Date: Wed, 7 Oct 2020 08:33:57 +0300 +Subject: [PATCH] Allow cross-compilation with SIMD (x86_84) (#104) + +Replace runtime SIMD check with a compile-only test in case of +cross-compilation. + +You can still use '--enable-simd=no' to build x86_64 code without +SIMD instructions. +--- + configure.ac | 20 +++++++++++++------- + 1 file changed, 13 insertions(+), 7 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 3fd7e5d5..e469981b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -208,12 +208,7 @@ AC_ARG_ENABLE(simd, + + # Clag is crashing with -g -O2, so we'll get rid of -g for now. + CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-g //'` +- +-if test x"$enable_simd" != x"no"; then +- # For x86-64 SIMD, g++ >=5 or clang++ >=7 is required +- if test x"$host_cpu" = x"x86_64"; then +- AC_LANG(C++) +- AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include ++m4_define(SIMD_X86_64_TEST, [[#include + #include + __attribute__ ((target("default"))) int test_ssse3(int x) { return x; } + __attribute__ ((target("default"))) int test_sse2(int x) { return x; } +@@ -233,7 +228,18 @@ __attribute__ ((target("ssse3"))) void more_testing(char* buf, int len) + in8_2 = _mm_lddqu_si128((__m128i_u*)&buf[i + 16]); + } + } +-]], [[if (test_ssse3(42) != 42 || test_sse2(42) != 42 || test_avx2(42) != 42) exit(1);]])],[CXX_OK=yes],[CXX_OK=no],[CXX_OK=no]) ++]]) ++ ++if test x"$enable_simd" != x"no"; then ++ # For x86-64 SIMD, g++ >=5 or clang++ >=7 is required ++ if test x"$host_cpu" = x"x86_64"; then ++ AC_LANG(C++) ++ if test x"$host_cpu" = x"$build_cpu"; then ++ AC_RUN_IFELSE([AC_LANG_PROGRAM([SIMD_X86_64_TEST],[[if (test_ssse3(42) != 42 || test_sse2(42) != 42 || test_avx2(42) != 42) exit(1);]])], ++ [CXX_OK=yes],[CXX_OK=no]) ++ else ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([SIMD_X86_64_TEST])],[CXX_OK=yes],[CXX_OK=no]) ++ fi + AC_LANG(C) + if test x"$CXX_OK" = x"yes"; then + # AC_MSG_RESULT() is called below. diff --git a/net-misc/rsync/rsync-3.2.3-r4.ebuild b/net-misc/rsync/rsync-3.2.3-r4.ebuild index 34c869e7619..4e5df492e3f 100644 --- a/net-misc/rsync/rsync-3.2.3-r4.ebuild +++ b/net-misc/rsync/rsync-3.2.3-r4.ebuild @@ -3,24 +3,21 @@ EAPI=7 -inherit prefix systemd toolchain-funcs +if [[ ${PV} != 3.2.3 ]]; then + # Make sure we revert the autotools hackery applied in 3.2.3. + die "Please use rsync-9999.ebuild as a basis for version bumps" +fi + +WANT_LIBTOOL=none + +inherit autotools prefix systemd toolchain-funcs DESCRIPTION="File transfer program to keep remote files into sync" HOMEPAGE="https://rsync.samba.org/" -if [[ "${PV}" == *9999 ]] ; then - PYTHON_COMPAT=( python3_{6,7,8} ) - inherit autotools git-r3 python-any-r1 - EGIT_REPO_URI="https://github.com/WayneD/rsync.git" -else - if [[ "${PV}" == *_pre* ]] ; then - SRC_DIR="src-previews" - else - SRC_DIR="src" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - fi - SRC_URI="https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz" - S="${WORKDIR}/${P/_/}" -fi +SRC_DIR="src" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +SRC_URI="https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz" +S="${WORKDIR}/${P/_/}" LICENSE="GPL-3" SLOT="0" @@ -37,28 +34,14 @@ RDEPEND="acl? ( virtual/acl ) iconv? ( virtual/libiconv )" DEPEND="${RDEPEND}" -if [[ "${PV}" == *9999 ]] ; then - BDEPEND="${PYTHON_DEPS} - $(python_gen_any_dep ' - dev-python/commonmark[${PYTHON_USEDEP}] - ')" -fi - -# Only required for live ebuild -python_check_deps() { - has_version "dev-python/commonmark[${PYTHON_USEDEP}]" -} - src_prepare() { local PATCHES=( "${FILESDIR}/rsync-3.2.3-glibc-lchmod.patch" + "${FILESDIR}/rsync-3.2.3-cross.patch" ) default - if [[ "${PV}" == *9999 ]] ; then - eaclocal -I m4 - eautoconf -o configure.sh - eautoheader && touch config.h.in - fi + eautoconf -o configure.sh + touch config.h.in || die } src_configure() { @@ -76,11 +59,6 @@ src_configure() { $(use_enable zstd) ) - if tc-is-cross-compiler; then - # configure check is broken when cross-compiling. - myeconfargs+=( --disable-simd ) - fi - econf "${myeconfargs[@]}" } diff --git a/net-misc/rsync/rsync-9999.ebuild b/net-misc/rsync/rsync-9999.ebuild index a0178f21af5..6b09d3b0e99 100644 --- a/net-misc/rsync/rsync-9999.ebuild +++ b/net-misc/rsync/rsync-9999.ebuild @@ -73,11 +73,6 @@ src_configure() { $(use_enable zstd) ) - if tc-is-cross-compiler; then - # configure check is broken when cross-compiling. - myeconfargs+=( --disable-simd ) - fi - econf "${myeconfargs[@]}" }