From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752472AbbCJNzU (ORCPT ); Tue, 10 Mar 2015 09:55:20 -0400 Received: from mail-we0-f180.google.com ([74.125.82.180]:44260 "EHLO mail-we0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751778AbbCJNzS (ORCPT ); Tue, 10 Mar 2015 09:55:18 -0400 Date: Tue, 10 Mar 2015 14:55:11 +0100 From: Ingo Molnar To: Andy Lutomirski Cc: X86 ML , "linux-kernel@vger.kernel.org" , Steven Rostedt , Denys Vlasenko , Shuah Khan , Borislav Petkov Subject: Re: [PATCH v2] x86, selftests: Add sigreturn_32 selftest Message-ID: <20150310135511.GA26689@gmail.com> References: <31045fa9bec26b095288078f4f597799ec80b102.1425918886.git.luto@amacapital.net> <20150309164818.GC24910@gmail.com> <20150310045725.GA10473@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Andy Lutomirski wrote: > On Mon, Mar 9, 2015 at 9:57 PM, Ingo Molnar wrote: > > > > * Andy Lutomirski wrote: > > > >> On Mon, Mar 9, 2015 at 9:48 AM, Ingo Molnar wrote: > >> > > >> > now I get this build failure: > >> > > >> > make[1]: Entering directory > >> > '/home/mingo/tip/tools/testing/selftests/x86' > >> > gcc -m32 -o sigreturn_32 -O2 -g -std=gnu99 -pthread -Wall sigreturn.c -lrt -ldl > >> > In file included from /usr/include/time.h:27:0, > >> > from sigreturn.c:13: > >> > /usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory > >> > # include > >> > ^ > >> > compilation terminated. > >> > Makefile:18: recipe for target 'sigreturn_32' failed > >> > make[1]: *** [sigreturn_32] Error 1 > >> > >> It builds for me on Ubuntu. > >> > >> It looks like your 32-bit build setup is broken. The line that's > >> failing to compile is: > >> > >> #include > >> > >> Are you missing 32-bit headers? This test *can't* be run as a 64-bit binary. > > > > Yeah, was a relatively fresh testbox, the magic incantation to get it > > to build there was: > > > > apt-get install gcc-multilib libc6-i386 libc6-dev-i386 > > > > On Fedora it's: > > > > yum install glibc-devel.*i686 > > > > Might make sense to include that in a README or so. > > I could rig up the makefile to give that hint. > > Should we just say that selftests/x86 won't work if you can't build > 32-bit binaries, or should we try to degrade more gracefully? I'd suggest to keep it simple: just make it easy for people to discover how to build it properly. Thanks, Ingo