summaryrefslogtreecommitdiff
path: root/packages/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-07-13 07:38:03 (GMT)
committerGitHub <noreply@github.com>2017-07-13 07:38:03 (GMT)
commit45c5bb0f484cba724be2c6105801dcce9a1a82d9 (patch)
tree8fd1c8eaa2ef203009d72b6ca6348611dcc5ee1c /packages/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch
parent8f8e131d566af1f577d8fb6e62e6f121b7955472 (diff)
parentb32fcf7c1eea890a2bd3f88487f818ba241aabb1 (diff)
Merge pull request #767 from stilor/packages
Packages
Diffstat (limited to 'packages/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch')
-rw-r--r--packages/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/packages/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch
new file mode 100644
index 0000000..fdc3a60
--- /dev/null
+++ b/packages/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch
@@ -0,0 +1,49 @@
+From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001
+From: Alexey Neyman <stilor@att.net>
+Date: Wed, 8 Mar 2017 14:31:10 -0800
+Subject: [PATCH] Fix combreloc test with BSD grep
+
+The test for "-z combreloc" fails when cross-compiling on a machine
+that uses BSD grep (e.g. on macos). grep complains about empty
+subexpression and exits with non-zero status, which is interpreted
+by configure as "not found". As a result, support for "-z combreloc"
+(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC.
+
+ * configure.ac: Avoid empty subexpression in grep.
+
+Signed-off-by: Alexey Neyman <stilor@att.net>
+---
+ ChangeLog | 5 +++++
+ configure | 2 +-
+ configure.ac | 2 +-
+ 3 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index eecd0ac..0118bd1 100755
+--- a/configure
++++ b/configure
+@@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+ then
+- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then
+ libc_cv_z_combreloc=yes
+ else
+ libc_cv_z_combreloc=no
+diff --git a/configure.ac b/configure.ac
+index 4a77411..19f6d87 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without
+ dnl introducing new options this is not easily doable. Instead use a tool
+ dnl which always is cross-platform: readelf. To detect whether -z combreloc
+ dnl look for a section named .rel.dyn.
+- if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
++ if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then
+ libc_cv_z_combreloc=yes
+ else
+ libc_cv_z_combreloc=no
+--
+2.9.3
+