From e017871121364b67549ea00fcfebc0cb6cc99fb3 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 3 Feb 2018 12:50:17 +0100 Subject: [PATCH] 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'. --- ChangeLog | 8 ++++++++ m4/asm-underscore.m4 | 5 +++-- m4/host-cpu-c-abi.m4 | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43731aee28..2bcb82c3c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2018-02-03 Bruno Haible + + 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 malloca: Add a compile-time verification. diff --git a/m4/asm-underscore.m4 b/m4/asm-underscore.m4 index cc92534f03..58a5299c22 100644 --- a/m4/asm-underscore.m4 +++ b/m4/asm-underscore.m4 @@ -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, @@ -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. @@ -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 diff --git a/m4/host-cpu-c-abi.m4 b/m4/host-cpu-c-abi.m4 index dd7c5235b8..a467514b0b 100644 --- a/m4/host-cpu-c-abi.m4 +++ b/m4/host-cpu-c-abi.m4 @@ -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, @@ -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