diff mbox

kbuild: Enable Large File Support for hostprogs

Message ID 20170629121136.16860-1-u.kleine-koenig@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Uwe Kleine-König June 29, 2017, 12:11 p.m. UTC
This fixes the following build error for me when building on an 32 bit
machine using an XFS file system:

	$ make scripts/basic/fixdep
	  HOSTCC  scripts/basic/fixdep
	fixdep: error fstat'ing depfile: scripts/basic/.fixdep.d: Value too large for defined data type

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Comments

Uwe Kleine-König June 29, 2017, 12:17 p.m. UTC | #1
Hello,

On Thu, Jun 29, 2017 at 02:11:36PM +0200, Uwe Kleine-König wrote:
> diff --git a/Makefile b/Makefile
> index e40c471abe29..2c72207ce298 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 := $(shell getconf LFS_CFLAGS)
> +HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS)
> +HOST_LFS_LIBS := $(shell 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)
> +HOST_LOADLIBES = $(HOST_LFS_LIBS)
>  HOSTCXXFLAGS = -O2

I forgot to add $(HOST_LFS_CFLAGS) to HOSTCXXFLAGS. I can resend if the
patch is considered ok otherwise.

Best regards
Uwe
Masahiro Yamada July 8, 2017, 1:42 p.m. UTC | #2
2017-06-29 21:17 GMT+09:00 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> Hello,
>
> On Thu, Jun 29, 2017 at 02:11:36PM +0200, Uwe Kleine-König wrote:
>> diff --git a/Makefile b/Makefile
>> index e40c471abe29..2c72207ce298 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 := $(shell getconf LFS_CFLAGS)
>> +HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS)
>> +HOST_LFS_LIBS := $(shell 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)
>> +HOST_LOADLIBES = $(HOST_LFS_LIBS)
>>  HOSTCXXFLAGS = -O2
>
> I forgot to add $(HOST_LFS_CFLAGS) to HOSTCXXFLAGS. I can resend if the
> patch is considered ok otherwise.
>

Ben,
Is this patch OK with you?
Ben Hutchings July 9, 2017, 4:32 p.m. UTC | #3
On Sat, 2017-07-08 at 22:42 +0900, Masahiro Yamada wrote:
> 2017-06-29 21:17 GMT+09:00 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> > Hello,
> > 
> > On Thu, Jun 29, 2017 at 02:11:36PM +0200, Uwe Kleine-König wrote:
> > > diff --git a/Makefile b/Makefile
> > > index e40c471abe29..2c72207ce298 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 := $(shell getconf LFS_CFLAGS)
> > > +HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS)
> > > +HOST_LFS_LIBS := $(shell 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)
> > > +HOST_LOADLIBES = $(HOST_LFS_LIBS)
> > >  HOSTCXXFLAGS = -O2
> > 
> > I forgot to add $(HOST_LFS_CFLAGS) to HOSTCXXFLAGS. I can resend if the
> > patch is considered ok otherwise.
> > 
> 
> Ben,
> Is this patch OK with you?

Acked-by: Ben Hutchings <ben@decadent.org.uk>

Ben.
diff mbox

Patch

diff --git a/Makefile b/Makefile
index e40c471abe29..2c72207ce298 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 := $(shell getconf LFS_CFLAGS)
+HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS)
+HOST_LFS_LIBS := $(shell 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)
+HOST_LOADLIBES = $(HOST_LFS_LIBS)
 HOSTCXXFLAGS = -O2
 
 ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1)
@@ -417,7 +423,7 @@  KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(S
 
 export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
 export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
-export CPP AR NM STRIP OBJCOPY OBJDUMP
+export CPP AR NM STRIP OBJCOPY OBJDUMP HOSTLDFLAGS HOST_LOADLIBES
 export MAKE AWK GENKSYMS INSTALLKERNEL PERL PYTHON UTS_MACHINE
 export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS