From b948fdba2219ac599b374ce4aa189bbc464048bf Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Mon, 3 Nov 2008 20:11:03 +0000 Subject: [PATCH] Makefile: ignore glib-genmarshal in staging_dir HOST_GLIB is set to the path that contains the host glib tool set and is used when building packages using glib. The buildroot top level Makefile sets HOST_GLIB using which to find the path where glib-genmarshal is located. The problem is that a cross compiled version of glib-genmarshal is also put in the build_ARCH/staging_dir/usr/bin directory when the package libglib2 is built. This cross compiled version will typically not run on the host system. Fix it by ignoring staging_dir in the which output. Closes #5934 jacmet: fixed to work correctly if it's only found in staging_dir. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c6e683a1d5..f5d1967129 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,8 @@ HOSTCPP:=$(shell $(CONFIG_SHELL) -c "which $(HOSTCPP)" || type -p $(HOSTCPP) || HOSTLD:=$(shell $(CONFIG_SHELL) -c "which $(HOSTLD)" || type -p $(HOSTLD) || echo ld) HOSTLN:=$(shell $(CONFIG_SHELL) -c "which $(HOSTLN)" || type -p $(HOSTLN) || echo ln) HOSTNM:=$(shell $(CONFIG_SHELL) -c "which $(HOSTNM)" || type -p $(HOSTNM) || echo nm) -HOST_GLIB_BIN:=`dirname $(shell $(CONFIG_SHELL) -c "which glib-genmarshal" || echo /usr/bin/glib-genmarshal)` +# ignore version in staging_dir +HOST_GLIB_BIN:=`dirname $(shell $(CONFIG_SHELL) -c "(which -a glib-genmarshal; echo /usr/bin/glib-genmarshal)|grep -v staging_dir|head -n 1")` HOST_GLIB:=$(shell $(CONFIG_SHELL) -c "dirname $(HOST_GLIB_BIN)" || echo /usr) -- 2.30.2