summaryrefslogtreecommitdiffstats
path: root/package/glibc
diff options
context:
space:
mode:
authorArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>2017-08-10 00:32:51 +0200
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>2017-08-10 00:32:51 +0200
commit4c5b02e57116452fce1b8428a7040554f3a350d7 (patch)
treee594c5a9f08ce34d161ffd024c2af37a1ac2612b /package/glibc
parent72e89edfcb9821121a2785ddf193a1d836ae0b8f (diff)
parent128a16aceeb43d7d22b10c6845f7c4d09439e031 (diff)
downloadbuildroot-4c5b02e57116452fce1b8428a7040554f3a350d7.tar.gz
buildroot-4c5b02e57116452fce1b8428a7040554f3a350d7.zip
Merge branch 'master' into next
This is in preparation of bumping the stella package, which is also modified in master.
Diffstat (limited to 'package/glibc')
-rw-r--r--package/glibc/0005-fix-binutils-2-29-build.patch65
-rw-r--r--package/glibc/0006-i686-Add-missing-IS_IN-libc-guards-to-vectorized-strcspn.patch47
2 files changed, 112 insertions, 0 deletions
diff --git a/package/glibc/0005-fix-binutils-2-29-build.patch b/package/glibc/0005-fix-binutils-2-29-build.patch
new file mode 100644
index 0000000000..47fcd2f84e
--- /dev/null
+++ b/package/glibc/0005-fix-binutils-2-29-build.patch
@@ -0,0 +1,65 @@
+From: H.J. Lu <hjl.tools@gmail.com>
+Date: Fri, 23 Jun 2017 21:38:46 +0000 (-0700)
+Subject: Avoid .symver on common symbols [BZ #21666]
+X-Git-Tag: glibc-2.26~241
+X-Git-Url: https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff_plain;h=388b4f1a02f3a801965028bbfcd48d905638b797
+
+Avoid .symver on common symbols [BZ #21666]
+
+The .symver directive on common symbol just creates a new common symbol,
+not an alias and the newer assembler with the bug fix for
+
+https://sourceware.org/bugzilla/show_bug.cgi?id=21661
+
+will issue an error. Before the fix, we got
+
+$ readelf -sW libc.so | grep "loc[12s]"
+ 5109: 00000000003a0608 8 OBJECT LOCAL DEFAULT 36 loc1
+ 5188: 00000000003a0610 8 OBJECT LOCAL DEFAULT 36 loc2
+ 5455: 00000000003a0618 8 OBJECT LOCAL DEFAULT 36 locs
+ 6575: 00000000003a05f0 8 OBJECT GLOBAL DEFAULT 36 locs@GLIBC_2.2.5
+ 7156: 00000000003a05f8 8 OBJECT GLOBAL DEFAULT 36 loc1@GLIBC_2.2.5
+ 7312: 00000000003a0600 8 OBJECT GLOBAL DEFAULT 36 loc2@GLIBC_2.2.5
+
+in libc.so. The versioned loc1, loc2 and locs have the wrong addresses.
+After the fix, we got
+
+$ readelf -sW libc.so | grep "loc[12s]"
+ 6570: 000000000039e3b8 8 OBJECT GLOBAL DEFAULT 34 locs@GLIBC_2.2.5
+ 7151: 000000000039e3c8 8 OBJECT GLOBAL DEFAULT 34 loc1@GLIBC_2.2.5
+ 7307: 000000000039e3c0 8 OBJECT GLOBAL DEFAULT 34 loc2@GLIBC_2.2.5
+
+ [BZ #21666]
+ * misc/regexp.c (loc1): Add __attribute__ ((nocommon));
+ (loc2): Likewise.
+ (locs): Likewise.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+[Backported from upstream commit
+388b4f1a02f3a801965028bbfcd48d905638b797, to fix the build with
+binutils 2.29.]
+---
+diff --git a/misc/regexp.c b/misc/regexp.c
+index 19d76c0..eaea7c3 100644
+--- a/misc/regexp.c
++++ b/misc/regexp.c
+@@ -29,14 +29,15 @@
+
+ #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23)
+
+-/* Define the variables used for the interface. */
+-char *loc1;
+-char *loc2;
++/* Define the variables used for the interface. Avoid .symver on common
++ symbol, which just creates a new common symbol, not an alias. */
++char *loc1 __attribute__ ((nocommon));
++char *loc2 __attribute__ ((nocommon));
+ compat_symbol (libc, loc1, loc1, GLIBC_2_0);
+ compat_symbol (libc, loc2, loc2, GLIBC_2_0);
+
+ /* Although we do not support the use we define this variable as well. */
+-char *locs;
++char *locs __attribute__ ((nocommon));
+ compat_symbol (libc, locs, locs, GLIBC_2_0);
+
+
diff --git a/package/glibc/0006-i686-Add-missing-IS_IN-libc-guards-to-vectorized-strcspn.patch b/package/glibc/0006-i686-Add-missing-IS_IN-libc-guards-to-vectorized-strcspn.patch
new file mode 100644
index 0000000000..eebf89e599
--- /dev/null
+++ b/package/glibc/0006-i686-Add-missing-IS_IN-libc-guards-to-vectorized-strcspn.patch
@@ -0,0 +1,47 @@
+From patchwork Wed Jun 14 06:19:50 2017
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: i686: Add missing IS_IN (libc) guards to vectorized strcspn
+From: Florian Weimer <fweimer@redhat.com>
+X-Patchwork-Id: 21003
+Message-Id: <20170614061950.400FE4010728F@oldenburg.str.redhat.com>
+To: libc-alpha@sourceware.org
+Date: Wed, 14 Jun 2017 08:19:50 +0200
+
+Since commit d957c4d3fa48d685ff2726c605c988127ef99395 (i386: Compile
+rtld-*.os with -mno-sse -mno-mmx -mfpmath=387), vector intrinsics can
+no longer be used in ld.so, even if the compiled code never makes it
+into the final ld.so link. This commit adds the missing IS_IN (libc)
+guard to the SSE 4.2 strcspn implementation, so that it can be used from
+ld.so in the future.
+
+2017-06-14 Florian Weimer <fweimer@redhat.com>
+
+ * sysdeps/i386/i686/multiarch/strcspn-c.c: Add IS_IN (libc) guard.
+ * sysdeps/i386/i686/multiarch/varshift.c: Likewise.
+
+[Thomas: fixes a build issue of glibc on x86:
+sysdeps/x86_64/multiarch/varshift.h:26:1: error: SSE vector return without SSE enabled changes the ABI]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+diff --git a/sysdeps/i386/i686/multiarch/strcspn-c.c b/sysdeps/i386/i686/multiarch/strcspn-c.c
+index 6d61e19..ec230fb 100644
+--- a/sysdeps/i386/i686/multiarch/strcspn-c.c
++++ b/sysdeps/i386/i686/multiarch/strcspn-c.c
+@@ -1,2 +1,4 @@
+-#define __strcspn_sse2 __strcspn_ia32
+-#include <sysdeps/x86_64/multiarch/strcspn-c.c>
++#if IS_IN (libc)
++# define __strcspn_sse2 __strcspn_ia32
++# include <sysdeps/x86_64/multiarch/strcspn-c.c>
++#endif
+diff --git a/sysdeps/i386/i686/multiarch/varshift.c b/sysdeps/i386/i686/multiarch/varshift.c
+index 7760b96..6742a35 100644
+--- a/sysdeps/i386/i686/multiarch/varshift.c
++++ b/sysdeps/i386/i686/multiarch/varshift.c
+@@ -1 +1,3 @@
+-#include <sysdeps/x86_64/multiarch/varshift.c>
++#if IS_IN (libc)
++# include <sysdeps/x86_64/multiarch/varshift.c>
++#endif
OpenPOWER on IntegriCloud