From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qP4LIL1t5GBxDAAAgWs5BA (envelope-from ) for ; Tue, 06 Jul 2021 16:50:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id KNzLG71t5GAYSQAAB5/wlQ (envelope-from ) for ; Tue, 06 Jul 2021 14:50:37 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 97A1C2CE88 for ; Tue, 6 Jul 2021 16:50:36 +0200 (CEST) Received: from localhost ([::1]:35066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0mP5-0003gn-0N for larch@yhetil.org; Tue, 06 Jul 2021 10:50:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0mOg-0003fc-UF for bug-guix@gnu.org; Tue, 06 Jul 2021 10:50:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38113) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0mOg-0005Hh-K7 for bug-guix@gnu.org; Tue, 06 Jul 2021 10:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m0mOg-0006lE-IM for bug-guix@gnu.org; Tue, 06 Jul 2021 10:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#49417: glibc uses "objcopy", but seems to need "TARGET-objcopy" [core-updates] Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 06 Jul 2021 14:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49417 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxime Devos Received: via spool by 49417-submit@debbugs.gnu.org id=B49417.162558298025938 (code B ref 49417); Tue, 06 Jul 2021 14:50:02 +0000 Received: (at 49417) by debbugs.gnu.org; 6 Jul 2021 14:49:40 +0000 Received: from localhost ([127.0.0.1]:49659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0mOJ-0006kI-TZ for submit@debbugs.gnu.org; Tue, 06 Jul 2021 10:49:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0mOE-0006k1-OO for 49417@debbugs.gnu.org; Tue, 06 Jul 2021 10:49:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44598) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0mO7-0004tR-KQ; Tue, 06 Jul 2021 10:49:28 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=36628 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0mO7-0001Tq-CR; Tue, 06 Jul 2021 10:49:27 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <78028b8794cb0dca5467558c272471556833a560.camel@telenet.be> Date: Tue, 06 Jul 2021 16:49:26 +0200 In-Reply-To: <78028b8794cb0dca5467558c272471556833a560.camel@telenet.be> (Maxime Devos's message of "Mon, 05 Jul 2021 15:42:49 +0200") Message-ID: <874kd7qyyx.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 49417@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625583036; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=eEqihdSZP4G2oRZoOtRYQte2Q8t5h9fvZ1eVZlrOSOc=; b=avMkQ9SjZJIqgHKFZQnj4YKAx1ePtJRd5etD/1l4ZHJGejtIsYebyA9KKfq4Jwgkb0I38r kqrCTBsG6cydnoXow/JChcfUtvW9i0kmB3kz5elNUSBqM4EMejXuD9QFzGGs8WQOyyLlQ2 sJ9qwxQeafOc4LR7qyuOQ+KnmgKvQHSWzx8xOle1RjD75g4d0moe7l0UOpisx5eibfb8EW wS+KNpZS9xEgZ1kZ3aV2PNOkNwRF/DoiqcLRyD26tcjlIvNZ+rr2KAtkmllcdVeIkTyoku UCtu7eGjCKAF1GggHksAj5cJeTI8gFME8oaPaG1h/k6n+jEa6YKU+fGJOyCPLA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625583036; a=rsa-sha256; cv=none; b=hD3MKKASw8Mu+i+Ku92QADkDO8hKpNQ+oK4fvAyi1LxbzYKQdcjG3snacNsLfSTP77/Egp HyXpLwD3q7F7TB8c044ujyqhU5CRHY2f/B02dwECXydLGBQpcuOfN3CcSaYTIe36OB6uRZ kh9ljM77cXY+zoi8WXQt76v1Yf9DQoI5VPoKX8L0GB88wzzocJsInDkxkVGm7PiPqXVesS KxC4OwLc+Fhc8W63zz/8JLOD0SDeHhl+BUOEBAf+HgL7H2v3EtRjasxI62cQuG1Ljh1cu1 SVn4UMRkS5dWLVuwRsgHoFVjRIfx8l0bAxEZNgR1C1eGA3k/LmxX0RUXZmvvUw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.91 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 97A1C2CE88 X-Spam-Score: -2.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: QCIEGY9iDBqM --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Maxime Devos skribis: > That looks like the earlier issue we had with "objdump" vs. "TARGET-objdu= mp" ... > Maybe a similar fix is possible? Yes, indeed. The attached patch does that and fixes the issue. I=E2=80=99ll inline the patch in the =E2=80=98patches=E2=80=99 field and co= mmit that later on so as to group world rebuilds a bit. I=E2=80=99ll send it to libc-alpha too. (Initially I tried patching just sysdeps/powerpc/powerpc64/le/configure.ac but that=E2=80=99s not sufficient= .) Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index ced226ef34..82af27e0b4 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -486,6 +486,11 @@ and the cross tool chain." #:xbinutils xbinutils) (package (inherit libc) + (source (origin + (inherit (package-source glibc)) + (patches (append (origin-patches (package-source glibc)) + (list (search-patch + "glibc-powerpc64le-objcopy.patch")))))) (name (string-append "glibc-cross-" target)) (arguments (substitute-keyword-arguments diff --git a/gnu/packages/patches/glibc-powerpc64le-objcopy.patch b/gnu/packages/patches/glibc-powerpc64le-objcopy.patch new file mode 100644 index 0000000000..acdf29a02a --- /dev/null +++ b/gnu/packages/patches/glibc-powerpc64le-objcopy.patch @@ -0,0 +1,156 @@ +Use "powerpc64le-linux-gnu-objcopy" rather than "objcopy" when cross-compiling +to powerpc64le-linux-gnu: . + +diff --git a/aclocal.m4 b/aclocal.m4 +index 13a791ffde..5b370c07a2 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -118,8 +118,6 @@ AS=`$CC -print-prog-name=as` + LD=`$CC -print-prog-name=ld` + AR=`$CC -print-prog-name=ar` + AC_SUBST(AR) +-OBJCOPY=`$CC -print-prog-name=objcopy` +-AC_SUBST(OBJCOPY) + GPROF=`$CC -print-prog-name=gprof` + AC_SUBST(GPROF) + +diff --git a/configure b/configure +index fe0eda1cd5..3a08270734 100755 +--- a/configure ++++ b/configure +@@ -654,7 +654,6 @@ MAKE + LD + AS + GPROF +-OBJCOPY + AR + LN_S + INSTALL_DATA +@@ -689,6 +688,7 @@ sysheaders + ac_ct_CXX + CXXFLAGS + CXX ++OBJCOPY + OBJDUMP + READELF + CPP +@@ -3054,6 +3054,98 @@ else + OBJDUMP="$ac_cv_prog_OBJDUMP" + fi + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args. ++set dummy ${ac_tool_prefix}objcopy; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_OBJCOPY+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$OBJCOPY"; then ++ ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_OBJCOPY="${ac_tool_prefix}objcopy" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++OBJCOPY=$ac_cv_prog_OBJCOPY ++if test -n "$OBJCOPY"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5 ++$as_echo "$OBJCOPY" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_OBJCOPY"; then ++ ac_ct_OBJCOPY=$OBJCOPY ++ # Extract the first word of "objcopy", so it can be a program name with args. ++set dummy objcopy; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_OBJCOPY"; then ++ ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_OBJCOPY="objcopy" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY ++if test -n "$ac_ct_OBJCOPY"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5 ++$as_echo "$ac_ct_OBJCOPY" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_OBJCOPY" = x; then ++ OBJCOPY="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ OBJCOPY=$ac_ct_OBJCOPY ++ fi ++else ++ OBJCOPY="$ac_cv_prog_OBJCOPY" ++fi ++ + + # We need the C++ compiler only for testing. + ac_ext=cpp +@@ -4645,8 +4737,6 @@ AS=`$CC -print-prog-name=as` + LD=`$CC -print-prog-name=ld` + AR=`$CC -print-prog-name=ar` + +-OBJCOPY=`$CC -print-prog-name=objcopy` +- + GPROF=`$CC -print-prog-name=gprof` + + +diff --git a/configure.ac b/configure.ac +index 924af12738..2148cd2ec8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -53,6 +53,7 @@ AC_SUBST(cross_compiling) + AC_PROG_CPP + AC_CHECK_TOOL(READELF, readelf, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) ++AC_CHECK_TOOL(OBJCOPY, objcopy, false) + + # We need the C++ compiler only for testing. + AC_PROG_CXX --=-=-=--