Skip to content

Commit

Permalink
host-cpu-c-abi: Avoid use of 'grep -E' on OpenIndiana.
Browse files Browse the repository at this point in the history
* m4/asm-underscore.m4 (gl_ASM_SYMBOL_PREFIX): Require AC_PROG_EGREP,
and use $EGREP instead of 'grep -E'.
* m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Use 'grep' instead of
'grep -E'.
  • Loading branch information
bhaible committed Feb 3, 2018
1 parent d6a3b8f commit e017871
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2018-02-03 Bruno Haible <bruno@clisp.org>

host-cpu-c-abi: Avoid use of 'grep -E' on OpenIndiana.
* m4/asm-underscore.m4 (gl_ASM_SYMBOL_PREFIX): Require AC_PROG_EGREP,
and use $EGREP instead of 'grep -E'.
* m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Use 'grep' instead of
'grep -E'.

2018-02-02 Paul Eggert <eggert@cs.ucla.edu>

malloca: Add a compile-time verification.
Expand Down
5 changes: 3 additions & 2 deletions m4/asm-underscore.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# asm-underscore.m4 serial 3
# asm-underscore.m4 serial 4
dnl Copyright (C) 2010-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
Expand All @@ -14,6 +14,7 @@ dnl From Bruno Haible. Based on as-underscore.m4 in GNU clisp.

AC_DEFUN([gl_ASM_SYMBOL_PREFIX],
[
AC_REQUIRE([AC_PROG_EGREP])
dnl We don't use GCC's __USER_LABEL_PREFIX__ here, because
dnl 1. It works only for GCC.
dnl 2. It is incorrectly defined on some platforms, in some GCC versions.
Expand All @@ -29,7 +30,7 @@ int foo(void) { return 0; }
EOF
# Look for the assembly language name in the .s file.
AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1
if LC_ALL=C grep -E '(^|[[^a-zA-Z0-9_]])_foo([[^a-zA-Z0-9_]]|$)' conftest.$gl_asmext >/dev/null; then
if LC_ALL=C $EGREP '(^|[[^a-zA-Z0-9_]])_foo([[^a-zA-Z0-9_]]|$)' conftest.$gl_asmext >/dev/null; then
gl_cv_prog_as_underscore=yes
else
gl_cv_prog_as_underscore=no
Expand Down
4 changes: 2 additions & 2 deletions m4/host-cpu-c-abi.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# host-cpu-c-abi.m4 serial 8
# host-cpu-c-abi.m4 serial 9
dnl Copyright (C) 2002-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
Expand Down Expand Up @@ -135,7 +135,7 @@ changequote([,])dnl
echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
# Look for a reference to the register d0 in the .s file.
AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1
if LC_ALL=C grep -E 'd0,' conftest.$gl_asmext >/dev/null; then
if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
gl_cv_host_cpu_c_abi=armhf
else
gl_cv_host_cpu_c_abi=arm
Expand Down

0 comments on commit e017871

Please sign in to comment.