From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755495AbdKNOK7 (ORCPT ); Tue, 14 Nov 2017 09:10:59 -0500 Received: from bin-mail-out-06.binero.net ([195.74.38.229]:45150 "EHLO bin-vsp-out-02.atm.binero.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755018AbdKNOKx (ORCPT ); Tue, 14 Nov 2017 09:10:53 -0500 X-Halon-ID: c2f13789-c944-11e7-96ab-005056917f90 Authorized-sender: andreas@gaisler.com From: Andreas Larsson To: David Miller , sparclinux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, software@gaisler.com Subject: [PATCH 1/2] sparc32,leon: Build with -mcpu=leon3 for SPARC_LEON Date: Tue, 14 Nov 2017 15:03:42 +0100 Message-Id: <1510668223-18484-2-git-send-email-andreas@gaisler.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1510668223-18484-1-git-send-email-andreas@gaisler.com> References: <1510668223-18484-1-git-send-email-andreas@gaisler.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Apart from using LEON3 instruction timing it allows for usage of the CASA instruction. Signed-off-by: Andreas Larsson --- arch/sparc/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index 8496a07..673ee73 100644 --- a/arch/sparc/Makefile +++ b/arch/sparc/Makefile @@ -24,14 +24,20 @@ LDFLAGS := -m elf32_sparc export BITS := 32 UTS_MACHINE := sparc +ifeq ($(CONFIG_SPARC_LEON),y) +SPARC_MCPU=leon3 +else +SPARC_MCPU=v8 +endif + # We are adding -Wa,-Av8 to KBUILD_CFLAGS to deal with a specs bug in some # versions of gcc. Some gcc versions won't pass -Av8 to binutils when you # give -mcpu=v8. This silently worked with older bintutils versions but # does not any more. -KBUILD_CFLAGS += -m32 -mcpu=v8 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 +KBUILD_CFLAGS += -m32 -mcpu=$(SPARC_MCPU) -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 KBUILD_CFLAGS += -Wa,-Av8 -KBUILD_AFLAGS += -m32 -Wa,-Av8 +KBUILD_AFLAGS += -m32 -mcpu=$(SPARC_MCPU) -Wa,-Av8 else ##### -- 2.8.0