From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752148AbcAEPPu (ORCPT ); Tue, 5 Jan 2016 10:15:50 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:60479 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751660AbcAEPPs (ORCPT ); Tue, 5 Jan 2016 10:15:48 -0500 Subject: Re: arch/mips/vdso/gettimeofday.c:1:0: error: '-march=r3900' requires '-mfp32' To: Fengguang Wu References: <201601051556.2YMiXcw0%fengguang.wu@intel.com> <568B7A2A.1000608@roeck-us.net> <20160105082252.GB1421@wfg-t540p.sh.intel.com> <568BCD07.6090401@roeck-us.net> <20160105143039.GA5772@wfg-t540p.sh.intel.com> Cc: kbuild-all@01.org, "linux-kernel@vger.kernel.org" , Ralf Baechle , Alex Smith From: Guenter Roeck Message-ID: <568BDE20.1040800@roeck-us.net> Date: Tue, 5 Jan 2016 07:15:44 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20160105143039.GA5772@wfg-t540p.sh.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Fengguang, On 01/05/2016 06:30 AM, Fengguang Wu wrote: > Hi Guenter, > > On Tue, Jan 05, 2016 at 06:02:47AM -0800, Guenter Roeck wrote: >> On 01/05/2016 12:22 AM, Fengguang Wu wrote: >>> On Tue, Jan 05, 2016 at 12:09:14AM -0800, Guenter Roeck wrote: >>>> On 01/04/2016 11:23 PM, kbuild test robot wrote: >>>>> Hi Guenter, >>>>> >>>>> First bad commit (maybe != root cause): >>>>> >>>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master >>>>> head: 168309855a7d1e16db751e9c647119fe2d2dc878 >>>>> commit: 398c7500a1f5f74e207bd2edca1b1721b3cc1f1e MIPS: VDSO: Fix build error with binutils 2.24 and earlier >>>>> date: 6 days ago >>>>> config: mips-jmr3927_defconfig (attached as .config) >>>>> reproduce: >>>>> wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross >>>>> chmod +x ~/bin/make.cross >>>>> git checkout 398c7500a1f5f74e207bd2edca1b1721b3cc1f1e >>>>> # save the attached .config to linux build tree >>>>> make.cross ARCH=mips >>>>> >>>>> All errors (new ones prefixed by >>): >>>>> >>>>>>> arch/mips/vdso/gettimeofday.c:1:0: error: '-march=r3900' requires '-mfp32' >>>>> /* >>>>> ^ >>>>> >>>> AFAICS this is using the mips cross compiler version 4.9.0 from kernel.org [1], >>>> which in turn uses binutils 2.24. At least this is what make.cross tries to install. >>> >>> Oops, sorry. I'm now using the debian MIPS cross compiler 5.2.1 ... >>> make.cross has not been updated yet. >>> >> No problem. FWIW, I tested my patch with the compiler from Yocto 2.0, which >> uses gcc 5.2.0 and binutils 2.25.1, with no problem. >> >> Do you have directions on how to install a debian cross compiler into a Ubuntu system ? >> Alternatively, what version of binutils does the mips cross compiler use ? > > These are the installed version in my Debian: > > ||/ Name Version Architecture Description > +++-====================================-=======================-=======================-============================================================================= > ii gcc-5-mips-linux-gnu 5.2.1-16cross1 amd64 GNU C compiler > ii gcc-5-mipsel-linux-gnu 5.2.1-16cross1 amd64 GNU C compiler > ii binutils-mips-linux-gnu 2.25-8 amd64 GNU binary utilities, for mips-linux-gnu target > ii binutils-mipsel-linux-gnu 2.25-8 amd64 GNU binary utilities, for mipsel-linux-gnu target > > You may check if these packages are available on Ubuntu. Anyway the Unfortunately it looks like they are not available. > versions are close to yours. This is interesting, I'll do more checks. > The problem is an interesting one: Due to my patch, arch/mips/vdso/gettimeofday.c actually compiles with your toolchain (as it should, since its binutils version is >= 2.25). Previously that was not the case. In other words, my patch exposes a previously existing problem. The underlying problem seems to be that your toolchain, as the error suggests, does not support '-march=r3900' (which is set with the affected configuration) without '-mfp32'. This may be a problem only for gettimeofday.c because that file is compiled with different options than everything else. I _suspect_ the reason to be that -msoft-float and -Wa,-msoft-float are dropped from the gettimeofday compile options, but I am not sure. Ralf and/or Alex (copying) may have a better understanding of the problem. Thanks, Guenter > Thanks, > Fengguang > >>>> I downloaded it and used it to compile both the attached configuration as well >>>> as jmr3927_defconfig. Both are building just fine for me. On top of that, >>>> arch/mips/vdso/gettimeofday.c should not build in the first place with binutils 2.24 >>>> (and doesn't build for me). >>>> >>>> What am I missing ? >>>> >>>> Guenter >>>> >>>> --- >>>> [1] https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/x86_64-gcc-4.9.0-nolibc_mips-linux.tar.xz >>> >