Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2200022imm; Sat, 9 Jun 2018 09:50:09 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIoEbRqXV0ieP+2E67EP2TZockjdB3g/96Qu5pJqZuJD87jOj1DaZBm3hZapM170llI+yYw X-Received: by 2002:a62:1282:: with SMTP id 2-v6mr10855953pfs.243.1528563009409; Sat, 09 Jun 2018 09:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528563009; cv=none; d=google.com; s=arc-20160816; b=a0C/38SYt9lJ/g5lvEoIR94/8FNU81cgmJt+NfVMeDN2ftfO54cu5BkvLcL96fh5Q2 2Vx/b8/81xFsPdQa57YV492QcPiHiBEXbFBJsSWU5qinXoB1e6WSre8L2aBuJrA7tyjX m5NRFYR+8zNqV5tUgTTN7AAaRUxW1vGfGm3bcr9iSjLFo7zC52jwtAU+xEihOV1Tqpfe INdYMAhPBvQQ+nk+bAtR7nDrG+TMTwXHSiRk+fkNBIxrF765kx37BSxHAd5ah8DjdVQH vid5caxr12/BTXqO1zXJh09kXqVq0jAeTTuJCZTRtWgdEwePP7qyhDfx6Mc4cTvJ6tt3 DcPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=HdjQ7sMz1uc7uUnYAzRVD7EL+tk9AD5nsOdKZewhQlY=; b=pQq3fCmLlRCtxf263CEntoTR4wbj/jKhOjLszIJ5zQI1SQmQnUSg8bLvs0T1H/yQ77 gQevlmCXwYXZuX17CEBoMc43Bw6JYeTviwBgyJEaVNGS4Fdv0NBr4Q+0dSUa3ph1Jj8i Fnm8Fop4gbRBlmfmnouHQh/AfHN0smFVbkkE6aalzjt7ejdacD81fn5J/AsECp8xJPXx ILY7bqZOFNKvXuvVTNIZy6NceXBT2kz9Pz7uius4lm1xgN8HvkAp/VTzzKKTIQ05BIzj FYxyKgNGAqOkBWEfe9bP8C8lNKQ38W2O1KlIZcPRQm95baciDuUDbUwKYSTNLI9DtxWn jaIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@thunk.org header.s=ef5046eb header.b=N8Q5hEa5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11-v6si14688492pgt.63.2018.06.09.09.49.54; Sat, 09 Jun 2018 09:50:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@thunk.org header.s=ef5046eb header.b=N8Q5hEa5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753431AbeFIQtb (ORCPT + 99 others); Sat, 9 Jun 2018 12:49:31 -0400 Received: from imap.thunk.org ([74.207.234.97]:52944 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753188AbeFIQt3 (ORCPT ); Sat, 9 Jun 2018 12:49:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=HdjQ7sMz1uc7uUnYAzRVD7EL+tk9AD5nsOdKZewhQlY=; b=N8Q5hEa5gi2yosG6S29/igGJG0 7MrkQtWcjNpdqvJMAq1QHk0+dAK54Odtp65yv8x6JcLOhxznHMW0YEg3OiQFbL1szvufuI8vHRDVa UuXxcNl2u2iuzsjT4vgjcuxsYdEqwgThTg9Yq2B1iytTrv56pJMV7VHePYM/eaZu/SRg=; Received: from root (helo=callcc.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.89) (envelope-from ) id 1fRh3K-0008Dn-Mt; Sat, 09 Jun 2018 16:49:22 +0000 Received: by callcc.thunk.org (Postfix, from userid 15806) id 0E81E7A4474; Sat, 9 Jun 2018 12:49:22 -0400 (EDT) Date: Sat, 9 Jun 2018 12:49:21 -0400 From: "Theodore Y. Ts'o" To: Masahiro Yamada Cc: Michal Kubecek , Linus Torvalds , Thomas Backlund , Ulf Magnusson , Linux Kernel Mailing List Subject: Re: building in 32bit chroot on x86_64 host broken Message-ID: <20180609164921.GA5020@thunk.org> Mail-Followup-To: "Theodore Y. Ts'o" , Masahiro Yamada , Michal Kubecek , Linus Torvalds , Thomas Backlund , Ulf Magnusson , Linux Kernel Mailing List References: <20180608091227.jbigan3vplns2oxk@unicorn.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 09, 2018 at 09:23:55PM +0900, Masahiro Yamada wrote: > Just a note. > > In case of cross-compiling, not only ARCH but also CROSS_COMPILE > must be passed when you do "make *config". Sure, what was being discussed was people who build 32-bit x86 kernels on a 64-bit platform. I do this occasionally to check and make sure that 32-compat ioctl handling is working correctly, etc. I suspect there are more developers setting just ARCH= and not CROSS_COMPILE because they are building 32-bit x86 kernels (which can then be trivially tested using qemu) than there are building cross-compiled kernels for a completely different architecture. I saw this thread and decided I didn't care because I use a standard "kbuild32" script (I also have a "kbuild" script for building normal 64-bit kernels), and it always passes ARCH=i386. - Ted #!/bin/bash N=$(getconf _NPROCESSORS_ONLN) if test -f .git/kbuild/config ; then . .git/kbuild/config else echo "Missing kbuild configuration file!" exit 1 fi if test ! -d "$BLD_DIR_32" ; then mkdir -p "$BLD_DIR_32" if test -f .git/kbuild/kernel-config ; then cp .git/kbuild/kernel-config-32 "$BLD_DIR_32/.config" fi for i in x509.genkey signing_key.pem signing_key.x509 do if test -f ".git/kbuild/$i" ; then mkdir -p "$BLD_DIR_32/certs" cp ".git/kbuild/$i" "$BLD_DIR_32/certs" fi done fi time nice make O="$BLD_DIR_32" ARCH=i386 -j$N $* cp "$BLD_DIR_32/.config" .git/kbuild/kernel-config-32