On Sat, 22 Dec 2007, Felix Fietkau wrote:

> Robert P. J. Day wrote:
> > Update the required version of "sed" from 4.1.2 to 4.1.5 and,
> > furthermore, avoid building it if it's already installed.
> >
> > Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]>

> NACK. There are quite a few broken sed versions out there, iirc.
> That was the reason for adding sed to the tools/ build in the first
> place. Please resend with a version check. I don't know which
> versions are broken, but we could check for version >= 4.1.2 to make
> sure that it's working.

  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.

  hmmmmm ... actually, that could be a problem if "sed" is found in
one of those other directories in the search path.  is there any
chance of that?  if there is, a trivial solution is to just leave
rules.mk the way it is and create an appropriate symlink:

  $(STAGING_DIR_HOST)/bin/sed -> /bin/sed

if the existing sed is acceptable.  in any event, it seems like an
easy thing to do.

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

Reply via email to