valgrind: fix mips64 compile
authorPeter Seiderer <ps.report@gmx.net>
Thu, 8 Nov 2018 23:08:14 +0000 (00:08 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 28 Nov 2018 14:23:57 +0000 (15:23 +0100)
Disable gcc march mips64r2 detection (use compile flags already
set by buildroot only), avoids double setting like '-march=mips64
... -march=mips64r2 -mabi=64'.

Fixes [1]:

  error: '-mips64r2' conflicts with the other architecture options, which specify a mips64 processor

[1] http://autobuild.buildroot.net/results/34f6e2352f1559f98c724fe5394db0035b42ddb1

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/valgrind/0003-configure.ac-disable-gcc-march-mips64r2-detection.patch [new file with mode: 0644]
package/valgrind/valgrind.mk

diff --git a/package/valgrind/0003-configure.ac-disable-gcc-march-mips64r2-detection.patch b/package/valgrind/0003-configure.ac-disable-gcc-march-mips64r2-detection.patch
new file mode 100644 (file)
index 0000000..a5573d5
--- /dev/null
@@ -0,0 +1,49 @@
+From 1fd5a3d2adf04bad6ae6e9eef9caead7d46d9307 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Thu, 8 Nov 2018 23:55:30 +0100
+Subject: [PATCH] configure.ac: disable gcc march mips64r2 detection
+
+Disable gcc march mips64r2 detection, compile flags already
+set by buildroot, fixes [1]:
+
+  error: '-mips64r2' conflicts with the other architecture options, which specify a mips64 processor
+
+[1] http://autobuild.buildroot.net/results/34f6e2352f1559f98c724fe5394db0035b42ddb1
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+[Thomas: remove code instead of commenting it]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+---
+ configure.ac | 15 ---------------
+ 1 file changed, 15 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 289514ff1..18cf97ffe 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1768,22 +1768,7 @@ case "${host_cpu}" in
+         AC_SUBST(FLAG_M32)
+-        # does this compiler support -march=mips64r2 (mips64r2 default) ?
+-        AC_MSG_CHECKING([if gcc accepts -march=mips64r2 -mabi=64])
+-
+-        safe_CFLAGS=$CFLAGS
+-        CFLAGS="$CFLAGS -march=mips64r2 -mabi=64 -Werror"
+-
+-        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+-          return 0;
+-        ]])], [
+-        FLAG_M64="-march=mips64r2 -mabi=64"
+-        AC_MSG_RESULT([yes])
+-        ], [
+         FLAG_M64=""
+-        AC_MSG_RESULT([no])
+-        ])
+-        CFLAGS=$safe_CFLAGS
+         AC_SUBST(FLAG_M64)
+         ;;
+-- 
+2.19.1
+
index 459de4907ea0574c454ff928f5b5982f9f6e4b94..cae14f79b9d0e63920e05f6a3795ebbd38b5b4ba 100644 (file)
@@ -13,6 +13,9 @@ VALGRIND_CONF_OPTS = \
        --disable-ubsan \
        --without-mpicc
 VALGRIND_INSTALL_STAGING = YES
+# Patch 0003-configure.ac-disable-gcc-march-mips64r2-detection.patch
+# touches configure.ac
+VALGRIND_AUTORECONF = YES
 
 # Valgrind must be compiled with no stack protection, so forcefully
 # pass -fno-stack-protector to override what Buildroot may have in