* [PATCH] enable LFS support for host programs
@ 2017-06-29 10:07 Uwe Kleine-König
2017-06-30 11:37 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2017-06-29 10:07 UTC (permalink / raw)
To: barebox
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@pengutronix.de>
---
Makefile | 12 +++++++++---
scripts/Makefile.host | 2 +-
2 files changed, 10 insertions(+), 4 deletions(-)
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] enable LFS support for host programs
2017-06-29 10:07 [PATCH] enable LFS support for host programs Uwe Kleine-König
@ 2017-06-30 11:37 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2017-06-30 11:37 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: barebox
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@pengutronix.de>
> ---
> 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@lists.infradead.org
> 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-30 11:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 10:07 [PATCH] enable LFS support for host programs Uwe Kleine-König
2017-06-30 11:37 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox