2017-03-09 05:21:36 +00:00
|
|
|
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>
|
|
|
|
---
|
2017-12-02 20:44:39 +00:00
|
|
|
configure | 2 +-
|
|
|
|
configure.ac | 2 +-
|
|
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
2017-03-09 05:21:36 +00:00
|
|
|
|
|
|
|
--- a/configure
|
|
|
|
+++ b/configure
|
2017-12-02 20:44:39 +00:00
|
|
|
@@ -6017,7 +6017,7 @@
|
2017-03-09 05:21:36 +00:00
|
|
|
$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
|
|
|
|
--- a/configure.ac
|
|
|
|
+++ b/configure.ac
|
2017-12-02 20:44:39 +00:00
|
|
|
@@ -1391,7 +1391,7 @@
|
2017-03-09 05:21:36 +00:00
|
|
|
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
|