Re: [PATCH] enable LFS support for host programs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 29, 2017 at 12:07:18PM +0200, Uwe Kleine-König wrote:
> This fixes building on an XFS partition on a 32 bit machine:
> 
> 	$ armmake -C ~/gsrc/barebox O=$PWD imx_defconfig
> 	  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@xxxxxxxxxxxxxx>
> ---
>  Makefile              | 12 +++++++++---
>  scripts/Makefile.host |  2 +-
>  2 files changed, 10 insertions(+), 4 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/Makefile b/Makefile
> index 42948fafa33f..3291d310febf 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -181,10 +181,16 @@ 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 -Wstrict-prototypes -O2 -fomit-frame-pointer
> -HOSTCXXFLAGS = -O2
> +HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer $(HOST_LFS_CFLAGS)
> +HOSTCXXFLAGS = -O2 $(HOST_LFS_CFLAGS)
> +HOSTLDFLAGS = $(HOST_LFS_LDFLAGS)
> +HOST_LOADLIBES = $(HOST_LFS_LIBS)
>  
>  # Decide whether to build built-in, modular, or both.
>  # Normally, just do built-in.
> @@ -316,7 +322,7 @@ KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
>  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 MAKE AWK GENKSYMS PERL UTS_MACHINE
> -export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
> +export HOSTCXX HOSTCXXFLAGS HOSTLDFLAGS HOST_LOADLIBES LDFLAGS_MODULE CHECK CHECKFLAGS
>  
>  export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
>  export CFLAGS CFLAGS_KERNEL
> diff --git a/scripts/Makefile.host b/scripts/Makefile.host
> index 133edfae5b8a..a89a0c5d43b2 100644
> --- a/scripts/Makefile.host
> +++ b/scripts/Makefile.host
> @@ -85,7 +85,7 @@ hostcxx_flags  = -Wp,-MD,$(depfile) $(__hostcxx_flags)
>  # Create executable from a single .c file
>  # host-csingle -> Executable
>  quiet_cmd_host-csingle 	= HOSTCC  $@
> -      cmd_host-csingle	= $(HOSTCC) $(hostc_flags) -o $@ $< \
> +      cmd_host-csingle	= $(HOSTCC) $(hostc_flags) $(HOSTLDFLAGS) -o $@ $< \
>  	  	$(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
>  $(host-csingle): $(obj)/%: $(src)/%.c FORCE
>  	$(call if_changed_dep,host-csingle)
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/barebox

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux