From patchwork Thu Jun 29 09:26:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 9816285 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BBBCF6035F for ; Thu, 29 Jun 2017 09:26:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFF31286DE for ; Thu, 29 Jun 2017 09:26:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A47AC286E5; Thu, 29 Jun 2017 09:26:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_TVD_MIME_EPI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA8CD286DE for ; Thu, 29 Jun 2017 09:26:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751696AbdF2J0y (ORCPT ); Thu, 29 Jun 2017 05:26:54 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:55557 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751602AbdF2J0x (ORCPT ); Thu, 29 Jun 2017 05:26:53 -0400 Received: from [2001:67c:670:100:5054:ff:fe2a:3aa] (helo=pty.hi.pengutronix.de) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dQViu-00071p-AT; Thu, 29 Jun 2017 11:26:52 +0200 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1dQVit-0006La-HJ; Thu, 29 Jun 2017 11:26:51 +0200 Date: Thu, 29 Jun 2017 11:26:51 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Ben Hutchings Cc: linux-kbuild@vger.kernel.org, 778942@bugs.debian.org Subject: Re: [RFC] kbuild: Enable Large File Support for hostprogs Message-ID: <20170629092646.djtsrkbtz5ywdefj@taurus.defre.kleine-koenig.org> References: <1431307012.6033.9.camel@decadent.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1431307012.6033.9.camel@decadent.org.uk> User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:5054:ff:fe2a:3aa X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kbuild@vger.kernel.org Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hello Ben, On Mon, May 11, 2015 at 02:16:52AM +0100, Ben Hutchings wrote: > Some programs built on a 32-bit host need Large File Support (LFS). > Regardless of whether any of them need to deal with large files, > non-LFS *stat() functions don't work at all on an XFS volume with > 64-bit inodes. > > References: https://bugs.debian.org/778942 > Signed-off-by: Ben Hutchings > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index fbd43bf..a6fb432 100644 > --- a/Makefile > +++ b/Makefile > @@ -297,7 +297,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ > > HOSTCC = gcc > HOSTCXX = g++ > -HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 > +HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 > HOSTCXXFLAGS = -O2 I think we need the same for HOSTCXXFLAGS? Also I wonder if this would be a better approach: HOSTCFLAGS += -Wno-unused-value -Wno-unused-parameter \ but note, that HOSTLDFLAGS and HOSTLOADLIBES doesn't seem to be picked up. Best regards Uwe diff --git a/Makefile b/Makefile index e40c471abe29..d9dd5db0abce 100644 --- a/Makefile +++ b/Makefile @@ -301,9 +301,15 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ else if [ -x /bin/bash ]; then echo /bin/bash; \ else echo sh; fi ; fi) +HOST_LFS_CFLAGS := $(getconf LFS_CFLAGS) +HOST_LFS_LDFLAGS := $(getconf LFS_LDFLAGS) +HOST_LFS_LIBS := $(getconf LFS_LIBS) + HOSTCC = gcc HOSTCXX = g++ -HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 +HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS) +HOSTLDFLAGS = $(HOST_LFS_LDFLAGS) +HOSTLOADLIBES = $(HOST_LFS_LIBS) -HOSTCXXFLAGS = -O2 +HOSTCXXFLAGS = -O2 $(HOST_LFS_CFLAGS) ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1)