mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
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. While there, replace fgrep with 'grep -F', as fgrep is non-POSIX. * configure.ac: Avoid empty subexpression in grep. Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
parent
b36a65e5ca
commit
e37fc4aa68
3 changed files with 14 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2017-03-15 Alexey Neyman <stilor@att.net>
|
||||||
|
|
||||||
|
* configure.ac: Avoid empty subexpression in grep.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
2017-03-13 Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
2017-03-13 Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||||
|
|
||||||
* posix/test-errno.c (do_test): Initialize setsockopt optlen.
|
* posix/test-errno.c (do_test): Initialize setsockopt optlen.
|
||||||
|
|
8
configure
vendored
8
configure
vendored
|
@ -5804,7 +5804,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
|
||||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||||
test $ac_status = 0; }; }
|
test $ac_status = 0; }; }
|
||||||
then
|
then
|
||||||
if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
|
if $READELF -S conftest.so | grep -E '.rela?.dyn' > /dev/null; then
|
||||||
libc_cv_z_combreloc=yes
|
libc_cv_z_combreloc=yes
|
||||||
else
|
else
|
||||||
libc_cv_z_combreloc=no
|
libc_cv_z_combreloc=no
|
||||||
|
@ -6120,7 +6120,7 @@ void zero (void *x)
|
||||||
__builtin_memset (x, 0, 1000);
|
__builtin_memset (x, 0, 1000);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if { ac_try='${CC-cc} -O3 -S conftest.c -o - | fgrep "memset" > /dev/null'
|
if { ac_try='${CC-cc} -O3 -S conftest.c -o - | grep -F "memset" > /dev/null'
|
||||||
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
||||||
(eval $ac_try) 2>&5
|
(eval $ac_try) 2>&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
|
@ -6152,7 +6152,7 @@ char *foo (const char *a, const char *b)
|
||||||
return __builtin_strstr (a, b);
|
return __builtin_strstr (a, b);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if { ac_try='${CC-cc} -O3 -S conftest.c -o - | fgrep "my_strstr" > /dev/null'
|
if { ac_try='${CC-cc} -O3 -S conftest.c -o - | grep -F "my_strstr" > /dev/null'
|
||||||
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
||||||
(eval $ac_try) 2>&5
|
(eval $ac_try) 2>&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
|
@ -6511,7 +6511,7 @@ long ehdr (void) { return __ehdr_start.val; }
|
||||||
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
if $READELF -r conftest | fgrep __ehdr_start >/dev/null; then
|
if $READELF -r conftest | grep -F __ehdr_start >/dev/null; then
|
||||||
libc_cv_ehdr_start=broken
|
libc_cv_ehdr_start=broken
|
||||||
else
|
else
|
||||||
libc_cv_ehdr_start=yes
|
libc_cv_ehdr_start=yes
|
||||||
|
|
10
configure.ac
10
configure.ac
|
@ -1390,8 +1390,8 @@ dnl The following test is a bit weak. We must use a tool which can test
|
||||||
dnl cross-platform since the gcc used can be a cross compiler. Without
|
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 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 which always is cross-platform: readelf. To detect whether -z combreloc
|
||||||
dnl look for a section named .rel.dyn.
|
dnl look for a section named .rel.dyn or .rela.dyn.
|
||||||
if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
|
if $READELF -S conftest.so | grep -E '.rela?.dyn' > /dev/null; then
|
||||||
libc_cv_z_combreloc=yes
|
libc_cv_z_combreloc=yes
|
||||||
else
|
else
|
||||||
libc_cv_z_combreloc=no
|
libc_cv_z_combreloc=no
|
||||||
|
@ -1586,7 +1586,7 @@ void zero (void *x)
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
dnl
|
dnl
|
||||||
if AC_TRY_COMMAND([${CC-cc} -O3 -S conftest.c -o - | fgrep "memset" > /dev/null]);
|
if AC_TRY_COMMAND([${CC-cc} -O3 -S conftest.c -o - | grep -F "memset" > /dev/null]);
|
||||||
then
|
then
|
||||||
libc_cv_gcc_builtin_memset=no
|
libc_cv_gcc_builtin_memset=no
|
||||||
else
|
else
|
||||||
|
@ -1606,7 +1606,7 @@ char *foo (const char *a, const char *b)
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
dnl
|
dnl
|
||||||
if AC_TRY_COMMAND([${CC-cc} -O3 -S conftest.c -o - | fgrep "my_strstr" > /dev/null]);
|
if AC_TRY_COMMAND([${CC-cc} -O3 -S conftest.c -o - | grep -F "my_strstr" > /dev/null]);
|
||||||
then
|
then
|
||||||
libc_cv_gcc_builtin_redirection=yes
|
libc_cv_gcc_builtin_redirection=yes
|
||||||
else
|
else
|
||||||
|
@ -1747,7 +1747,7 @@ typedef struct {
|
||||||
extern const Ehdr __ehdr_start __attribute__ ((visibility ("hidden")));
|
extern const Ehdr __ehdr_start __attribute__ ((visibility ("hidden")));
|
||||||
long ehdr (void) { return __ehdr_start.val; }
|
long ehdr (void) { return __ehdr_start.val; }
|
||||||
])],
|
])],
|
||||||
[if $READELF -r conftest | fgrep __ehdr_start >/dev/null; then
|
[if $READELF -r conftest | grep -F __ehdr_start >/dev/null; then
|
||||||
libc_cv_ehdr_start=broken
|
libc_cv_ehdr_start=broken
|
||||||
else
|
else
|
||||||
libc_cv_ehdr_start=yes
|
libc_cv_ehdr_start=yes
|
||||||
|
|
Loading…
Add table
Reference in a new issue