]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* acinclude.m4 (grub_ASM_USCORE): Use a more accurate grep pattern,
authorColin Watson <cjwatson@ubuntu.com>
Wed, 18 Aug 2010 10:08:00 +0000 (11:08 +0100)
committerColin Watson <cjwatson@ubuntu.com>
Wed, 18 Aug 2010 10:08:00 +0000 (11:08 +0100)
to avoid false positives with some assemblers that output things
like "someprefix_func" as part of their output.

ChangeLog
acinclude.m4

index b662428bcf86356dfd7a8ad5e04b0c3fddc46d1b..d5e67639e68142a75f091276919b1d4570437f08 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-08-18  Colin Watson  <cjwatson@ubuntu.com>
+
+       * acinclude.m4 (grub_ASM_USCORE): Use a more accurate grep pattern,
+       to avoid false positives with some assemblers that output things
+       like "someprefix_func" as part of their output.
+
 2010-08-15  Robert Millan  <rmh@gnu.org>
 
        * kern/emu/misc.c (grub_get_libzfs_handle): Handle libzfs_init()
index 72483b5d0c390fa5035ba327cca7545c40a8b089..49760d5f025b61a8fec0e0d2dbd0d0f6b3434b13 100644 (file)
@@ -38,6 +38,7 @@ dnl Written by Pavel Roskin. Based on grub_ASM_EXT_C written by
 dnl Erich Boleyn and modified by Yoshinori K. Okuji.
 AC_DEFUN([grub_ASM_USCORE],
 [AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_PROG_EGREP])
 AC_MSG_CHECKING([if C symbols get an underscore after compilation])
 AC_CACHE_VAL(grub_cv_asm_uscore,
 [cat > conftest.c <<\EOF
@@ -56,7 +57,7 @@ else
   AC_MSG_ERROR([${CC-cc} failed to produce assembly code])
 fi
 
-if grep _func conftest.s >/dev/null 2>&1; then
+if $EGREP '(^|[^_[:alnum]])_func' conftest.s >/dev/null 2>&1; then
   grub_cv_asm_uscore=yes
 else
   grub_cv_asm_uscore=no