]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
mips: fix configure issue with specific paths
authorPetar Jovanovic <mips32r2@gmail.com>
Wed, 6 Nov 2019 16:55:11 +0000 (16:55 +0000)
committerPetar Jovanovic <mips32r2@gmail.com>
Wed, 6 Nov 2019 16:55:11 +0000 (16:55 +0000)
If configure is invoked with e.g.

CFLAGS='--sysroot=/workspace/linux-mips64/sysroot -mabi=64'

flags FLAG_M32 and FLAG_M64 are not set, because the grep search in
configure.ac mismatches the mips keyword in the path.

Update the grep patterns to anchor on non-word boundaries.

This fixes KDE #412344.

Patch by Chris Packham.

NEWS
configure.ac

diff --git a/NEWS b/NEWS
index e53bc625569a92b2382434100c10e81346e44e3f..0de69ee493df51699adbc259a96ca4e61a327b0f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -82,6 +82,7 @@ where XXXXXX is the bug number as listed below.
 409367  exit_group() after signal to thread waiting in futex() causes hangs
 410599  Non-deterministic behaviour of pth_self_kill_15_other test
 411134  Allow the user to change a set of command line options during execution
+412344  Problem setting mips flags with specific paths
 413603  callgrind_annotate/cg_annotate truncate function names at '#'
 
 n-i-bz  Fix minor one time leaks in dhat.
index 29b88f7cc719593d63affb96bf0805132337cb39..ca9961af538cd6839caca600c2d640216eea870c 100755 (executable)
@@ -1772,7 +1772,7 @@ AM_CONDITIONAL(HAVE_NR_MEMBARRIER, [test x$ac_have_nr_membarrier = xyes])
 
 case "${host_cpu}" in
     mips*)
-        ARCH=$(echo "$CFLAGS" | grep -E -e '-march=@<:@^ @:>@+' -e '-mips@<:@^ +@:>@')
+        ARCH=$(echo "$CFLAGS" | grep -E -e '-march=@<:@^ @:>@+' -e '\B-mips@<:@^ +@:>@')
         if test -z "$ARCH"; then
           # does this compiler support -march=mips32 (mips32 default) ?
           AC_MSG_CHECKING([if gcc accepts -march=mips32 -mabi=32])
@@ -1857,7 +1857,7 @@ case "${host_cpu}" in
 esac
 
 
-ARCH=$(echo "$CFLAGS" | grep -E -e '-march=@<:@^ @:>@+' -e '-mips@<:@^ +@:>@')
+ARCH=$(echo "$CFLAGS" | grep -E -e '-march=@<:@^ @:>@+' -e '\B-mips@<:@^ +@:>@')
 if test -z "$ARCH"; then
   # does this compiler support -march=octeon (Cavium OCTEON I Specific) ?
   AC_MSG_CHECKING([if gcc accepts -march=octeon])