aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Lindström <henrik@lxm.se>2025-05-10 11:02:05 +0200
committerArjun Shankar <arjun@redhat.com>2025-08-27 17:14:15 +0200
commitc49a32d7eb0466544cce089cd2affab15694dc5a (patch)
tree488fedf2b2628c54542b9d443c530cc9ac57919a
parent3b2b88cceeb79f73a72367800d91599e2af4bb39 (diff)
downloadglibc-c49a32d7eb0466544cce089cd2affab15694dc5a.zip
glibc-c49a32d7eb0466544cce089cd2affab15694dc5a.tar.gz
glibc-c49a32d7eb0466544cce089cd2affab15694dc5a.tar.bz2
x86/configure: Improve portability of isa level check
wc -l pads the output with leading spaces on some systems, e.g. FreeBSD. This results in the check `test "$count" = 1` failing. Use -eq for integer comparison instead. Signed-off-by: Henrik Lindström <henrik@lxm.se> Reviewed-by: Arjun Shankar <arjun@redhat.com>
-rw-r--r--sysdeps/x86/configure2
-rw-r--r--sysdeps/x86/configure.ac2
2 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index b8583e2..a021cdb 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -66,7 +66,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -nostartfiles -nostdlib -r -o conftest c
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then
count=`LC_ALL=C $READELF -n conftest | grep NT_GNU_PROPERTY_TYPE_0 | wc -l`
- if test "$count" = 1; then
+ if test "$count" -eq 1; then
libc_cv_include_x86_isa_level=yes
fi
fi
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index 07f62d0..a87e2f6 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -57,7 +57,7 @@ EOF
libc_cv_include_x86_isa_level=no
if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -nostartfiles -nostdlib -r -o conftest conftest1.S conftest2.S); then
count=`LC_ALL=C $READELF -n conftest | grep NT_GNU_PROPERTY_TYPE_0 | wc -l`
- if test "$count" = 1; then
+ if test "$count" -eq 1; then
libc_cv_include_x86_isa_level=yes
fi
fi