On Sat, 22 Dec 2007, Felix Fietkau wrote: > Robert P. J. Day wrote: > > ok, some general thoughts on taking advantage of already-installed > > host tools so they don't have to be downloaded, configured, built and > > installed in staging_dir/host/bin. (i'll just discuss "sed" here but, > > obviously, this can apply to any of the other host tools that are > > already on the build system, which could include ccache, pkg-config > > and possibly others.) > > > > first, it obviously makes sense to not just check for that utility, > > but to check that it's new enough, and that's easy enough to do in the > > Makefile so that's not an issue. > > > > the other issue is to set the search path appropriately. as a first > > guess, that could involve a change like the following in rules.mk: > > > > - SED:=$(STAGING_DIR_HOST)/bin/sed -i -e > > + SED:=sed -i -e > > > > given that the PATH is set in rules.mk thusly: > > > > TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(STAGING_DIR_HOST)/bin:$(STAGING_DIR)/usr/bin:$(PATH) > > export PATH:=$(TARGET_PATH) > > > > that would seem to handle both the staged case and the pre-installed > > case, since the staged case would take precedence.
> Yes, makes sense. one question, though -- is there any chance that one of those host tools would end up in one of those earlier directories on the search path? i can see that $(TOOLCHAIN_DIR)/bin should contain only the host toolchain commands, so we should be good there. next, $(STAGING_DIR_HOST)/bin would contain those host utilities, so that's fine. but what about $(STAGING_DIR)/usr/bin? what's that supposed to contain? is it assured that that directory can't interfere with this search (that it can't possibly contain something named "sed")? just making sure. rday -- ======================================================================== Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA http://crashcourse.ca ======================================================================== _______________________________________________ openwrt-devel mailing list [email protected] http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
