From c878aaacadf8ec723be882f9335cb33240df13d6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 20 Apr 2017 10:11:16 -0700
Subject: [PATCH] makefiles: Drop setting -mcpu to cortex-a8 on arm
 architecture

We can not assume that all arches armv7+ are cortex-a8 only
it fails to build for rpi which is armv7ve based (cortex-a8) cpu
implementation.
Fixes
| cc1: warning: switch -mcpu=cortex-a8 conflicts with -march=armv7ve switch

Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=454346]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 helgrind/tests/Makefile.am |  6 +++---
 none/tests/arm/Makefile.am | 18 +++++++++---------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am
index 7adc5c6..cac23c9 100755
--- a/helgrind/tests/Makefile.am
+++ b/helgrind/tests/Makefile.am
@@ -226,9 +226,9 @@ if ! VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
 endif
 
 if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX
-annotate_hbefore_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8
-tc07_hbl1_CFLAGS        = $(AM_CFLAGS) -mcpu=cortex-a8
-tc08_hbl2_CFLAGS        = $(AM_CFLAGS) -mcpu=cortex-a8
+annotate_hbefore_CFLAGS = $(AM_CFLAGS)
+tc07_hbl1_CFLAGS        = $(AM_CFLAGS)
+tc08_hbl2_CFLAGS        = $(AM_CFLAGS)
 else
 annotate_hbefore_CFLAGS = $(AM_CFLAGS)
 tc07_hbl1_CFLAGS        = $(AM_CFLAGS)
diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am
index 41a5a03..a76981e 100644
--- a/none/tests/arm/Makefile.am
+++ b/none/tests/arm/Makefile.am
@@ -56,10 +56,10 @@ allexec_CFLAGS		= $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
 # need special helping w.r.t -mfpu and -mfloat-abi, though.
 # Also force -O0 since -O takes hundreds of MB of memory 
 # for v6intThumb.c.
-v6intARM_CFLAGS   = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -marm
-v6intThumb_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb
+v6intARM_CFLAGS   = $(AM_CFLAGS) -g -O0 -marm
+v6intThumb_CFLAGS = $(AM_CFLAGS) -g -O0 -mthumb
 
-v6media_CFLAGS    = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb
+v6media_CFLAGS    = $(AM_CFLAGS) -g -O0 -mthumb
 
 v8crypto_a_CFLAGS = $(AM_CFLAGS) -g -O0 -mfpu=crypto-neon-fp-armv8 -marm -march=armv8-a
 v8crypto_t_CFLAGS = $(AM_CFLAGS) -g -O0 -mfpu=crypto-neon-fp-armv8 -mthumb -march=armv8-a
@@ -74,23 +74,23 @@ v8memory_t_CFLAGS = $(AM_CFLAGS) -g -O0 \
 
 vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mfpu=neon
 
-vfp_CFLAGS        = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
+vfp_CFLAGS        = $(AM_CFLAGS) -g -O0 \
 			-mfpu=neon \
 			-mthumb
 
 
-neon128_CFLAGS    = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
+neon128_CFLAGS    = $(AM_CFLAGS) -g -O0 \
 			-mfpu=neon \
 			-mthumb
 
-neon64_CFLAGS     = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
+neon64_CFLAGS     = $(AM_CFLAGS) -g -O0 \
 			-mfpu=neon \
 			-mthumb
 
 intdiv_CFLAGS	  = $(AM_CFLAGS) -g -march=armv7ve -mcpu=cortex-a15 -mthumb
-ldrt_CFLAGS	  = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb
-ldrt_arm_CFLAGS	  = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm
+ldrt_CFLAGS	  = $(AM_CFLAGS) -g -mthumb
+ldrt_arm_CFLAGS	  = $(AM_CFLAGS) -g -marm
 
-vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mfpu=vfpv3
+vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mfpu=vfpv3
 
 vfpv4_fma_CFLAGS  = $(AM_CFLAGS) -g -O0 -march=armv7ve -mcpu=cortex-a15 -mfpu=vfpv4 -marm
