From patchwork Thu Sep 8 01:17:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Zacarias X-Patchwork-Id: 667213 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sV2Wk25dXz9s5g for ; Thu, 8 Sep 2016 11:17:54 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=zacarias.com.ar header.i=@zacarias.com.ar header.b=JGEdVXCC; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 488148CE10; Thu, 8 Sep 2016 01:17:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1pYXNyzEUT9l; Thu, 8 Sep 2016 01:17:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 781EE8CD43; Thu, 8 Sep 2016 01:17:46 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 85DBB1C2BF9 for ; Thu, 8 Sep 2016 01:17:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7DBB18CD50 for ; Thu, 8 Sep 2016 01:17:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XwtjdkhV+OgD for ; Thu, 8 Sep 2016 01:17:42 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.zacarias.com.ar (www.zacarias.com.ar [176.9.42.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id 3B0108CB9F for ; Thu, 8 Sep 2016 01:17:41 +0000 (UTC) Received: from asgard (cpe-190-55-196-87.telecentro-reversos.com.ar [190.55.196.87] (may be forged)) (authenticated bits=0) by www.zacarias.com.ar (8.15.2/8.15.2) with ESMTPSA id u881HYT4019951 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 8 Sep 2016 01:17:37 GMT DMARC-Filter: OpenDMARC Filter v1.3.1 www.zacarias.com.ar u881HYT4019951 Authentication-Results: zacarias.com.ar; dmarc=fail header.from=zacarias.com.ar Authentication-Results: zacarias.com.ar; spf=pass smtp.mailfrom=gustavo@zacarias.com.ar DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zacarias.com.ar; s=dkey; t=1473297459; bh=CKMYz+MTUSum7GsgZFl3A7oRw2lTQbhRngO5igd4LMA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=JGEdVXCCo+0y8W6i+OFr37i4CcndGveqwOrRUBCdy0m5jpeFhIKT/f0rdk430sbr3 GcCQQfuhO6a7yWVTdY7NNT2rP1+N0d/CbryZ42ZvJ6bEUqyy9lOTgiBI94hJ0ND8EE QEemVg45hLqRRUpL/AbgO51nJ6jp+q7Enhxx7hFw= Received: by asgard (sSMTP sendmail emulation); Wed, 07 Sep 2016 22:17:34 -0300 From: Gustavo Zacarias To: buildroot@busybox.net Date: Wed, 7 Sep 2016 22:17:25 -0300 Message-Id: <1473297447-8804-2-git-send-email-gustavo@zacarias.com.ar> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1473297447-8804-1-git-send-email-gustavo@zacarias.com.ar> References: <1473297447-8804-1-git-send-email-gustavo@zacarias.com.ar> X-Virus-Scanned: clamav-milter 0.99 at www X-Virus-Status: Clean Subject: [Buildroot] [PATCH 2/4] glibc: add FTBFS fix patch for recent binutils X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827477 Signed-off-by: Gustavo Zacarias --- .../2.22/0004-fix-FTBFS-recent-binutils.patch | 67 ++++++++++++++++++++++ .../2.23/0003-fix-FTBFS-recent-binutils.patch | 67 ++++++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 package/glibc/2.22/0004-fix-FTBFS-recent-binutils.patch create mode 100644 package/glibc/2.23/0003-fix-FTBFS-recent-binutils.patch diff --git a/package/glibc/2.22/0004-fix-FTBFS-recent-binutils.patch b/package/glibc/2.22/0004-fix-FTBFS-recent-binutils.patch new file mode 100644 index 0000000..598dda8 --- /dev/null +++ b/package/glibc/2.22/0004-fix-FTBFS-recent-binutils.patch @@ -0,0 +1,67 @@ +With recent binutils versions the GNU libc fails to build on at least +MISP and SPARC, with this kind of error: + + /home/aurel32/glibc/glibc-build/nptl/libpthread.so:(*IND*+0x0): multiple definition of `vfork@GLIBC_2.0' + /home/aurel32/glibc/glibc-build/nptl/libpthread.so::(.text+0xee50): first defined here + +It appears that on these architectures pt-vfork.S includes vfork.S +(through the alpha version of pt-vfork.S) and that the __vfork aliases +are not conditionalized on IS_IN (libc) like on other architectures. +Therefore the aliases are also wrongly included in libpthread.so. + +Fix this by properly conditionalizing the aliases like on other +architectures. + +Changelog: + * sysdeps/unix/sysv/linux/mips/vfork.S (__vfork): Conditionalize + hidden_def, weak_alias and strong_alias on [IS_IN (libc)]. + * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise. + +Signed-off-by: Gustavo Zacarias +--- +From: https://sourceware.org/ml/libc-alpha/2016-06/msg00660.html +Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827477 +Removed ChangeLog changes to de-debianize the patch. + +diff --git a/sysdeps/unix/sysv/linux/mips/vfork.S b/sysdeps/unix/sysv/linux/mips/vfork.S +index 8c66151..c0c0ce6 100644 +--- a/sysdeps/unix/sysv/linux/mips/vfork.S ++++ b/sysdeps/unix/sysv/linux/mips/vfork.S +@@ -106,6 +106,8 @@ L(error): + #endif + END(__vfork) + ++#if IS_IN (libc) + libc_hidden_def(__vfork) + weak_alias (__vfork, vfork) + strong_alias (__vfork, __libc_vfork) ++#endif +diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S b/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S +index dc32e0a..94f2c8d 100644 +--- a/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S ++++ b/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S +@@ -44,6 +44,8 @@ ENTRY(__vfork) + nop + END(__vfork) + ++#if IS_IN (libc) + libc_hidden_def (__vfork) + weak_alias (__vfork, vfork) + strong_alias (__vfork, __libc_vfork) ++#endif +diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S b/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S +index 05be3c2..a7479e9 100644 +--- a/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S ++++ b/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S +@@ -44,6 +44,8 @@ ENTRY(__vfork) + nop + END(__vfork) + ++#if IS_IN (libc) + libc_hidden_def (__vfork) + weak_alias (__vfork, vfork) + strong_alias (__vfork, __libc_vfork) ++#endif +-- +2.8.1 diff --git a/package/glibc/2.23/0003-fix-FTBFS-recent-binutils.patch b/package/glibc/2.23/0003-fix-FTBFS-recent-binutils.patch new file mode 100644 index 0000000..598dda8 --- /dev/null +++ b/package/glibc/2.23/0003-fix-FTBFS-recent-binutils.patch @@ -0,0 +1,67 @@ +With recent binutils versions the GNU libc fails to build on at least +MISP and SPARC, with this kind of error: + + /home/aurel32/glibc/glibc-build/nptl/libpthread.so:(*IND*+0x0): multiple definition of `vfork@GLIBC_2.0' + /home/aurel32/glibc/glibc-build/nptl/libpthread.so::(.text+0xee50): first defined here + +It appears that on these architectures pt-vfork.S includes vfork.S +(through the alpha version of pt-vfork.S) and that the __vfork aliases +are not conditionalized on IS_IN (libc) like on other architectures. +Therefore the aliases are also wrongly included in libpthread.so. + +Fix this by properly conditionalizing the aliases like on other +architectures. + +Changelog: + * sysdeps/unix/sysv/linux/mips/vfork.S (__vfork): Conditionalize + hidden_def, weak_alias and strong_alias on [IS_IN (libc)]. + * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise. + +Signed-off-by: Gustavo Zacarias +--- +From: https://sourceware.org/ml/libc-alpha/2016-06/msg00660.html +Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827477 +Removed ChangeLog changes to de-debianize the patch. + +diff --git a/sysdeps/unix/sysv/linux/mips/vfork.S b/sysdeps/unix/sysv/linux/mips/vfork.S +index 8c66151..c0c0ce6 100644 +--- a/sysdeps/unix/sysv/linux/mips/vfork.S ++++ b/sysdeps/unix/sysv/linux/mips/vfork.S +@@ -106,6 +106,8 @@ L(error): + #endif + END(__vfork) + ++#if IS_IN (libc) + libc_hidden_def(__vfork) + weak_alias (__vfork, vfork) + strong_alias (__vfork, __libc_vfork) ++#endif +diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S b/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S +index dc32e0a..94f2c8d 100644 +--- a/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S ++++ b/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S +@@ -44,6 +44,8 @@ ENTRY(__vfork) + nop + END(__vfork) + ++#if IS_IN (libc) + libc_hidden_def (__vfork) + weak_alias (__vfork, vfork) + strong_alias (__vfork, __libc_vfork) ++#endif +diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S b/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S +index 05be3c2..a7479e9 100644 +--- a/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S ++++ b/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S +@@ -44,6 +44,8 @@ ENTRY(__vfork) + nop + END(__vfork) + ++#if IS_IN (libc) + libc_hidden_def (__vfork) + weak_alias (__vfork, vfork) + strong_alias (__vfork, __libc_vfork) ++#endif +-- +2.8.1