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 E01E3158020 for ; Sat, 15 Oct 2022 17:26:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 13EB5E0922; Sat, 15 Oct 2022 17:26:07 +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 EB210E0922 for ; Sat, 15 Oct 2022 17:26:06 +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 CB643340E13 for ; Sat, 15 Oct 2022 17:26:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1300375 for ; Sat, 15 Oct 2022 17:26:04 +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: <1665854727.44e7f86ff7cf80e0ec466778d82695c68a89ead1.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libxcrypt/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/libxcrypt/libxcrypt-4.4.28-r1.ebuild sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild X-VCS-Directories: sys-libs/libxcrypt/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 44e7f86ff7cf80e0ec466778d82695c68a89ead1 X-VCS-Branch: master Date: Sat, 15 Oct 2022 17:26:04 +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: c0bd45f9-2a4d-46d5-988f-6cc28a4a9bbc X-Archives-Hash: 79c07de2626bbfbf086761463dad624c commit: 44e7f86ff7cf80e0ec466778d82695c68a89ead1 Author: Adrian Ratiu collabora com> AuthorDate: Fri Oct 14 13:47:13 2022 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Sat Oct 15 17:25:27 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44e7f86f sys-libs/libxcrypt: fix binary cross compilation Even though all files are installed in the proper places when cross compiling, further testing revealed the libxcrypt binary itself is not correctly cross-complied for the target architecture, instead it is compiled for the host. Set up the proper variables to ensure the binary is built for the correct architecture. Before: libcrypt.so.2.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[xxHash]=0d041ee2539129be, stripped After: libcrypt.so.2.0.0: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[xxHash]=ba09206297aebce3, stripped Closes: https://bugs.gentoo.org/877093 Signed-off-by: Adrian Ratiu collabora.com> Closes: https://github.com/gentoo/gentoo/pull/27780 Signed-off-by: Mike Gilbert gentoo.org> sys-libs/libxcrypt/libxcrypt-4.4.28-r1.ebuild | 11 +++++++++++ sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.28-r1.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.28-r1.ebuild index c55c58c004b0..7c7340f29a7b 100644 --- a/sys-libs/libxcrypt/libxcrypt-4.4.28-r1.ebuild +++ b/sys-libs/libxcrypt/libxcrypt-4.4.28-r1.ebuild @@ -165,6 +165,7 @@ get_xcpkgconfigdir() { multilib_src_configure() { local -a myconf=( + --host=${CTARGET} --disable-werror --libdir=$(get_xclibdir) --with-pkgconfigdir=$(get_xcpkgconfigdir) @@ -196,6 +197,16 @@ multilib_src_configure() { *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";; esac + tc-export PKG_CONFIG + + if is_cross; then + if tc-is-clang; then + export CC="${CTARGET}-clang" + else + export CC="${CTARGET}-gcc" + fi + fi + ECONF_SOURCE="${S}" econf "${myconf[@]}" } diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild index 8cd9318c3373..3f390bf67ca3 100644 --- a/sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild +++ b/sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild @@ -167,6 +167,7 @@ get_xcpkgconfigdir() { multilib_src_configure() { local -a myconf=( + --host=${CTARGET} --disable-werror --libdir=$(get_xclibdir) --with-pkgconfigdir=$(get_xcpkgconfigdir) @@ -174,6 +175,16 @@ multilib_src_configure() { --mandir="$(get_xcmandir)" ) + tc-export PKG_CONFIG + + if is_cross; then + if tc-is-clang; then + export CC="${CTARGET}-clang" + else + export CC="${CTARGET}-gcc" + fi + fi + if use elibc_musl; then # musl declares getcontext and swapcontext in ucontext.h, # but does not implement them in libc.