From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iZVCt-000609-8u for ptxdist@pengutronix.de; Tue, 26 Nov 2019 08:24:19 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1iZVCs-0002XI-Vz for ptxdist@pengutronix.de; Tue, 26 Nov 2019 08:24:19 +0100 Date: Tue, 26 Nov 2019 08:24:18 +0100 From: Michael Olbrich Message-ID: <20191126072418.sp7vae5b4jsapc6n@pengutronix.de> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [ptxdist] Toolchain for STM32MP15x List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de On Mon, Nov 25, 2019 at 05:43:01PM +0100, Guillermo Rodriguez Garcia wrote: > Hi all, > > I have setup the toolchain with the settings from my previous email > (-mcpu=cortex-a7 -mfpu=neon-vfpv4) > > When I try to build the Linux kernel I get lots of warnings about > conflicting toolchain options: > > arch/arm/kernel/elf.c:1:0: warning: switch -mcpu=cortex-a7 conflicts > with -march=armv5t switch The problem is, that the kernel tries to add it's own -march=armv7-a and I guess that causes warnings in combination with -mcpu=cortex-a7 (at least with some gcc versions). This is tested with -Werror, so it fails. The fallback is -march=armv5t ... (see arch/arm/Makefile in the kernel). You cannot use -mcpu= in the extra cflags like this. > This is with OSELAS.Toolchain-2016.06.1, using arm-v7a-linux-gnueabihf. > > I am not sure where the -march=armv5t is coming from, since this is an > arm-v7a toolchain. > > Also if I use -mcpu=cortex-a9 instead of cortex-a7, there are no warnings :-? This will have the same problem with gcc 9.x. > Can anyone sehd some light ? See above. Combining -march= with -mcpu= is not really supported and the result is undefined. I'd say, just use -mfpu=neon-vfpv4. Have you tested if -mcpu=cortex-a7 actually makes a difference? I've done some tests with some other -mcpu= values and I've not seen any real difference. Michael -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de